adb connect from ubuntu 13.4


principio

Members
Nov 14, 2012
189
40
Opening this new thread is a call to all ubuntu users her: maybe you can help out.

I cannot connect to my mi2s using adb. When I unplug the mi2s and connect my old HTC Desire S (with miuiandroid latest build), "adb devices" shows me my device. That's why I guess that adb itself is not the problem.

There is another thread where someone posted a solution for ubuntu. This solution doesn't work for me (and someone else commenting).

So I would be glad if you could post here how you got your device seen by the adb. I would love to install wiui ROM or custom recovery, but I would prefer having some sort of access to the system. Just to complete it: I neither have access to my mi2s in fastboot: "no permissions". (htc shows up as it should, and YES, on both phones "developer options -> usb debugging" is turned on.) I am pretty sure I had to modify udev-rules in order to see my old phone.
 
  1. Connect your MI-2 to USB
  2. Run terminal on Ubuntu and type
    Code:
    lsusb
  3. Your device will be called something like this:
    Code:
    Bus 002 Device 007: ID 2717:9039
    in USB MTP mode.
  4. Now edit udev rules.
    Code:
    sudo nano /etc/udev/rules.d/51-android.rules
    If 51-android.rules doesnt exist then create it.
  5. Write this into that file:
    Code:
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="2717", ATTRS{idProduct}=="9039", MODE="0666", OWNER="username"
    , where user name is your "whoami" output.
  6. Save the file and restart your laptop.

If that code doesnt work then try this:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="2717", SYSFS{idProduct}=="####", MODE="0777"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2717", SYSFS{idProduct}=="####", MODE="0666"
 
Hi Acid, thank you for the reply.
  1. Connect your MI-2 to USB
  2. Run terminal on Ubuntu and type
    Code:
    lsusb
  3. Your device will be called something like this:
    Code:
    Bus 002 Device 007: ID 2717:9039
    in USB MTP mode.
  4. Now edit udev rules.
    Code:
    sudo nano /etc/udev/rules.d/51-android.rules
    If 51-android.rules doesnt exist then create it.
  5. Write this into that file:
    Code:
    SUBSYSTEMS=="usb", ATTRS{idVendor}=="2717", ATTRS{idProduct}=="9039", MODE="0666", OWNER="username"
    , where user name is your "whoami" output.
  6. Save the file and restart your laptop.
If that code doesnt work then try this:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="2717", SYSFS{idProduct}=="####", MODE="0777"
SUBSYSTEM=="usb", ATTRS{idVendor}=="2717", SYSFS{idProduct}=="####", MODE="0666"
Here we go:
output of lsusb:
Code:
Bus 002 Device 006: ID 2717:9039
(unlike all other rows there is no device mentioned)
So the ID is exactly the same.
Still, both ways of editing the 51-android.rules had no effect. Maybe the following output helps:
1st: the output from "sudo lsusb -vs 002:006" is
Code:
Bus 002 Device 006: ID 2717:9039
Device Descriptor:
  bLength                18
  bDescriptorType        1
  bcdUSB              2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        64
  idVendor          0x2717
  idProduct          0x9039
  bcdDevice            2.28
  iManufacturer          2 Xiaomi
  iProduct                3 MI 2
  iSerial                4 926c5e
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                9
    bDescriptorType        2
    wTotalLength          108
    bNumInterfaces          4
    bConfigurationValue    1
    iConfiguration          0
    bmAttributes        0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        0
      bAlternateSetting      0
      bNumEndpoints          3
      bInterfaceClass      255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol      0
      iInterface              5 MTP
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x001c  1x 28 bytes
        bInterval              6
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        1
      bAlternateSetting      0
      bNumEndpoints          2
      bInterfaceClass      255 Vendor Specific Class
      bInterfaceSubClass    66
      bInterfaceProtocol      1
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              0
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        2
      bAlternateSetting      0
      bNumEndpoints          2
      bInterfaceClass        8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol    80 Bulk-Only
      iInterface              1 Mass Storage
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              1
    Interface Descriptor:
      bLength                9
      bDescriptorType        4
      bInterfaceNumber        3
      bAlternateSetting      0
      bNumEndpoints          2
      bInterfaceClass      255 Vendor Specific Class
      bInterfaceSubClass    67
      bInterfaceProtocol      1
      iInterface              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              0
      Endpoint Descriptor:
        bLength                7
        bDescriptorType        5
        bEndpointAddress    0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type              None
          Usage Type              Data
        wMaxPacketSize    0x0200  1x 512 bytes
        bInterval              0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType        6
  bcdUSB              2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass        0
  bDeviceProtocol        0
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:    0x0000
  (Bus Powered)

And syslog-output ("tailf /var/log/syslog")
Code:
Sep 30 19:19:45 benedikt-AMILO kernel: [  246.928233] usb 2-1: new high-speed USB device number 5 using ehci-pci
Sep 30 19:19:45 benedikt-AMILO kernel: [  247.063496] usb 2-1: New USB device found, idVendor=2717, idProduct=9039
Sep 30 19:19:45 benedikt-AMILO kernel: [  247.063508] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Sep 30 19:19:45 benedikt-AMILO kernel: [  247.063516] usb 2-1: Product: MI 2
Sep 30 19:19:45 benedikt-AMILO kernel: [  247.063523] usb 2-1: Manufacturer: Xiaomi
Sep 30 19:19:45 benedikt-AMILO kernel: [  247.063529] usb 2-1: SerialNumber: 926c5e
Sep 30 19:19:45 benedikt-AMILO kernel: [  247.065886] scsi7 : usb-storage 2-1:1.2
...updated with syslog-code

Does that help finding the error?
 
Last edited: