Use $ANDROID_SERIAL if no selector is specified

Like adb, read the ANDROID_SERIAL environment variable to select a
device by serial if no explicit selection (-s, -d, -e or --tcpip=<addr>)
is provided via the command line.

Fixes #3111 <https://github.com/Genymobile/scrcpy/issues/3111>
PR #3113 <https://github.com/Genymobile/scrcpy/pull/3113>
This commit is contained in:
Romain Vimont
2022-03-14 12:29:33 +01:00
parent b1dbc30072
commit 4ce7af42c6
4 changed files with 21 additions and 1 deletions

View File

@@ -448,6 +448,9 @@ scrcpy --serial 0123456789abcdef
scrcpy -s 0123456789abcdef # short version
```
The serial may also be provided via the environment variable `ANDROID_SERIAL`
(also used by `adb`).
If the device is connected over TCP/IP:
```bash