Merge branch 'master' into release

This commit is contained in:
Romain Vimont 2025-03-29 15:44:29 +01:00
commit 79227af89f
8 changed files with 62 additions and 43 deletions

View file

@ -188,7 +188,7 @@
identification within third-party archives. identification within third-party archives.
Copyright (C) 2018 Genymobile Copyright (C) 2018 Genymobile
Copyright (C) 2018-2024 Romain Vimont Copyright (C) 2018-2025 Romain Vimont
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -8,10 +8,10 @@ their name contains `scrcpy`.**
_pronounced "**scr**een **c**o**py**"_ _pronounced "**scr**een **c**o**py**"_
This application mirrors Android devices (video and audio) connected via This application mirrors Android devices (video and audio) connected via USB or
USB or [over TCP/IP](doc/connection.md#tcpip-wireless), and allows to control the [TCP/IP](doc/connection.md#tcpip-wireless) and allows control using the
device with the keyboard and the mouse of the computer. It does not require any computer's keyboard and mouse. It does not require _root_ access or an app
_root_ access. It works on _Linux_, _Windows_ and _macOS_. installed on the device. It works on _Linux_, _Windows_, and _macOS_.
![screenshot](assets/screenshot-debian-600.jpg) ![screenshot](assets/screenshot-debian-600.jpg)
@ -78,6 +78,16 @@ Note that USB debugging is not required to run scrcpy in [OTG mode](doc/otg.md).
- [macOS](doc/macos.md) - [macOS](doc/macos.md)
## Must-know tips
- [Reducing resolution](doc/video.md#size) may greatly improve performance
(`scrcpy -m1024`)
- [_Right-click_](doc/mouse.md#mouse-bindings) triggers `BACK`
- [_Middle-click_](doc/mouse.md#mouse-bindings) triggers `HOME`
- <kbd>Alt</kbd>+<kbd>f</kbd> toggles [fullscreen](doc/window.md#fullscreen)
- There are many other [shortcuts](doc/shortcuts.md)
## Usage examples ## Usage examples
There are a lot of options, [documented](#user-documentation) in separate pages. There are a lot of options, [documented](#user-documentation) in separate pages.
@ -200,7 +210,7 @@ work][donate]:
## Licence ## Licence
Copyright (C) 2018 Genymobile Copyright (C) 2018 Genymobile
Copyright (C) 2018-2024 Romain Vimont Copyright (C) 2018-2025 Romain Vimont
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.

View file

@ -848,7 +848,7 @@ Report bugs to <https://github.com/Genymobile/scrcpy/issues>.
.SH COPYRIGHT .SH COPYRIGHT
Copyright \(co 2018 Genymobile <https://www.genymobile.com> Copyright \(co 2018 Genymobile <https://www.genymobile.com>
Copyright \(co 2018\-2024 Romain Vimont <rom@rom1v.com> Copyright \(co 2018\-2025 Romain Vimont <rom@rom1v.com>
Licensed under the Apache License, Version 2.0. Licensed under the Apache License, Version 2.0.

View file

@ -113,16 +113,17 @@ with the device IP address you found)_.
7. Run `scrcpy` as usual. 7. Run `scrcpy` as usual.
8. Run `adb disconnect` once you're done. 8. Run `adb disconnect` once you're done.
Since Android 11, a [wireless debugging option][adb-wireless] allows to bypass Since Android 11, a [wireless debugging option][adb-wireless] allows you to
having to physically connect your device directly to your computer. bypass having to physically connect your device to your computer.
[adb-wireless]: https://developer.android.com/studio/command-line/adb#wireless-android11-command-line [adb-wireless]: https://developer.android.com/studio/command-line/adb#wireless-android11-command-line
## Autostart ## Autostart
A small tool (by the scrcpy author) allows to run arbitrary commands whenever a A small tool (by the scrcpy author) allows you to run arbitrary commands
new Android device is connected: [AutoAdb]. It can be used to start scrcpy: whenever a new Android device is connected: [AutoAdb]. It can be used to start
scrcpy:
```bash ```bash
autoadb scrcpy -s '{}' autoadb scrcpy -s '{}'

View file

@ -34,6 +34,31 @@ adb shell settings put global stay_on_while_plugged_in 0
``` ```
## Screen off timeout
The Android screen automatically turns off after some delay.
To change this delay while scrcpy is running:
```bash
scrcpy --screen-off-timeout=300 # 300 seconds (5 minutes)
```
The initial value is restored on exit.
It is possible to change this setting manually:
```bash
# get the current screen_off_timeout value
adb shell settings get system screen_off_timeout
# set a new value (in milliseconds)
adb shell settings put system screen_off_timeout 30000
```
Note that the Android value is in milliseconds, but the scrcpy command line
argument is in seconds.
## 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
@ -71,31 +96,6 @@ adb shell cmd display power-on 0
``` ```
## Screen off timeout
The Android screen automatically turns off after some delay.
To change this delay while scrcpy is running:
```bash
scrcpy --screen-off-timeout=300 # 300 seconds (5 minutes)
```
The initial value is restored on exit.
It is possible to change this setting manually:
```bash
# get the current screen_off_timeout value
adb shell settings get system screen_off_timeout
# set a new value (in milliseconds)
adb shell settings put system screen_off_timeout 30000
```
Note that the Android value is in milliseconds, but the scrcpy command line
argument is in seconds.
## 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

View file

@ -83,9 +83,9 @@ process like the _adb daemon_).
## Mouse bindings ## Mouse bindings
By default, with SDK mouse: By default, with SDK mouse:
- right-click triggers BACK (or POWER on) - right-click triggers `BACK` (or `POWER` on)
- middle-click triggers HOME - middle-click triggers `HOME`
- the 4th click triggers APP_SWITCH - the 4th click triggers `APP_SWITCH`
- the 5th click expands the notification panel - the 5th click expands the notification panel
The secondary clicks may be forwarded to the device instead by pressing the The secondary clicks may be forwarded to the device instead by pressing the
@ -121,9 +121,9 @@ Each character must be one of the following:
- `+`: forward the click to the device - `+`: forward the click to the device
- `-`: ignore the click - `-`: ignore the click
- `b`: trigger shortcut BACK (or turn screen on if off) - `b`: trigger shortcut `BACK` (or turn screen on if off)
- `h`: trigger shortcut HOME - `h`: trigger shortcut `HOME`
- `s`: trigger shortcut APP_SWITCH - `s`: trigger shortcut `APP_SWITCH`
- `n`: trigger shortcut "expand notification panel" - `n`: trigger shortcut "expand notification panel"
For example: For example:

View file

@ -11,6 +11,8 @@ scrcpy --new-display # use the main display size and density
scrcpy --new-display=/240 # use the main display size and 240 dpi scrcpy --new-display=/240 # use the main display size and 240 dpi
``` ```
The new virtual display is destroyed on exit.
## Start app ## Start app
On some devices, a launcher is available in the virtual display. On some devices, a launcher is available in the virtual display.

View file

@ -20,6 +20,12 @@ and extract it.
### From a package manager ### From a package manager
From [WinGet] (ADB and other dependencies will be installed alongside scrcpy):
```bash
winget install --exact Genymobile.scrcpy
```
From [Chocolatey]: From [Chocolatey]:
```bash ```bash
@ -29,12 +35,12 @@ choco install adb # if you don't have it yet
From [Scoop]: From [Scoop]:
```bash ```bash
scoop install scrcpy scoop install scrcpy
scoop install adb # if you don't have it yet scoop install adb # if you don't have it yet
``` ```
[WinGet]: https://github.com/microsoft/winget-cli
[Chocolatey]: https://chocolatey.org/ [Chocolatey]: https://chocolatey.org/
[Scoop]: https://scoop.sh [Scoop]: https://scoop.sh