Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tunnels work fail for multiple devices #3370

Open
2 tasks done
GentLiu opened this issue Jul 6, 2022 · 1 comment
Open
2 tasks done

Tunnels work fail for multiple devices #3370

GentLiu opened this issue Jul 6, 2022 · 1 comment

Comments

@GentLiu
Copy link

GentLiu commented Jul 6, 2022

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: [e.g. Debian, Windows, macOS...]
  • scrcpy version: [e.g. 1.24]
  • installation method: [Windows release]
  • device model:
  • Android version: [11]

Describe the bug
When multiple devices are connected, they cannot work normally,when a device is connected, it can work normally

One device:

C:\Users\gentliu>scrcpy.exe --serial=HZQN1876DAK60100141 --max-size=1024 --bit-rate=2M --encoder=OMX.google.h264.encoder --max-fps=15 --verbosity=verbose --force-adb-forward --tunnel-port=5039
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
DEBUG: ADB device found:
DEBUG:     -->   (usb)   HZQN1876DAK60100141            device  Nokia_8_3_5G
DEBUG: Device serial: HZQN1876DAK60100141
DEBUG: Using server (portable): D:\Green\scrcpy-win64-v1.24\scrcpy-server
D:\Green\scrcpy-win64-v1.24\scrcpy-server: 1 file pushed, 0 skipped. 16.3 MB/s (41159 bytes in 0.002s)
DEBUG: Remaining connection attempts: 100
DEBUG: Remaining connection attempts: 99
DEBUG: Remaining connection attempts: 98
DEBUG: Remaining connection attempts: 97
DEBUG: Remaining connection attempts: 96
DEBUG: Remaining connection attempts: 95
DEBUG: Remaining connection attempts: 94
DEBUG: Remaining connection attempts: 93
DEBUG: Remaining connection attempts: 92
[server] INFO: Device: HMD Global Nokia 8.3 5G (Android 12)
[server] DEBUG: Creating encoder by name: 'OMX.google.h264.encoder'
DEBUG: Server connected
DEBUG: Starting controller thread
DEBUG: Starting receiver thread
INFO: Renderer: direct3d
DEBUG: Trilinear filtering disabled (not an OpenGL renderer)
DEBUG: Using icon (portable): D:\Green\scrcpy-win64-v1.24\icon.png
INFO: Initial texture: 464x1024
DEBUG: Starting demuxer thread

Multiple devices

C:\Users\gentliu>scrcpy.exe --serial=HZQN1876DAK60100141 --max-size=1024 --bit-rate=2M --encoder=OMX.google.h264.encoder --max-fps=15 --verbosity=verbose --force-adb-forward --tunnel-port=5039
scrcpy 1.24 <https://github.com/Genymobile/scrcpy>
DEBUG: ADB device found:
DEBUG:           (usb)              5773762F            device  N150DL
DEBUG:     -->   (usb)   HZQN1876DAK60100141            device  Nokia_8_3_5G
DEBUG: Device serial: HZQN1876DAK60100141
DEBUG: Using server (portable): D:\Green\scrcpy-win64-v1.24\scrcpy-server
D:\Green\scrcpy-win64-v1.24\scrcpy-server: 1 file pushed, 0 skipped. 9.4 MB/s (41159 bytes in 0.004s)
**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
DEBUG: User requested to quit
DEBUG: Interrupting process
ERROR: "adb forward" returned with value 3221225786
@rom1v
Copy link
Collaborator

rom1v commented Jul 8, 2022

--tunnel-port is useful when you use an additional tunnel (e.g. with Docker) between your adb daemon and your client. Did you configure such a tunnel? Use 5039 for this looks suspicious (and suggests it is conflated with the adb daemon port).

See #2807 and #3300.

If you need more help, please explain what you are trying to do.


Note about:

ERROR: "adb forward" returned with value 3221225786

This value may seem surprising, but:

$ printf '%x\n' 3221225786
c000013a

It's the status code for STATUS_CONTROL_C_EXIT: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants