Display and control your Android device
Document envvars for all platforms
Romain Vimonted84e18b1ae3
diff --git a/FAQ.md b/FAQ.mdindex 0cebeeb7..f6a8f226 100644--- a/FAQ.md+++ b/FAQ.md@@ -103,10 +103,23 @@ You could overwrite the `adb` binary in the other program, or ask _scrcpy_ touse a specific `adb` binary, by setting the `ADB` environment variable:```bash+# in bashexport ADB=/path/to/your/adbscrcpy```+```cmd+:: in cmd+set ADB=C:\path\to\your\adb.exe+scrcpy+```++```powershell+# in PowerShell+$env:ADB = 'C:\path\to\your\adb.exe'+scrcpy+```+### Device disconnecteddiff --git a/README.md b/README.mdindex 20ad0f9c..db531c61 100644--- a/README.md+++ b/README.md@@ -505,10 +505,23 @@ Suppose that this server is accessible at 192.168.1.2. Then, from anotherterminal, run `scrcpy`:```bash+# in bashexport ADB_SERVER_SOCKET=tcp:192.168.1.2:5037scrcpy --tunnel-host=192.168.1.2```+```cmd+:: in cmd+set ADB_SERVER_SOCKET=tcp:192.168.1.2:5037+scrcpy --tunnel-host=192.168.1.2+```++```powershell+# in PowerShell+$env:ADB_SERVER_SOCKET = 'tcp:192.168.1.2:5037'+scrcpy --tunnel-host=192.168.1.2+```+By default, `scrcpy` uses the local port used for `adb forward` tunnelestablishment (typically `27183`, see `--port`). It is also possible to force adifferent tunnel port (it may be useful in more complex situations, when more@@ -542,10 +555,23 @@ ssh -CN -L5038:localhost:5037 -R27183:localhost:27183 your_remote_computerFrom another terminal, run `scrcpy`:```bash+# in bashexport ADB_SERVER_SOCKET=tcp:localhost:5038scrcpy```+```cmd+:: in cmd+set ADB_SERVER_SOCKET=tcp:localhost:5038+scrcpy+```++```powershell+# in PowerShell+$env:ADB_SERVER_SOCKET = 'tcp:localhost:5038'+scrcpy+```+To avoid enabling remote port forwarding, you could force a forward connectioninstead (notice the `-L` instead of `-R`):@@ -559,10 +585,23 @@ ssh -CN -L5038:localhost:5037 -L27183:localhost:27183 your_remote_computerFrom another terminal, run `scrcpy`:```bash+# in bashexport ADB_SERVER_SOCKET=tcp:localhost:5038scrcpy --force-adb-forward```+```cmd+:: in cmd+set ADB_SERVER_SOCKET=tcp:localhost:5038+scrcpy --force-adb-forward+```++```powershell+# in PowerShell+$env:ADB_SERVER_SOCKET = 'tcp:localhost:5038'+scrcpy --force-adb-forward+```+Like for wireless connections, it may be useful to reduce quality: