Using adb with multiple devices with the same serial number<>
This question already has an answer here:
Maybe I can help you, I was able to solve this issue by changing the device ID/Serial:
- adb shell
- cd /sys/class/android_usb/android0/
- echo -n xxx > iSerial (the xxx is the device id you want)
- cat iSerial (check the new device id)
- 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.
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-22.214.171.124 product:shamu model:Nexus_6 device:shamu $ adb -s usb:2-126.96.36.199 shell shell@shamu:/ $