2

I have been trying to get adb to recognize my Huawei 8150 Ideos Android Device, flashed with CyanogenMod 7.2.0, but currently, it only shows

$> ./adb devices
List of devices attached 
????????????    device

Which is an issue because it prevents me from using the automated deployment mechanisms of IDEs like android-studio, which I am currently using.

It should be noted, that I can indeed deploy .apks to the device directly from the command line using

$> ./adb install -r /path/to/apk/app-debug.apk 
1577 KB/s (1166600 bytes in 0.722s)
    pkg: /data/local/tmp/app-debug.apk
Success

I have found out, that adb takes the serial number information from the iSerial field from the devices USB interface. Here is the relevant section of lsusb:

$> sudo lsusb -v
[ ... ]
Bus 003 Device 020: ID 12d1:1038 Huawei Technologies Co., Ltd. Ideos (debug mode)
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x1038 Ideos (debug mode)
  bcdDevice            2.26
  iManufacturer           1 Huawei Incorporated
  iProduct                2 Ideos
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    [ ... ]

As you can see, the iSerial field is 0, so it seems to me, that my device does not even have a Serial Number to be read by adb.

I am not sure how to debug this issue,or if it is even fixable, and I would appreciate any help.

Community
  • 1
  • 1
Andreas Grapentin
  • 5,499
  • 4
  • 39
  • 57
  • I get this too, but Android Studio still works fine for me despite this (I use a single device only though). Try running ADB & lsusb as root, and see if there are any changes. From your link: _"Also, there're chances the iSerial string is not prepared well in the device. I've seen a lot of engineering product doesn't have the iSerial at all, or all of the devices are displaying the same device id."_ I doubt that there is any fix for this. – Jonas Czech Jun 07 '15 at 08:02
  • @JonasCz there must be **something** I can do. I have full root access to the device, I flashed it before, and I will flash it again if I need to. :) – Andreas Grapentin Jun 07 '15 at 08:10
  • Maybe, but I don't know of any way. Did you try running adb as root ? – Jonas Czech Jun 07 '15 at 08:11
  • @JonasCz yeah, I did that. It did not change anything though. I also added a working udev rule, I have setup the right permissions, reloaded the rules, rebooted, restarted the adb server and done most of the other things people suggest. bottom line: I don't think it's a permissions issue :) – Andreas Grapentin Jun 07 '15 at 09:15
  • possible duplicate of [Same serial number on several android devices. Adb is useless. How can I change the serial number?](http://stackoverflow.com/questions/14334656/same-serial-number-on-several-android-devices-adb-is-useless-how-can-i-change) – Alex P. Jun 07 '15 at 15:01
  • 1
    if you can afford it - use Nexus devices with official Google builds for your development. 3rd party "mods" are known for lots of broken features, no testing and no support. – Alex P. Jun 07 '15 at 15:12
  • @AlexP. That question has a similar vibe to it, yes, but it is fundamentally different in that it asks about changing the default serial number of a device. I want to make my device report a serial number at all, not necessarily change it. – Andreas Grapentin Jun 07 '15 at 19:24
  • that difference is irrelevant. The root cause and the solution is identical. – Alex P. Jun 07 '15 at 19:41
  • @AlexP. I disagree. The first fundamental difference to the question you point to is the operating system in question. The file hinted at in the answer given there does not even **exist** on my device. – Andreas Grapentin Jun 08 '15 at 03:20

1 Answers1

10

I have the same problem with my Huawei G600 phone. Despite being unable to return a valid ID/serial number when my phone's connected via USB, adb seems to communicate with the device just fine. Still, the invalid ID reported by adb trips up AndroidStudio.

Here's a workaround, if you don't mind doing it wirelessly.

Start with the device plugged in via USB, then:

$ adb usb
restarting in USB mode

$ adb devices
List of devices attached
????????????    device

$ adb tcpip 5555
restarting in TCP mode port: 5555

Now find the phone's IP address via Settings → About → Status → IP address.

$ adb connect YOUR_IP_ADDRESS
connected to YOUR_IP_ADDRESS:5555

$ adb devices
List of devices attached 
????????????    device
YOUR_IP_ADDRESS:5555 device

Now you should be able to access your device from AndroidStudio, etc.

When finished, adb disconnect YOUR_IP_ADDRESS

Timothy Musson
  • 148
  • 1
  • 5