Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging in Eclipse with real Android phone on Ubuntu 10.10

I can't get adb to recognising my HTC Desire on my new upgrade of Ubuntu 10.10 Maverick Meerkat.

adb devices shows

List of devices attached 
????????????    no permissions

Now, there are plenty of tutorials for changing rule files under /etc/udev/rules.d/. However, I cannot find one specific for 10.10.

Can anyone tell me whether the rule file name and content is the same as described at link text, or are we looking at some new settings for this new release?

Many thanks

like image 481
Rokey Ge Avatar asked Nov 23 '10 21:11

Rokey Ge


4 Answers

On Linux Mint/Ubuntu 11.04 with a Samsung Galaxy S2, I didn't use any rules, but when "reset adb" or when "Devices view" it shows:

???????????? no permissions

I had to :

sudo killall adb # if I don't, I get "error: insufficient permissions for device"
sudo ./adb usb

Then I was able to take screenshots following this tutorials: http://www.addictivetips.com/mobile/how-to-take-screenshots-of-android-device/

Cheers

like image 56
Édouard Lopez Avatar answered Nov 02 '22 22:11

Édouard Lopez


My magic spell for Ubuntu 11.04:

$killall adb
$sudo adb usb
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
restarting in USB mode

Then go to eclipse and start debugging on real device

like image 38
Dmitry Avatar answered Nov 02 '22 22:11

Dmitry


Ok I am a little late to the party but here is another approach...

Create a file called 51-android.rules in /etc/udev/rules.d with the following contents

SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"

Then run the following command to reload the udev rules ...

udevadm control --reload-rules

Now plug in your galaxy S2 mobile phone into the computer's USB port and run adb devices.

NOTE: You will need to change the vendor id (highlighted in bold) to match your phone's vendor id (in the OP's case it should be 0bb4 for HTC)

like image 36
Autodidact Avatar answered Nov 02 '22 20:11

Autodidact


Okay, I guess the tutorials work, I created both 70-android.rules and 51-android.rules, re-typed them again (get rid of the funny quotes when you copy from the web).

Restart

And now it is recognised!

like image 1
Rokey Ge Avatar answered Nov 02 '22 21:11

Rokey Ge