Scrcpy: How to make scrcpy run with a custom port adb server

Created on 21 Aug 2020  路  5Comments  路  Source: Genymobile/scrcpy

adb server can use -P to open a custom port.

However, scrcpy always checks the default adb server on 5037
If 5037 is not opened, it will run adb start-server on the default port 5037

How to make scrcpy run with a custom port adb server

image

All 5 comments

adb reads the environment variable ADB_SERVER_SOCKET:

export ADB_SERVER_SOCKET=tcp:localhost:1234
scrcpy

thanks a lot!

If I start multiple adb servers on different ports
How to run multiple scrcpy and specify different adb port?
image

Just execute each scrcpy with a different value for the environment variable. For example:

ADB_SERVER_SOCKET=tcp:localhost:1234 scrcpy
ADB_SERVER_SOCKET=tcp:localhost:1235 scrcpy

thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mttmllns picture mttmllns  路  3Comments

jonnybrooks picture jonnybrooks  路  3Comments

udit7395 picture udit7395  路  4Comments

BloodPHamtOm picture BloodPHamtOm  路  3Comments

sennight picture sennight  路  3Comments