Reputation: 5796
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 .apk
s 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.
Upvotes: 2
Views: 10249
Reputation: 158
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
Upvotes: 11