Tuesday, June 30, 2009

Android Debug Bridge on Ubuntu 9.04

To perform general debugging and install alternative ROM's on the HTC Magic in Ubuntu 9.04, you will need a little more footwork than the documentation mentions.

First, I assume you have installed the SDK and added it to path so that you can perform ADB commands from everywhere. Then, you need to have USB debugging enabled on the phone, do this by going under Settings > Applications > Development and check the "USB Debugging" item.

Now, add a udev rule for your device:

gksudo gedit /etc/udev/rules.d/51.android.rules

Add the following to the file and save it:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"

Reload USB devices by issuing the command:

sudo /etc/init.d/udev reload

Unplug and plug the device. Check if you can see the device:

casper@workstation:~$ adb devices
* daemon not running. starting it now *
* daemon started successfully *
List of devices attached
HT95PKF00221 device

There, now you can browse your phone with the adb shell command and start diving into the rather interesting world of rooting and alternative ROM's found over on XDA-developers. My next move is to try the HTC Hero ROM on my Magic, which will give the phone the new multitouch Rosie/Sense interface.

Another cool thing is that if you start your Eclipse SDK and try to run an application, it will now deploy to the physical device rather than the emulator - pretty neat!

Post a Comment