Document envvars for all platforms
Document how to set environment variables from the terminal for bash, cmd and PowerShell.
This commit is contained in:
parent
a83c3e30f3
commit
ed84e18b1a
2 changed files with 52 additions and 0 deletions
13
FAQ.md
13
FAQ.md
|
@ -103,10 +103,23 @@ You could overwrite the `adb` binary in the other program, or ask _scrcpy_ to
|
|||
use a specific `adb` binary, by setting the `ADB` environment variable:
|
||||
|
||||
```bash
|
||||
# in bash
|
||||
export ADB=/path/to/your/adb
|
||||
scrcpy
|
||||
```
|
||||
|
||||
```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 disconnected
|
||||
|
||||
|
|
39
README.md
39
README.md
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in a new issue