Cannot connect to multiple devices using the --serial argument
- [ I think so] I have read the FAQ.
- [ Yes but none had a solution - maybe I can try detailing it more] I have searched in existing issues.
Environment
- OS: Windows 11
- scrcpy version: Latest at this time
- installation method: Windows release
- device model: Firesticks OS 5 & OS 7
- Android version: 5 & 7
Describe the bug scrcpy works fine for a single adb connected device in which I specify the --serial=ip:port However attempting to connect to two devices simultaneously results in the following (P.S I saw the thread about tunneling but I have no tunneling inbetween) :
CLIENT 1 COMMAND WORKS: scrcpy --serial=ip1:5555 --max-size=1024 -b 200000 CLIENT 2 COMMAND DOES NOT WORK: scrcpy --serial=ip2:5555 --max-size=1024 -b 200000 where ip1 is the first IP of firestick 1 and ip2 is the first IP of firestick 2 Both are on the same network
If I try client 2's connection first and then client 1, client 2 works as well, but client 1 does not.
adb.exe: error: more than one device and emulator
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27183, retrying on 27184
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27184, retrying on 27185
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27185, retrying on 27186
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27186, retrying on 27187
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27187, retrying on 27188
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27188, retrying on 27189
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27189, retrying on 27190
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27190, retrying on 27191
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27191, retrying on 27192
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27192, retrying on 27193
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27193, retrying on 27194
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27194, retrying on 27195
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27195, retrying on 27196
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27196, retrying on 27197
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27197, retrying on 27198
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
WARN: Could not forward port 27198, retrying on 27199
adb.exe: error: more than one device/emulator
ERROR: "adb forward" returned with value 1
ERROR: Could not forward any port in range 27183:27199
ERROR: Server connection failed
adb.exe: error: more than one device and emulator ERROR: "adb reverse" returned with value 1 WARN: 'adb reverse' failed, fallback to 'adb forward'
I bet this is with your Android 5 device: #5.
adb.exe: error: more than one device/emulator ERROR: "adb forward" returned with value 1 WARN: Could not forward port 27183, retrying on 27184
This one is not expected (the bug in Android 5 was specific to adb reverse), you should never get the error more than one device/emulator with adb forward (scrcpy always passes -s <serial>).
When this happens, try manually:
adb forward -s ip:5555 tcp:27183 localabstract:scrcpy
What is the output/error?
scrcpy version: Latest at this time
What is your exact scrcpy version?