I had a heck of a time getting my development machine to recognize my Droid 2. I could plug in the USB cable, see the drive mounted, and everything seemed to work. But Eclipse would not see it when I tried to run an Android application. Executing adb devices (located in ~/android-sdks/platform-tools) showed that the device had no permissions.
Google created a Using Hardware Devices guide to help get it working, but it doesn’t work as-is — probably because there are so many flavors and releases of Linux.
Google also created a list of vendor IDs which, although helpful, didn’t work because, at least on my machine, the ‘B’ in 22B8 needs to be in lower case.
Below are the steps I went through to get it to work:
First try (no changes were made)
cd ~/android-sdks/platform-tools
./adb devices
List of devices attached
???????????? no permissions
Second try (copying the example in step 3a here and the Motorola code here)
/etc/udev/rules.d/51-android.rules
SUBSYSTEM==”usb”, ATTR{idVendor}==”22B8″, MODE=”0666″, GROUP=”plugdev”
sudo udevadm control –reload
(unplug and plug device)
cd ~/android-sdks/platform-tools
./adb devices
List of devices attached
???????????? no permissions
Third try (removing the GROUP attribute)
/etc/udev/rules.d/51-android.rules
SUBSYSTEM==”usb”, ATTR{idVendor}==”22B8″, MODE=”0666″
sudo udevadm control –reload
(unplug and plug device)
cd ~/android-sdks/platform-tools
./adb devices
List of devices attached
???????????? no permissions
Fourth try (lower-casing the ATTR{idVendor} attribute) — BINGO!
/etc/udev/rules.d/51-android.rules
SUBSYSTEM==”usb”, ATTR{idVendor}==”22b8″, MODE=”0666″
sudo udevadm control –reload
(unplug and plug device)
cd ~/android-sdks/platform-tools
./adb devices
List of devices attached
C70C81FB96E295FE no permissions
Note 1: That’s a made-up device ID. I copied 16 random hex characters from here.
Note 2: Word Press is a PITA and replaces double-dashes with m-dashes. The command to restart udev is udevadm control double-dash-reload
Note 3: I did this on openSUSE 11.4. I have also done it on 12.1 but need to confirm the rule is the same on that other machine.