Friday, December 30, 2011

If your HTC EVO 3D phone is not recognised by Eclipse running in Ubuntu

I was trying to develop an app for android phone. my working environment was eclipse running on unbuntu. I was planning to use an HTC EVO 3D phone for debugging. But surprisingly I wasn't able to debug and run my app directly in my phone from eclipse. the phone wasn't being recognised. Eventually I could sort out the fix and it was quite easy. ya things are easy when you know the solution :P

do the following to get your phone work:

1. run lsusb command on the prompt. You'll see something like the following:

Bus 002 Device 013: ID 0bb4:0cba High Tech Computer Corp. 

Observe 0bb4:0cba.  0bb4 is the vendor ID and 0cba is the product ID.

2. create/edit /etc/udev/rules.d/51-android.rules  as super user. Add the following line:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0cba", MODE="0666"

update product ID according to your system.

3. unplug and plug your phone again. you are all set.