Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Eclipse's Android Device Chooser not showing my Android device?

I am using the Android plugin for Eclipse, and when I try to run my program using a real device through the Android Device Chooser, my phone is not listed as a device. I have updated Eclipse, all of the Android packages, and the USB driver, but it still isn't showing up. My phone is running Android 2.1, which is also the target version listed in the Eclipse project.

Also it happens that the device shows up as an unknown target and the serial number as question marks as shown in the screenshot.

Android Device Chooser

like image 887
Subrat Avatar asked Aug 07 '10 09:08

Subrat


4 Answers

Did you try from your command line (assumed linux)

adb devices

If you got a lot of question marks

List of devices attached
??????????????    device

Check what is the vendor ID of your device:

lsusb 
> Bus 003 Device 006: ID 04e8:689e Samsung Electronics Co., Ltd 

Vendor ID is '04e8' in this case.

You need to add your device to USB list

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"

Alternatively try the following syntax as pointed out by mcordaro and Yekmer Simsek referring to the documentation

SUBSYSTEM=="usb", ATTR{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.

like image 192
vsm Avatar answered Oct 17 '22 14:10

vsm


I just had the same issue with the Motorola Droid. I had 3 devices and only 1 was detected in the ADB. The one that worked showed up in device manager as "android adb composite interface" and the 2 that did not work showed up as "android adb interface". In Windows 7 I did the following.

  1. Right Click Computer then Manage
  2. Expand Android phone at the top of the list
  3. Right click Android ADB Interface then Update Driver Software
  4. Browse my computer for driver software
  5. Let me pick from a list of device drivers on my computer
  6. Choose USB Composite Device then next

If USB Composite Device doesn't show up then try browsing to the usb_driver folder in your android sdk directory for step 5 then try step 5 and 6 again.

Note : If Android does not appear at the top of this list as described in #2 and/or you find a device ADB with no drivers then you probably need to install the device driver, which in my case (HTC Glacier) was located right on my phone.

like image 44
Joe Avatar answered Oct 17 '22 13:10

Joe


There is one thing some could not remember. Like myself, if you tried to run adb with superuser credentials following a run with regular user credentials, don't expect success. First, you have to kill adb which was run with lousy rights and start it again with sudo:

marek@deb42:~$ sudo adb kill-server

marek@deb42:~$ sudo adb devices

like image 7
Marecky Avatar answered Oct 17 '22 13:10

Marecky


I figured it out, though it sounds like we have different problems. However, just in case this helps you.

First of all your manifest has to have the android:debuggable="true" attribute in the Application node. You probably have this, and I don't know if it actually contributes to the device showing up or not.

In any event, the thing I was doing wrong was when I run or debug my configuration (in Eclipse) under the target tab (where it lists your emulator device setups) I had the Automatic radio button checked. If you flip that to manual it then gives you another dialog when you hit Run, and in THAT dialog, on the top, I see my device.

Lastly, (and I only see this on the Droid X) when you are in PC mode the device doesn't act as though it's connected to the machine. When you're in Mass Storage mode, everything works as expected BUT then the SD card is disabled, so, if your app happens to WRITE to the SD card it will fail at that point in execution. The Captivate (my other test device) does not suffer from the same problem.

like image 3
Yevgeny Simkin Avatar answered Oct 17 '22 12:10

Yevgeny Simkin