Thursday, November 15, 2012

How to Debug Android Devices

If you get the following:
android@Hythloth:~/android-sdk-linux/platform-tools$ ./adb devices
List of devices attached
????????????    no permissions

android@Hythloth:~/android-sdk-linux/platform-tools$

Then you need to define your device in udev. Do the following:
lsusb
android@Hythloth:~/android-sdk-linux/platform-tools$ ./adb devices
List of devices attached
???????????? no permissions

android@Hythloth:~/android-sdk-linux/platform-tools$
you need to add to usb list your device
sudo vim /etc/udev/rules.d/51-android.rules
and put this line (use your own vendor ID)
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
save it, and then
sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo service udev reload
and it should work now.
But it didn't!
What did work was:
sudo ./adb kill-server
sudo ./adb start-server
As root.

This was taken from the incredibly useful stackoverflow.com post why-is-eclipses-android-device-chooser-not-showing-my-android-device and is probably based on developer.android.com/tools/device.html

No comments:

Post a Comment