Add --force-adb-forward

Add a command-line option to force "adb forward", without attempting
"adb reverse" first.

This is especially useful for using SSH tunnels without enabling remote
port forwarding.
This commit is contained in:
Romain Vimont
2020-05-24 23:27:34 +02:00
parent ee3882f8be
commit 8f46e18426
7 changed files with 48 additions and 8 deletions

View File

@@ -289,6 +289,22 @@ From another terminal:
scrcpy
```
To avoid enabling remote port forwarding, you could force a forward connection
instead (notice the `-L` instead of `-R`):
```bash
adb kill-server # kill the local adb server on 5037
ssh -CN -L5037:localhost:5037 -L27183:localhost:27183 your_remote_computer
# keep this open
```
From another terminal:
```bash
scrcpy --force-adb-forwrad
```
Like for wireless connections, it may be useful to reduce quality:
```