Connect android device to linux for development

Develop android application on Linux

You can use Android-sdk-linux, AndroidStudio, development android applications on linux operating system. But when you debug your app with connected android device, you found it can’t upload app to android device. You can check device status by command adb devices , list below:

List of devices attached
0A3AA8580300A017    no permissions

It shows no permissions, so android studio cannot upload app to device. Now let’s resolve this problem: 1.Ensure device is under development mode Make Settings -> Application -> Unknown sources | Development -> USB Debug checked. 2.Look up your usb devices. use lsusb you get one line infomation from results: Bus 002 Device 006: ID 22b8:428c Motorola PCS In above infomation, section ID 22b8:428c means “VenderID:ProductID” paire. 3.Create rules file vi /etc/udev/rules.d/51-android.rules add line SUBSYSTEMS=="usb", ATTRS{idVendor}=="22b8", ATTRS{idProduct}=="428c", MODE="0666" At this ATTRS{idVendor} is 22b8 , ATTRS{idProduct} is 428c. 4.Last few steps.

restart udev
adb kill-server
adb start-server

Finally reconnect device to your computer. Let’s check device with command adb devices, you will get result:

List of devices attached
0A3AA8580300A017    device

My Tools & Environment is Android-sdk-linux, AndroidStudio, linuxmint-mate Ref You can read this for details of /etc/udev/rules.d/