MyGit

v1.21

Genymobile/scrcpy

版本发布时间: 2021-11-30 05:35:08

Genymobile/scrcpy最新发布版本:v2.7(2024-09-16 03:30:02)

To receive a notification on new releases, click on Watch > Releases only on the top.


scrcpy v1.21

Changes since v1.20:

NOTE: This version does not work on Windows 7 (#2838). A development version including a fix is available here: #2840.


Highlights

Simplify TCP/IP (wireless) configuration

Scrcpy uses adb to communicate with the device. To use scrcpy wirelessly, the users had to find the device IP address and connect via TCP/IP using adb directly.

For convenience, this version introduces a new option to configure TCP/IP connections automatically, with 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:

scrcpy --tcpip=192.168.1.1       # default port is 5555
scrcpy --tcpip=192.168.1.1:5555

If the adb TCP/IP mode is disabled (or if you don't know the IP address), connect the device over USB, then run:

scrcpy --tcpip    # without arguments

It will automatically find the device IP address (by parsing adb shell ip route), enable TCP/IP mode, then connects to the device before starting.

Configure tunneling

Two new options --tunnel-host and --tunnel-port (implemented by @RipleyTom) allow to connect to a remote ADB server. This allows for example to mirror a device plugged on another computer easily.

To connect to a remote ADB server (for example 192.168.1.2), make the server listen on all interfaces:

adb kill-server
adb -a nodaemon server start
# keep this open

Then, from another terminal, run scrcpy:

export ADB_SERVER_SOCKET=tcp:192.168.1.2:5037
scrcpy --tunnel-host=192.168.1.2

Note that all ADB communications between the server and the client are unencrypted.

To connect to a remote ADB server over the Internet, it is strongly recommended to use a SSH tunnel instead.

Improve Android 12 support

The way scrcpy was accessing to the settings is now blocked in Android 12 due to permission changes. In practice, --stay-awake (#2671) and --show-touches (#2788) were broken.

An alternative implementation (#2802) fixes the issue.

Add "raw key events" mode

There are two kinds of events generated when typing text:

By default, letters are injected using key events, so that the keyboard behaves as expected in games (typically for WASD keys).

An option --prefer-text allows to inject text events even for letters and space (see text injection preference).

This version introduces a new option (--raw-key-events, #2831), which always injects key events and ignores all text events.

This will typically result in the insertion of wrong characters for some keyboard layouts, but it may help a lot with some others (e.g. Chinese).

This option is only meaningful for the default injection method: with HID keyboard (--hid-keyboard), all keys are sent as scancodes.

Fix hanging on multiple instances on Windows

Scrcpy v1.20 introduced an important regression on Windows, preventing to launch several scrcpy instances simultaneously on Windows (#2779). It is fixed (by #2783) in this new version.

HID keyboard and Ctrl+v

To allow seamless copy-paste (see v1.15 highlights), on Ctrl+v, a request to synchronize the computer clipboard to the device clipboard is performed before injecting Ctrl+v.

But when HID keyboard (introduced in scrcpy v1.20), is enabled, the Ctrl+v injection is not sent on the same channel as the clipboard request, so they are not serialized, and may occur in any order. As a consequence, it could happen that the old clipboard content was pasted instead of the new one.

In v1.20, to minimize the probability of occurrence of the wrong order, a delay of 2 milliseconds was added before injecting Ctrl+v: e4163321f00bb3830c6049bdb6c1515e7cc668a0. Then it was increased to 5ms: 45b0f8123a52f5c73a5860d616f4ceba2766ca6a. But even with 5ms, the wrong behavior sometimes happens.

To handle it properly, this new version implements an acknowledgment mechanism, so that Ctrl+v is injected over AOA only after the clipboard synchronization request has been performed and acknowledged by the server (#2814).

This ensures that Ctrl+v with an HID keyboard always pastes the expected content.

Optionally disable seamless copy-paste

By default, scrcpy automatically synchronizes the computer clipboard to the device clipboard before injecting Ctrl+v, and the device clipboard to the computer clipboard whenever it changes.

A new option --no-clipboard-autosync disables this automatic synchronization. This also disables the acknowledgment mechanism described above.

The scrcpy shortcuts MOD+c, MOD+x and MOD+v still allow explicit copy, cut and paste, even in this mode.

相关地址:原始地址 下载(tar) 下载(zip)

1、 scrcpy-server-v1.21 39.13KB

2、 scrcpy-win32-v1.21.zip 21.69MB

3、 scrcpy-win64-v1.21.zip 25.28MB

4、 SHA256SUMS.txt 264B

5、 SHA256SUMS.txt.asc 833B

查看:2021-11-30发行的版本