This question already has an answer here:
I have a HTC Desire which i would like to debug and run my Android application on. But when i in Eclipse gets the Window where i can choose between devices my HTC Desire is listed with only questionmarks (????????). What am i doing wrong?
I have tried this:
Enabled USB Debugging on my device and enabled debugging in my application Manifest.xml file.
In Terminal i have do this:
- Log in as root and create this file: /etc/udev/rules.d/51-android.rules.
- SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
- sudo service udev restart
What else could i try or have forgotten?
You need to run adb manually using sudo. If you just run adb without sudo (or if you let Eclipse/ADT do it for you), it won't have the permissions necessary to see your devices.
If it's already running, then sudo adb kill-server and sudo adb start-server.
Make sure you installed sudo apt-get install android-tools-adb Now check sudo adb It will show help of adb
Now please kill/start adb use following commands -
sudo adb kill-server sudo adb start-server
Lastly, sudo adb devices
Hopefully this will work !!!
the device-id in the
adb devices
commmand is actually using the serial number of the android usb devices.So, if you get a null string from the serial number, it will display ???????????
In the adb server source code:
So, it could be that your adb server is not running at root privilege, or your usb devices does't not allow adb server to read. A simple check would be using lsusb -v | grep iSerial to see if you can get the iSerial field of your android device.
Also, there're chances the iSerial string is not prepared well in the device. I've seen a lot of engineering product doesn't have the iSerial at all, or all of the devices are displaying the same device id.
Some times, the driver will read a section of data in the flash which is programmed uniquely from device to device to make it iSerial/device id.
Note: EboMike's accepted answer is INCORRECT.
I know this is an old question thread, but I stumbled across it trying to resolve the same problem. However the accepted answer was incorrect. There should be no need to run the adb server as root once you have your udev rules set correctly.
Step 3 in http://developer.android.com/tools/device.html gives you the correct resolution. Specifically, add or modify /etc/udev/rules.d/51-android.rules with the following line:
In this case 0bb4 is the vendor id for HTC. 0fff is the product id for Nexus One. Use the table at the above link, or lsusb to identify your device's vendor id & product id. eg
18d1 is the vendor id of this particular device, and 4e22 the product id. You can leave off the "GROUP" definition if you want to enable access to this device to all users. If not, be sure to add yourself to the plugdev group if you are not in it already. After creating this file, restart or reload udev.
If you had to add yourself to a group, you will need to logout and back in again.
Kill any old adb servers with "adb kill-server", plug your device in and run "adb devices". This will restart the server and you should now see your device. Running adb as root, even just to start the adb server, is not required. It is also generally a bad idea to run things as root unless it is absolutely required.
This is because you haven't given your adb the permission to access to your hardware. You have two solutions:
temporary -> kill all existing adb processes and restart with super user
or
permanent -> add your devices to udev list Add following line to your /etc/udev/rules.d/51-android.rules as root with correct idVendor using this list.
followed by following command:
If adb doesn't work do the following:
I've managed to get my "bricked" Nexus S working again by doing what is said here. One small addition was necessary, though.
When you do an
lsusb
and the USB subsystem tells you which Android device is attached, mine was giving me back:Note the d001 and not any of the known states, i.e. 4e20, 4e21 or 4e22. So what I did is to add another row in
51-android.rules
specifically with this unknown state and mark it as "recovery/debug".Disconnect and reconnect Android. Check
lsusb
again to make sure it is at least seen. And... That gave me thisinstead of this
After that, I simply followed the howto for restoring the factory images. Hope it helps.