Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
cac8e9c821 | ||
|
1c7680f689 | ||
|
5ae01749bf | ||
|
1fd57ede1f | ||
|
48fc18e380 | ||
|
ea6a94d355 |
2
LICENSE
2
LICENSE
@ -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.
|
||||||
|
12
README.md
12
README.md
@ -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.
|
||||||
|
@ -829,7 +829,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.
|
||||||
|
|
||||||
|
@ -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 '{}'
|
||||||
|
@ -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
|
||||||
|
12
doc/mouse.md
12
doc/mouse.md
@ -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:
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
@ -206,10 +206,6 @@ public final class Device {
|
|||||||
|
|
||||||
// restore auto-rotate if necessary
|
// restore auto-rotate if necessary
|
||||||
if (accelerometerRotation) {
|
if (accelerometerRotation) {
|
||||||
if (displayId == 0) {
|
|
||||||
// HACK: rotation on the main display often fail on recent Android devices if thawRotation() is called immediately
|
|
||||||
SystemClock.sleep(10);
|
|
||||||
}
|
|
||||||
wm.thawRotation(displayId);
|
wm.thawRotation(displayId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user