Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
d25f38266d | |||
637f48f360 |
@ -1,4 +1,4 @@
|
|||||||
# scrcpy (v2.1)
|
# scrcpy (v2.1.1)
|
||||||
|
|
||||||
<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
|
<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
|
||||||
|
|
||||||
@ -68,10 +68,11 @@ mode](doc/hid-otg.md#otg).
|
|||||||
The application provides a lot of features and configuration options. They are
|
The application provides a lot of features and configuration options. They are
|
||||||
documented in the following pages:
|
documented in the following pages:
|
||||||
|
|
||||||
- [Device](doc/device.md)
|
- [Connection](doc/connection.md)
|
||||||
- [Video](doc/video.md)
|
- [Video](doc/video.md)
|
||||||
- [Audio](doc/audio.md)
|
- [Audio](doc/audio.md)
|
||||||
- [Control](doc/control.md)
|
- [Control](doc/control.md)
|
||||||
|
- [Device](doc/device.md)
|
||||||
- [Window](doc/window.md)
|
- [Window](doc/window.md)
|
||||||
- [Recording](doc/recording.md)
|
- [Recording](doc/recording.md)
|
||||||
- [Tunnels](doc/tunnels.md)
|
- [Tunnels](doc/tunnels.md)
|
||||||
|
@ -233,10 +233,10 @@ install` must be run as root)._
|
|||||||
|
|
||||||
#### Option 2: Use prebuilt server
|
#### Option 2: Use prebuilt server
|
||||||
|
|
||||||
- [`scrcpy-server-v2.1`][direct-scrcpy-server]
|
- [`scrcpy-server-v2.1.1`][direct-scrcpy-server]
|
||||||
<sub>SHA-256: `5b8bf1940264b930c71a1c614c57da2247f52b2d4240bca865cc6d366dff6688`</sub>
|
<sub>SHA-256: `9558db6c56743a1dc03b38f59801fb40e91cc891f8fc0c89e5b0b067761f148e`</sub>
|
||||||
|
|
||||||
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-server-v2.1
|
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-server-v2.1.1
|
||||||
|
|
||||||
Download the prebuilt server somewhere, and specify its path during the Meson
|
Download the prebuilt server somewhere, and specify its path during the Meson
|
||||||
configuration:
|
configuration:
|
||||||
|
125
doc/connection.md
Normal file
125
doc/connection.md
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
# Connection
|
||||||
|
|
||||||
|
## Selection
|
||||||
|
|
||||||
|
If exactly one device is connected (i.e. listed by `adb devices`), then it is
|
||||||
|
automatically selected.
|
||||||
|
|
||||||
|
However, if there are multiple devices connected, you must specify the one to
|
||||||
|
use in one of 4 ways:
|
||||||
|
- by its serial:
|
||||||
|
```bash
|
||||||
|
scrcpy --serial=0123456789abcdef
|
||||||
|
scrcpy -s 0123456789abcdef # short version
|
||||||
|
|
||||||
|
# the serial is the ip:port if connected over TCP/IP (same behavior as adb)
|
||||||
|
scrcpy --serial=192.168.1.1:5555
|
||||||
|
```
|
||||||
|
- the one connected over USB (if there is exactly one):
|
||||||
|
```bash
|
||||||
|
scrcpy --select-usb
|
||||||
|
scrcpy -d # short version
|
||||||
|
```
|
||||||
|
- the one connected over TCP/IP (if there is exactly one):
|
||||||
|
```bash
|
||||||
|
scrcpy --select-tcpip
|
||||||
|
scrcpy -e # short version
|
||||||
|
```
|
||||||
|
- a device already listening on TCP/IP (see [below](#tcpip-wireless)):
|
||||||
|
```bash
|
||||||
|
scrcpy --tcpip=192.168.1.1:5555
|
||||||
|
scrcpy --tcpip=192.168.1.1 # default port is 5555
|
||||||
|
```
|
||||||
|
|
||||||
|
The serial may also be provided via the environment variable `ANDROID_SERIAL`
|
||||||
|
(also used by `adb`):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# in bash
|
||||||
|
export ANDROID_SERIAL=0123456789abcdef
|
||||||
|
scrcpy
|
||||||
|
```
|
||||||
|
|
||||||
|
```cmd
|
||||||
|
:: in cmd
|
||||||
|
set ANDROID_SERIAL=0123456789abcdef
|
||||||
|
scrcpy
|
||||||
|
```
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# in PowerShell
|
||||||
|
$env:ANDROID_SERIAL = '0123456789abcdef'
|
||||||
|
scrcpy
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## TCP/IP (wireless)
|
||||||
|
|
||||||
|
_Scrcpy_ uses `adb` to communicate with the device, and `adb` can [connect] to a
|
||||||
|
device over TCP/IP. The device must be connected on the same network as the
|
||||||
|
computer.
|
||||||
|
|
||||||
|
[connect]: https://developer.android.com/studio/command-line/adb.html#wireless
|
||||||
|
|
||||||
|
|
||||||
|
### Automatic
|
||||||
|
|
||||||
|
An option `--tcpip` allows to configure the connection automatically. There are
|
||||||
|
two variants.
|
||||||
|
|
||||||
|
If the device (accessible at 192.168.1.1 in this example) already listens on a
|
||||||
|
port (typically 5555) for incoming _adb_ connections, then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scrcpy --tcpip=192.168.1.1 # default port is 5555
|
||||||
|
scrcpy --tcpip=192.168.1.1:5555
|
||||||
|
```
|
||||||
|
|
||||||
|
If _adb_ TCP/IP mode is disabled on the device (or if you don't know the IP
|
||||||
|
address), connect the device over USB, then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scrcpy --tcpip # without arguments
|
||||||
|
```
|
||||||
|
|
||||||
|
It will automatically find the device IP address and adb port, enable TCP/IP
|
||||||
|
mode if necessary, then connect to the device before starting.
|
||||||
|
|
||||||
|
|
||||||
|
### Manual
|
||||||
|
|
||||||
|
Alternatively, it is possible to enable the TCP/IP connection manually using
|
||||||
|
`adb`:
|
||||||
|
|
||||||
|
1. Plug the device into a USB port on your computer.
|
||||||
|
2. Connect the device to the same Wi-Fi network as your computer.
|
||||||
|
3. Get your device IP address, in Settings → About phone → Status, or by
|
||||||
|
executing this command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
adb shell ip route | awk '{print $9}'
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Enable `adb` over TCP/IP on your device: `adb tcpip 5555`.
|
||||||
|
5. Unplug your device.
|
||||||
|
6. Connect to your device: `adb connect DEVICE_IP:5555` _(replace `DEVICE_IP`
|
||||||
|
with the device IP address you found)_.
|
||||||
|
7. Run `scrcpy` as usual.
|
||||||
|
8. Run `adb disconnect` once you're done.
|
||||||
|
|
||||||
|
Since Android 11, a [wireless debugging option][adb-wireless] allows to bypass
|
||||||
|
having to physically connect your device directly to your computer.
|
||||||
|
|
||||||
|
[adb-wireless]: https://developer.android.com/studio/command-line/adb#wireless-android11-command-line
|
||||||
|
|
||||||
|
|
||||||
|
## Autostart
|
||||||
|
|
||||||
|
A small tool (by the scrcpy author) allows to run arbitrary commands whenever a
|
||||||
|
new Android device is connected: [AutoAdb]. It can be used to start scrcpy:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
autoadb scrcpy -s '{}'
|
||||||
|
```
|
||||||
|
|
||||||
|
[AutoAdb]: https://github.com/rom1v/autoadb
|
141
doc/device.md
141
doc/device.md
@ -1,130 +1,5 @@
|
|||||||
# Device
|
# Device
|
||||||
|
|
||||||
## Selection
|
|
||||||
|
|
||||||
If exactly one device is connected (i.e. listed by `adb devices`), then it is
|
|
||||||
automatically selected.
|
|
||||||
|
|
||||||
However, if there are multiple devices connected, you must specify the one to
|
|
||||||
use in one of 4 ways:
|
|
||||||
- by its serial:
|
|
||||||
```bash
|
|
||||||
scrcpy --serial=0123456789abcdef
|
|
||||||
scrcpy -s 0123456789abcdef # short version
|
|
||||||
|
|
||||||
# the serial is the ip:port if connected over TCP/IP (same behavior as adb)
|
|
||||||
scrcpy --serial=192.168.1.1:5555
|
|
||||||
```
|
|
||||||
- the one connected over USB (if there is exactly one):
|
|
||||||
```bash
|
|
||||||
scrcpy --select-usb
|
|
||||||
scrcpy -d # short version
|
|
||||||
```
|
|
||||||
- the one connected over TCP/IP (if there is exactly one):
|
|
||||||
```bash
|
|
||||||
scrcpy --select-tcpip
|
|
||||||
scrcpy -e # short version
|
|
||||||
```
|
|
||||||
- a device already listening on TCP/IP (see [below](#tcpip-wireless)):
|
|
||||||
```bash
|
|
||||||
scrcpy --tcpip=192.168.1.1:5555
|
|
||||||
scrcpy --tcpip=192.168.1.1 # default port is 5555
|
|
||||||
```
|
|
||||||
|
|
||||||
The serial may also be provided via the environment variable `ANDROID_SERIAL`
|
|
||||||
(also used by `adb`):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# in bash
|
|
||||||
export ANDROID_SERIAL=0123456789abcdef
|
|
||||||
scrcpy
|
|
||||||
```
|
|
||||||
|
|
||||||
```cmd
|
|
||||||
:: in cmd
|
|
||||||
set ANDROID_SERIAL=0123456789abcdef
|
|
||||||
scrcpy
|
|
||||||
```
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
# in PowerShell
|
|
||||||
$env:ANDROID_SERIAL = '0123456789abcdef'
|
|
||||||
scrcpy
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## TCP/IP (wireless)
|
|
||||||
|
|
||||||
_Scrcpy_ uses `adb` to communicate with the device, and `adb` can [connect] to a
|
|
||||||
device over TCP/IP. The device must be connected on the same network as the
|
|
||||||
computer.
|
|
||||||
|
|
||||||
[connect]: https://developer.android.com/studio/command-line/adb.html#wireless
|
|
||||||
|
|
||||||
|
|
||||||
### Automatic
|
|
||||||
|
|
||||||
An option `--tcpip` allows to configure the connection automatically. There are
|
|
||||||
two variants.
|
|
||||||
|
|
||||||
If the device (accessible at 192.168.1.1 in this example) already listens on a
|
|
||||||
port (typically 5555) for incoming _adb_ connections, then run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scrcpy --tcpip=192.168.1.1 # default port is 5555
|
|
||||||
scrcpy --tcpip=192.168.1.1:5555
|
|
||||||
```
|
|
||||||
|
|
||||||
If _adb_ TCP/IP mode is disabled on the device (or if you don't know the IP
|
|
||||||
address), connect the device over USB, then run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
scrcpy --tcpip # without arguments
|
|
||||||
```
|
|
||||||
|
|
||||||
It will automatically find the device IP address and adb port, enable TCP/IP
|
|
||||||
mode if necessary, then connect to the device before starting.
|
|
||||||
|
|
||||||
|
|
||||||
### Manual
|
|
||||||
|
|
||||||
Alternatively, it is possible to enable the TCP/IP connection manually using
|
|
||||||
`adb`:
|
|
||||||
|
|
||||||
1. Plug the device into a USB port on your computer.
|
|
||||||
2. Connect the device to the same Wi-Fi network as your computer.
|
|
||||||
3. Get your device IP address, in Settings → About phone → Status, or by
|
|
||||||
executing this command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
adb shell ip route | awk '{print $9}'
|
|
||||||
```
|
|
||||||
|
|
||||||
4. Enable `adb` over TCP/IP on your device: `adb tcpip 5555`.
|
|
||||||
5. Unplug your device.
|
|
||||||
6. Connect to your device: `adb connect DEVICE_IP:5555` _(replace `DEVICE_IP`
|
|
||||||
with the device IP address you found)_.
|
|
||||||
7. Run `scrcpy` as usual.
|
|
||||||
8. Run `adb disconnect` once you're done.
|
|
||||||
|
|
||||||
Since Android 11, a [wireless debugging option][adb-wireless] allows to bypass
|
|
||||||
having to physically connect your device directly to your computer.
|
|
||||||
|
|
||||||
[adb-wireless]: https://developer.android.com/studio/command-line/adb#wireless-android11-command-line
|
|
||||||
|
|
||||||
|
|
||||||
## Autostart
|
|
||||||
|
|
||||||
A small tool (by the scrcpy author) allows to run arbitrary commands whenever a
|
|
||||||
new Android device is connected: [AutoAdb]. It can be used to start scrcpy:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
autoadb scrcpy -s '{}'
|
|
||||||
```
|
|
||||||
|
|
||||||
[AutoAdb]: https://github.com/rom1v/autoadb
|
|
||||||
|
|
||||||
|
|
||||||
## Display
|
## Display
|
||||||
|
|
||||||
If several displays are available on the Android device, it is possible to
|
If several displays are available on the Android device, it is possible to
|
||||||
@ -144,13 +19,7 @@ A secondary display may only be controlled if the device runs at least Android
|
|||||||
10 (otherwise it is mirrored as read-only).
|
10 (otherwise it is mirrored as read-only).
|
||||||
|
|
||||||
|
|
||||||
## Actions
|
## Stay awake
|
||||||
|
|
||||||
Some command line arguments perform actions on the device itself while scrcpy is
|
|
||||||
running.
|
|
||||||
|
|
||||||
|
|
||||||
### Stay awake
|
|
||||||
|
|
||||||
To prevent the device from sleeping after a delay **when the device is plugged
|
To prevent the device from sleeping after a delay **when the device is plugged
|
||||||
in**:
|
in**:
|
||||||
@ -166,7 +35,7 @@ If the device is not plugged in (i.e. only connected over TCP/IP),
|
|||||||
`--stay-awake` has no effect (this is the Android behavior).
|
`--stay-awake` has no effect (this is the Android behavior).
|
||||||
|
|
||||||
|
|
||||||
### Turn screen off
|
## Turn screen off
|
||||||
|
|
||||||
It is possible to turn the device screen off while mirroring on start with a
|
It is possible to turn the device screen off while mirroring on start with a
|
||||||
command-line option:
|
command-line option:
|
||||||
@ -194,7 +63,7 @@ scrcpy -Sw # short version
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Show touches
|
## Show touches
|
||||||
|
|
||||||
For presentations, it may be useful to show physical touches (on the physical
|
For presentations, it may be useful to show physical touches (on the physical
|
||||||
device). Android exposes this feature in _Developers options_.
|
device). Android exposes this feature in _Developers options_.
|
||||||
@ -210,7 +79,7 @@ scrcpy -t # short version
|
|||||||
Note that it only shows _physical_ touches (by a finger on the device).
|
Note that it only shows _physical_ touches (by a finger on the device).
|
||||||
|
|
||||||
|
|
||||||
### Power off on close
|
## Power off on close
|
||||||
|
|
||||||
To turn the device screen off when closing _scrcpy_:
|
To turn the device screen off when closing _scrcpy_:
|
||||||
|
|
||||||
@ -218,7 +87,7 @@ To turn the device screen off when closing _scrcpy_:
|
|||||||
scrcpy --power-off-on-close
|
scrcpy --power-off-on-close
|
||||||
```
|
```
|
||||||
|
|
||||||
### Power on on start
|
## Power on on start
|
||||||
|
|
||||||
By default, on start, the device is powered on. To prevent this behavior:
|
By default, on start, the device is powered on. To prevent this behavior:
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
Download the [latest release]:
|
Download the [latest release]:
|
||||||
|
|
||||||
- [`scrcpy-win64-v2.1.zip`][direct-win64] (64-bit)
|
- [`scrcpy-win64-v2.1.1.zip`][direct-win64] (64-bit)
|
||||||
<sub>SHA-256: `57b98813322c8b5b560ada68714a2cd7b7efe64086fa61d03e389c23212c803d`</sub>
|
<sub>SHA-256: `f77281e1bce2f9934617699c581f063d5b327f012eff602ee98fb2ef550c25c2`</sub>
|
||||||
- [`scrcpy-win32-v2.1.zip`][direct-win32] (32-bit)
|
- [`scrcpy-win32-v2.1.1.zip`][direct-win32] (32-bit)
|
||||||
<sub>SHA-256: `4d261d391a60ea975440d83cdc22f8250b3c8985f2ece8c7e53d6fb26c0d74ed`</sub>
|
<sub>SHA-256: `ef7ae7fbe9449f2643febdc2244fb186d1a746a3c736394150cfd14f06d3c943`</sub>
|
||||||
|
|
||||||
[latest release]: https://github.com/Genymobile/scrcpy/releases/latest
|
[latest release]: https://github.com/Genymobile/scrcpy/releases/latest
|
||||||
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-win64-v2.1.zip
|
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-win64-v2.1.1.zip
|
||||||
[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-win32-v2.1.zip
|
[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-win32-v2.1.1.zip
|
||||||
|
|
||||||
and extract it.
|
and extract it.
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
BUILDDIR=build-auto
|
BUILDDIR=build-auto
|
||||||
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.1/scrcpy-server-v2.1
|
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.1.1/scrcpy-server-v2.1.1
|
||||||
PREBUILT_SERVER_SHA256=5b8bf1940264b930c71a1c614c57da2247f52b2d4240bca865cc6d366dff6688
|
PREBUILT_SERVER_SHA256=9558db6c56743a1dc03b38f59801fb40e91cc891f8fc0c89e5b0b067761f148e
|
||||||
|
|
||||||
echo "[scrcpy] Downloading prebuilt server..."
|
echo "[scrcpy] Downloading prebuilt server..."
|
||||||
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
||||||
|
Reference in New Issue
Block a user