9

There are two devices connected with my computer.But when I start the adb, both of them have the serial number "0123456789ABCDEF".

When I try to install an APK, the installation fails with "more than one device" error message. enter image description here

In addition, I am developing a Bluetooth app, I need to use both of the two devices simultaneously.

Hao
  • 180
  • 1
  • 3
  • 11

2 Answers2

14

adb devices -l command prints out some additional device parameters which can also be used with adb -s. Obviously it would help only if any of those extra parameters are unique. Fortunately for linux and osx users adb devices -l in those systems also reports unique USB port numbers:

$ adb devices -l
List of devices attached
XXXXXXXXXX             device usb:2-1.6.7.7 product:shamu model:Nexus_6 device:shamu

$ adb -s usb:2-1.6.7.7 shell
shell@shamu:/ $
Alex P.
  • 30,437
  • 17
  • 118
  • 169
8

Maybe I can help you, I was able to solve this issue by changing the device ID/Serial:

  1. adb shell
  2. cd /sys/class/android_usb/android0/
  3. echo -n xxx > iSerial (the xxx is the device id you want)
  4. cat iSerial (check the new device id)
  5. Unplug usb cable and plug again, then the change worked.

To change each id, your PC should only be connected to one device via usb.

António Almeida
  • 9,620
  • 8
  • 59
  • 66
胡亚军
  • 104
  • 1