v1.17

Genymobile/scrcpyv1.17Jan 2, 2021by rom1v

AI Summary

This release focuses on fixing errors on Android 11, introducing encoder selection, and providing options to forward mouse clicks and legacy paste behavior.

Key Highlights

  • Fixes for Android 11 compatibility regarding `--show-touches` and `--stay-awake`.
  • New `--encoder` option to select specific H.264 encoders for better performance.
  • New `--forward-all-clicks` option to forward right and middle clicks to the device.
  • New `--legacy-paste` option for copy-paste compatibility on specific devices.

New Features

  • Android 11 fixes
  • Encoder selection
  • Forward all clicks
  • Legacy paste mode
  • Windows console/noconsole rework
  • Terminate server properly on close

Full Release Notes

_To receive a notification on new releases, click on **Watch > Releases only** on the top._

---

**scrcpy v1.17**

Changes since v1.16:
 - Fix errors on Android 11 (#1468)
 - Add --encoder option (#1810, #1827)
 - Add --forward-all-clicks option (#1302, #1613)
 - Add --legacy-paste option (#1750, #1771)
 - Workaround screen off/on issue on exit (#1670)
 - Rework console/noconsole versions on Windows (#1875, #1988)
 - Terminate server properly without killing it on close (#1992)
 - List available shortcut keys on error (#1681)
 - Upgrade platform-tools to 30.0.5 (adb) in Windows releases
 - Upgrade SDL to 2.0.14 in Windows releases

---

# Highlights


## Android 11

The options `--show-touches` and `--stay-awake` have been broken by internal API changes in Android 11. The implementation have been adapted to work properly.


## Forward right-click and middle-click

By default, scrcpy injects BACK on right-click and HOME on middle-click.

A new option `--forward-all-clicks` has been added to forward these clicks to the device instead.


## Copy-paste workaround

Copy-paste have been improved by previous releases, especially [v1.15](https://github.com/Genymobile/scrcpy/releases/tag/v1.15).

However, setting the device clipboard programmatically does not work properly on some devices, causing confusing behavior (injecting <kbd>PASTE</kbd> does not paste the content set programmatically).

As a workaround, an option `--legacy-paste` is provided to change the behavior of <kbd>Ctrl</kbd>+<kbd>v</kbd> and <kbd>MOD</kbd>+<kbd>v</kbd> so that they also inject the computer clipboard text as a sequence of key events (the [same way](https://github.com/Genymobile/scrcpy#copy-paste) as <kbd>MOD</kbd>+<kbd>Shift</kbd>+<kbd>v</kbd>).


## Screen off workarounds

Scrcpy v1.15 added restoration of the power mode on exit, to avoid leaving the physical screen off (enabled by `--turn-screen-off` or
<kbd>MOD</kbd>+<kbd>o</kbd>).

However, restoring the power mode while the device screen was off caused unexpected behaviors (even if the "screen off" feature was not used). Therefore, if the screen was off, don't try to restore the power mode, the state is already as expected.


## Encoder selection

Some devices provide several encoders, and some of them may not work well.

A new option `--encoder` allows to select another available H.264 encoder.


## Windows console/noconsole

Scrcpy is a command-line tool, so it does not suit Windows very well.

By default, running `scrcpy.exe` opens a new console, which is closed as soon as the process terminates. To let the user a chance to read any error message, a "pause" was implemented on error, but this caused issues for scripting (#1875).

In addition, to avoid opening a new terminal, a separate binary was provided with a special linking flag.

To simplify, these hacks have been moved into Windows-specific wrapper scripts:
 - `scrcpy.exe` is the main binary, with the same behavior as on other platforms (no pause on error)
 - `scrcpy-console.bat` is a simple wrapper script to pause on error
 - `scrcpy-noconsole.vbs` a one-line VBS script to start `scrcpy.exe` without a console