Feb 14, 2010

Debugging on usb-connected Android phone on Linux

Since my nvidia-broken mybook exchange process got extended by some unclear reasons - maybe russian customs sends us a nice "hello" or local Deep Apple screwed up, but I did not yet got my working machine back and still sitting on rented terrible asus u6v laptop and Ubuntu.

By the way, I need to work regardless the status of my macbook, so I installed Android sdk on Ubuntu this weekend. While sdk installation and development process went nice, I stuck on running my app on a real, usb connected device - IDEA / NetBeans were hanging on a device selection dialog and "adb devices" commands says "no permissions".

The answer was simple, so Im posting it here, basically for my own records and if this would be useful for anyone else. The problems is in permissions. To fix this, just become root and restart your adb server by invoking the following commands (as root !) from Android sdk:

adb kill-server
adb start-server 

Now try to reinvoke your IDE Android devices list or just call "adb devices" - you should see your phone now ok.

In some cases, you'll need to add permissions to asb devices manager, in such case plase consult the source topic I found information in - it contains some more details on this question: http://androidboss.com/using-android-debug-bridge-adb-in-linux/