ADB - Android Debug Bridge doesn't work

OS: openSUSE 12.1
KDE 4.7.2
phone: LG Optimus V, configured with debugging enabled

Problem:
ADB (from the Android SDK) does not seem to work. As usual, the test command is “adb devices” which should return a list of any recognized devices, but instead returns an empty list. I find it interesting that despite ADB not working, the LG phone is properly recognized on auto-detect, an appropriate udev rule and entry is created, and the phone’s storage is mountable without any special effort. If so much automatically works, why does ADB not work?

**
Have inspected the following Forum threads and tried their solutions:**

1.Create a Vendor entry in adb_usb.ini

0x1004

http://forums.opensuse.org/english/other-forums/development/programming-scripting/439951-android-adb-opensuse-11-2-archos-device.html

  1. Modified udev Android Rules
    Somehow a rule was already created as follows
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GRO:UP="plugdev" 

Changed the rule to recommended

SUBSYSTEM=="usb" , SYSFS{idVendor}=="1004" , MODE="6310" , OWNER="user"

Also tried with both enries in the same udev rule
Although the Forum post recommended reloading the udev rules, I’ve verified and consistent with documentation it’s not necessary, I also verified udev is utilized by both “Device Notifier” and KDE Dolphin to auto-detect and mount the phone.
http://forums.opensuse.org/forums/english/other-forums/development/programming-scripting/466987-android-adb-fails-recognize-usb-connected-phone.html

I’ve tested with both the phone mounted as mass storage and not mounted, no diff.

Curiously, I’m surprised that openSUSE recognizes the device properly and identifies, is listed by lsusb and YAST Hardware information. At first I suspected perhaps a faulty driver supporting only mass storage, but if “Hardware Information” is accurate then the driver being used is actually a general purpose communications driver originally designed for modems.

Specific questions:

  1. Why and what is the purpose of the hidden folder and file? (./android/adb_usb.ini) What process or module is supposed to use this file?
  2. Although I’m using sysvinit instead of systemd, I seem to remember that with systemd udev is supposed to be deprecated in favor of some kind of systemd services. I can’t seem to find anything on this specific to creating as service similar to the udev Android rules, in fact I find hardly any kind of hard reference information, only “soft” general advice.

Thx,
TS

Hi
My rule for an ASUS TF101 to mount as an mtp device is;


# For ASUS Transformer TF101
SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="4e0f", SYMLINK+="libmtp-%k", MODE="0666", GROUP="users"
RUN+="udev-acl --action=$env{action} --device=$env{DEVNAME}"

Check your device by walking it via udevadm as this should help to
verify the udev rule, 6310 seems very strange as the permissions are
310?? Running udev-acl to set the permissions is also required.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 1 day 7:10, 3 users, load average: 0.00, 0.02, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Hello tsu2,

I also have an Optimus V and just got ADB working on openSUSE 12.1.

Here is my exact file “52-android.rules”

> cat /etc/udev/rules.d/52-android.rules
SUBSYSTEMS==“usb”, ATTR{idVendor}==“1004”, ATTR{idProduct}==“618e”, MODE=“0666”
>

adb is now working and responds as such:

> ./adb devices
List of devices attached
A1000019417B4A device

>

A very helpful command was:
(as root)

udevadm info --path=/sys/bus/usb/devices/1-6 --attribute-walk

this shows all attributes of my device (which happened to be 1-6 in the usb tree, you can check this by browsing /sys/bus/usb/devices, and see what appears when you plug in your phone)

Another helpful command was:
(as root)

udevadm test /sys/bus/usb/devices/1-6

This does a ‘dry run’ and shows you what happens with udev when you plug your device in.

In my case I had copied and pasted my .rules file and the quotes weren’t really quotes when i edited the file in VIM. I retyped it, exactly as you see above, and – BINGO!

Hope this helps,

  • Vince