Android USB debugging on openSUSE 11.4

Debugging your android app using a hardware device has several advantages, ie faster and more testing possibilities. On windows you have to install a custom USB driver, on linux it’s a matter of configuring your udev rules:

  • add a rules files in /etc/udev/rules.d , ie 44-android.rules
  • enter a line like this:
    SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="users"

    and adapt the vendor id using this table.

  • Reload udev rules: udevadm control --reload-rules

When you run adb devices, it should now list your device:

List of devices attached 
emulator-5554   device
SH14FPL06953    device

Before, you would rather have something like this:

List of devices attached 
emulator-5554   device
????????????    no permissions

On succesful connection, the system log shows something like:

kernel: [11172.551464] usb 2-1: USB disconnect, address 4
kernel: [11178.813044] usb 2-1: new high speed USB device using ehci_hcd and address 5
kernel: [11178.942137] usb 2-1: New USB device found, idVendor=0bb4, idProduct=0c87
kernel: [11178.942150] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: [11178.942157] usb 2-1: Product: Android Phone
kernel: [11178.942162] usb 2-1: Manufacturer: HTC
kernel: [11178.942166] usb 2-1: SerialNumber: SH14FPL06953
kernel: [11178.943867] scsi8 : usb-storage 2-1:1.0
mtp-probe: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:04.1/usb2/2-1"
mtp-probe: bus: 2, device: 5 was not an MTP device
kernel: [11179.953172] scsi 8:0:0:0: Direct-Access     HTC      Android Phone    0100 PQ: 0 ANSI: 2
kernel: [11179.953375] sd 8:0:0:0: Attached scsi generic sg4 type 0
kernel: [11179.961631] sd 8:0:0:0: [sdd] Attached SCSI removable disk

Note that it seems normal that a usb storage device is detected, although I did not have it enabled on the phone.

3 thoughts on “Android USB debugging on openSUSE 11.4”

  1. I owe you at least a beer for writing this. I’ve been trying to figure this out, and your write-up was perfect. Thanks.

  2. Thanks! This was just the ticket, although I have opensuse 11.4 and had to add the rules in a separate file below the rules.d directory. (I created a new file called “44-android.rules”, containing just the line you indicated.

Leave a Reply to Dennis Cancel reply

Your email address will not be published. Required fields are marked *