Add an option to disable the following flag for virtual displays:
DisplayManager.VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS
Some devices render a broken UI when this flag is enabled.
Fixes#5494 <https://github.com/Genymobile/scrcpy/issues/5494>
Deprecate --lock-video-orientation in favor of a more general option
--capture-orientation, which supports all possible orientations
(0, 90, 180, 270, flip0, flip90, flip180, flip270), and a "locked" flag
via a '@' prefix.
All the old "locked video orientations" are supported:
- --lock-video-orientation -> --capture-orientation=@
- --lock-video-orientation=0 -> --capture-orientation=@0
- --lock-video-orientation=90 -> --capture-orientation=@90
- --lock-video-orientation=180 -> --capture-orientation=@180
- --lock-video-orientation=270 -> --capture-orientation=@270
In addition, --capture-orientation can rotate/flip the display without
locking, so that it follows the physical device rotation.
For example:
scrcpy --capture-orientation=flip90
always flips and rotates the capture by 90° clockwise.
The arguments are consistent with --display-orientation and
--record-orientation and --orientation (which provide separate
client-side orientation settings).
Refs #4011 <https://github.com/Genymobile/scrcpy/issues/4011>
PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>
Add a command line option --start-app=name to start an Android app by
its package name. For example:
scrcpy --start-app=org.mozilla.firefox
The app will be started on the correct target display:
scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc
PR #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Add a feature to create a new (separate) virtual display instead of
mirroring the device screen:
scrcpy --new-display=1920x1080
scrcpy --new-display=1920x1080/420 # force 420 dpi
scrcpy --new-display # use the main display size and density
scrcpy --new-display -m1920 # scaled to fit a max size of 1920
scrcpy --new-display=/240 # use the main display size and 240 dpi
Fixes#1887 <https://github.com/Genymobile/scrcpy/issues/1887>
PR #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Co-authored-by: anirudhb <anirudhb@users.noreply.github.com>
For convenience, short options were added to select UHID input modes:
- -K for --keyboard=uhid
- -M for --mouse=uhid
- -G for --gamepad=uhid
In OTG mode, UHID is not available, so the short options should select
AOA instead.
PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
Similar to UHID keyboard and mouse, but for gamepads.
Can be enabled with --gamepad=uhid or -G.
It is not enabled by default because not all devices support UHID
(there is a permission error on old Android versions).
PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
Add a new method to capture audio playback.
It requires Android 13 (where the Shell app has MODIFY_AUDIO_ROUTING
permission).
The main benefit is that it supports keeping audio playing on the device
(implemented in a further commit).
Fixes#4380 <https://github.com/Genymobile/scrcpy/issues/4380>
PR #5102 <https://github.com/Genymobile/scrcpy/pull/5102>
Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Add a new option --mouse-bind=xxxx.
The argument must be exactly 4 characters, one for each secondary click:
--mouse-bind=xxxx
^^^^
||||
||| `- 5th click
|| `-- 4th click
| `--- middle click
`---- right click
Each character must be one of the following:
- `+`: forward the click to the device
- `-`: ignore the click
- `b`: trigger shortcut BACK (or turn screen on if off)
- `h`: trigger shortcut HOME
- `s`: trigger shortcut APP_SWITCH
- `n`: trigger shortcut "expand notification panel"
This deprecates --forward-all-clicks (use --mouse-bind=++++ instead).
Refs <https://github.com/Genymobile/scrcpy/pull/2258#issuecomment-2182394460>
PR #5022 <https://github.com/Genymobile/scrcpy/pull/5022>
The options were deprecated, but for convenience, reassign them to
aliases for --keyboard=uhid and --mouse=uhid respectively.
Their long version (--hid-keyboard and --hid-mouse) remain deprecated.
PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473>
Until now, there was two modes for keyboard and mouse:
- event injection using the Android system API (default)
- HID/AOA over USB
For this reason, the options were exposed as simple flags:
- -K or --hid-keyboard to enable physical keyboard simulation (AOA)
- -M or --hid-mouse to enable physical mouse simulation (AOA)
Replace them by explicit --keyboard and --mouse options, with 3 possible
values:
- disabled
- sdk (default)
- aoa
This will allow to add a new mode (uhid).
PR #4473 <https://github.com/Genymobile/scrcpy/pull/4473>
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
Add --camera-high-speed to enable high frame rate camera capture. If
the option is enabled, then --camera-fps is mandatory.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213>
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
Add a new option for specifying the camera frame rate.
By default, Android's default frame rate (30 fps) is used.
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213>
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
In addition to --camera-size to specify an explicit size, make it
possible to select the camera size automatically, respecting the maximum
size (already used for display mirroring) and an aspect ratio.
For example, "scrcpy --video-source=camera" followed by:
- (no additional arguments)
: mirrors at the maximum size, any a-r
- -m1920
: only consider valid sizes having both dimensions not above 1920
- --camera-ar=4:3
: only consider valid sizes having an aspect ratio of 4:3 (+/- 10%)
- -m2048 --camera-ar=1.6
: only consider valid sizes having both dimensions not above 2048
and an aspect ratio of 1.6 (+/- 10%)
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213>
Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
Add an option to select the camera by its lens facing (front, back or
external).
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213>
Co-authored-by: Romain Vimont <rom@rom1v.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
The option is named "display id" everywhere.
This will be consistent with --camera-id (there will be many camera
options, so an option --camera would be confusing).
PR #4213 <https://github.com/Genymobile/scrcpy/pull/4213>