This question already has answers here:
Closed 3 years ago.
I have 2 Android devices connected via usb to my pc
now when i list devices i get this:
C:\Users\MBH>adb devices
List of devices attached
0123456789ABCDEF device
0123456789ABCDEF device
Both devices got the same serial number, or whatever this 0123456789ABCDEF means.
The problem: I am not able to do anything in this case, neither pushing or pulling files, nor forwarding tcp ports.
C:\Users\MBH>adb forward tcp:59900 tcp:59900
error: more than one device/emulator
C:\Users\MBH>adb -s 0123456789ABCDEF forward tcp:59900 tcp:59900
error: more than one device
The question: is there anyway to connect or select device in different way? like device model number or something?
I got it
C:\Users\MBH>adb devices -l
List of devices attached
0123456789ABCDEF device product:ZEN model:ZEN device:ZEN
0123456789ABCDEF device product:full_gs702c model:M757 device:gs702c
Then I could use the model number for shelling
C:\Users\MBH>adb -s model:M757 shell
shell@gs702c:/ $ ls
it works now
You can run every command of adb by selecting the device by deviceID.
run command to get Device Id:
adb devices
you will get the list of all available devices something like this:
<device ID> device
emulator-5554 offline
the copy the device id run commad like this:
adb -s <device ID> <your command>
example:
adb -s <device ID> tcpip 5555
OR
adb -s <device ID> forward tcp:59900 tcp:59900
this will not get the error like "more than one device/emulator"
Thanks