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:

  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.

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- product:shamu model:Nexus_6 device:shamu

$ adb -s usb:2- shell
shell@shamu:/ $

Need Your Help

Cookies not being saved right away with Rails app

ruby-on-rails web-services

I have a Rails app that is storing some user information in a cookie, and that information isn't being stored as soon as I would like. A client that is performing five requests in a row from a sin...