|
|
|
@ -505,10 +505,23 @@ Suppose that this server is accessible at 192.168.1.2. Then, from another
|
|
|
|
|
terminal, run `scrcpy`:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# in bash
|
|
|
|
|
export ADB_SERVER_SOCKET=tcp:192.168.1.2:5037
|
|
|
|
|
scrcpy --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` tunnel
|
|
|
|
|
establishment (typically `27183`, see `--port`). It is also possible to force a
|
|
|
|
|
different 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_computer
|
|
|
|
|
From another terminal, run `scrcpy`:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# in bash
|
|
|
|
|
export ADB_SERVER_SOCKET=tcp:localhost:5038
|
|
|
|
|
scrcpy
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```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 connection
|
|
|
|
|
instead (notice the `-L` instead of `-R`):
|
|
|
|
|
|
|
|
|
@ -559,10 +585,23 @@ ssh -CN -L5038:localhost:5037 -L27183:localhost:27183 your_remote_computer
|
|
|
|
|
From another terminal, run `scrcpy`:
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# in bash
|
|
|
|
|
export ADB_SERVER_SOCKET=tcp:localhost:5038
|
|
|
|
|
scrcpy --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:
|
|
|
|
|
|
|
|
|
|