Commit Graph

102 Commits

Author SHA1 Message Date
Romain Vimont
6c6607d404 Add --no-vd-destroy-content
Add an option to disable the following flag for virtual displays:

    DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL

With this option, when the virtual display is closed, the running apps
are moved to the main display rather than being destroyed.

PR #5615 <https://github.com/Genymobile/scrcpy/pull/5615>
2024-12-08 09:33:03 +01:00
Romain Vimont
baa10ed0a3 Update links to 3.0.2 2024-12-04 22:48:27 +01:00
Romain Vimont
5febb1e9fb Update links to 3.0.1 2024-12-04 21:46:06 +01:00
Romain Vimont
0e473eb005 Reset TCP/IP connection with a '+' prefix
When running scrcpy with --tcpip=xx.xx.xx.xx, to make sure a new working
connection is established, it was first disconnected by a call to:

    adb disconnect <addr>

However, this caused all running instances connected to that address to
be killed. Running several instances of scrcpy on the same device is now
useful with virtual displays, so change the default behavior to NOT
disconnect.

To force a reconnection, a '+' prefix can be added:

    scrcpy --tcpip=+192.168.0.x

Fixes #5562 <https://github.com/Genymobile/scrcpy/issues/5562>
2024-12-04 13:16:51 +01:00
Romain Vimont
b26b4fb745 Document launchers in virtual displays
Mention how to start a launcher in a virtual display.

Refs #5592 <https://github.com/Genymobile/scrcpy/issues/5592>
2024-12-04 13:10:35 +01:00
Romain Vimont
1d2f16dbb5 Fix documentation about default mouse mode
When video playback is turned off, the default mouse mode has changed
from "uhid" to "disabled" in 2c25fd7a80.

Update the documentation accordingly.

Refs #5410 <https://github.com/Genymobile/scrcpy/issues/5410>
Refs #5542 <https://github.com/Genymobile/scrcpy/issues/5542>
2024-11-26 14:10:11 +01:00
Romain Vimont
74aecc00b5 Update links to 3.0 2024-11-24 18:30:01 +01:00
Romain Vimont
0628ffcb0b Merge branch 'master' into release 2024-11-24 16:01:05 +01:00
Enno Boland
dc82425769 Add debugging method for Android >= 11
Fixes #5346 <https://github.com/Genymobile/scrcpy/issues/5346>
PR #5466 <https://github.com/Genymobile/scrcpy/pull/5466>

Signed-off-by: Romain Vimont <rom@rom1v.com>
2024-11-24 12:24:32 +01:00
Romain Vimont
9f39a5f2d6 Determine debugger command at runtime
When server_debugger is enabled, retrieve the device SDK version to
execute the correct command.

PR #5466 <https://github.com/Genymobile/scrcpy/pull/5466>
2024-11-22 11:04:32 +01:00
Romain Vimont
264110fd70 Dissociate virtual display size and capture size
Allow capturing virtual displays at a lower resolution using
-m/--max-size.

In the original implementation in #5370, the virtual display size was
necessarily the same as the capture size. The --max-size value was only
allowed to determine the virtual display size when no explicit size was
provided.

Since the dpi was scaled down accordingly, it is often better to create
a virtual display at the target capture size directly. However, not
everything is rendered according to the virtual display DPI. For
example, a page in Firefox is rendered too big on small virtual
displays. Thus, it makes sense to be able create a virtual display at a
given size, and capture it at a lower resolution with --max-size. This
is now possible using OpenGL filters.

Therefore, change the behavior of --max-size for virtual displays:
 - --max-size does not impact --new-display without size argument
   anymore (the virtual display size is the main display size);
 - it is used to limit the capture size (whether an explicit size is
   provided or not).

This new behavior is consistent with main display capture.

Refs #5370 comment <https://github.com/Genymobile/scrcpy/pull/5370#issuecomment-2438944401>
Refs #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
PR #5506 <https://github.com/Genymobile/scrcpy/pull/5506>
2024-11-21 18:36:23 +01:00
Gutem
f1f2711626 Document missing --cask option for macOS
Installing android-platform-tools via brew install requires the option
--cask.

Refs #2004 <https://github.com/Genymobile/scrcpy/pull/2004>
Refs #2231 <https://github.com/Genymobile/scrcpy/pull/2231>
PR #5398 <https://github.com/Genymobile/scrcpy/pull/5398>
Signed-off-by: Romain Vimont <rom@rom1v.com>
2024-11-20 08:04:47 +01:00
Romain Vimont
145b823b1d Add --no-vd-system-decorations
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>
2024-11-20 07:50:45 +01:00
Romain Vimont
36d61f9ecd Reference virtual display documentation
Reference the documentation about virtual displays from the "Display"
section of video.md.
2024-11-19 21:31:04 +01:00
Romain Vimont
f95a5f97b1 Document filter order
Matrix multiplication is not commutative, so the order of filters
matters.

PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>
2024-11-19 21:31:04 +01:00
Romain Vimont
adb674a5c8 Add --angle
Add an option to rotate the video content by a custom angle.

Fixes #4135 <https://github.com/Genymobile/scrcpy/issues/4135>
Fixes #4345 <https://github.com/Genymobile/scrcpy/issues/4345>
Refs #4658 <https://github.com/Genymobile/scrcpy/pull/4658>
PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>
2024-11-19 21:31:04 +01:00
Romain Vimont
45382e3f01 Add --capture-orientation
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>
2024-11-19 21:31:04 +01:00
Romain Vimont
762816cac6 Remove quotes for --video-encoder in documentation
Refs ec602a0334
2024-11-13 12:54:25 +01:00
Romain Vimont
eff5b4b219 Add --screen-off-timeout
Change the Android "screen off timeout" (the idle delay before the
screen automatically turns off) and restore the initial value on
exit.

PR #5447 <https://github.com/Genymobile/scrcpy/pull/5447>
2024-11-09 10:26:59 +01:00
Romain Vimont
104195fc3b Add shortcut to reset video capture/encoding
Reset video capture/encoding on MOD+Shift+r.

Like on device rotation, this starts a new encoding session which
produces a video stream starting by a key frame.

PR #5432 <https://github.com/Genymobile/scrcpy/pull/5432>
2024-11-03 19:31:02 +01:00
Romain Vimont
c29ecd0314 Rename --display-buffer to --video-buffer
For consistency with --audio-buffer, rename --display-buffer to
--video-buffer.

Fixes #5403 <https://github.com/Genymobile/scrcpy/issues/5403>
PR #5420 <https://github.com/Genymobile/scrcpy/pull/5420>
2024-10-31 19:57:52 +01:00
Romain Vimont
1f6634ea87 Document adb shell settings commands
Some scrcpy features change Android settings with `adb shell settings`.
Document the commands to execute manually.
2024-10-30 22:23:53 +01:00
Romain Vimont
381fe95867 Document virtual display and "start app" features
PR #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
2024-10-28 18:18:36 +01:00
Romain Vimont
14e5439dee Update mouse documentation about capture key
The mouse capture keys are not hardcoded anymore, they use the
configured shortcut modifiers.

Refs ff9fb5994d
2024-10-28 14:55:55 +01:00
Anwar Fuadi
67d4dfb5ff Add missing client build dependency in Fedora
PR #5147 <https://github.com/Genymobile/scrcpy/pull/5147>

Signed-off-by: Romain Vimont <rom@rom1v.com>
2024-10-23 20:05:52 +02:00
Romain Vimont
7a9ea5c66f Add shortcut for horizontal tilt
Use Ctrl+Shift for horizontal tilt.

Refs #4529 comment <https://github.com/Genymobile/scrcpy/pull/4529#issuecomment-1855397118>
Fixes #5317 <https://github.com/Genymobile/scrcpy/issues/5317>
2024-09-25 21:38:09 +02:00
Romain Vimont
665ccb32f5 Update links to 2.7 2024-09-15 21:18:15 +02:00
Romain Vimont
4cc4abdcc8 Mention issue with AOA and multiple gamepads
Android does not support multiple HID gamepads properly over AOA.

PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
2024-09-15 18:58:53 +02:00
Romain Vimont
befc0fac5b Mention UHID permission errors
UHID may not work on old Android versions due to permission errors.

Mention it in UHID mouse and gamepad documentation (it was already
mentioned for UHID keyboard).

Refs #4473 comment <https://github.com/Genymobile/scrcpy/pull/4473#issuecomment-1975133226>
PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
2024-09-15 18:58:44 +02:00
Romain Vimont
0ba430a462 Add gamepad user documentation
Mainly copied and adapted from HID keyboard and mouse documentation.

PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
2024-09-15 11:21:56 +02:00
Romain Vimont
91d40c7548 Fix link in OTG documentation
PR #5270 <https://github.com/Genymobile/scrcpy/pull/5270>
2024-09-15 11:21:56 +02:00
Romain Vimont
44b3fd82b1 Update links to 2.6.1 2024-08-02 22:58:09 +02:00
Romain Vimont
67f93350f6 Update links to 2.6 2024-08-01 18:46:10 +02:00
Romain Vimont
ed4066902d Update documentation for audio playback capture
PR #5102 <https://github.com/Genymobile/scrcpy/pull/5102>
2024-07-19 17:48:39 +02:00
Romain Vimont
9989668226 Add mouse secondary bindings
Add secondary bindings (Shift+click) for mouse buttons.

In addition to:

    --mouse-bind=xxxx

It is now possible to pass a sequence of secondary bindings:

    --mouse-bind=xxxx:xxxx
                 <--> <-->
             primary   secondary
            bindings   bindings

If the second sequence is omitted, then it is the same as the first one.

By default, for SDK mouse, primary bindings trigger shortcuts and
secondary bindings forward all clicks.

For AOA and UHID, the default bindings are reversed: all clicks are
forwarded by default, whereas pressing Shift+click trigger shortcuts.

    --mouse-bind=bhsn:++++  # default for SDK
    --mouse-bind=++++:bhsn  # default for AOA and UHID

Refs 035d60cf5d
Refs f5e6b8092a
Fixes #5055 <https://github.com/Genymobile/scrcpy/issues/5055>
PR #5076 <https://github.com/Genymobile/scrcpy/pull/5076>
2024-07-11 12:04:09 +02:00
Romain Vimont
a8871bfad7 Update links to 2.5 2024-06-29 17:51:36 +02:00
Romain Vimont
c95e6964c5 Merge branch 'master' into release 2024-06-29 16:52:32 +02:00
Romain Vimont
7633228278 Forward mouse hover events
Also add an option --no-mouse-hover to get the old behavior.

Fixes #2743 <https://github.com/Genymobile/scrcpy/issues/2743>
Fixes #3070 <https://github.com/Genymobile/scrcpy/issues/3070>
PR #5039 <https://github.com/Genymobile/scrcpy/pull/5039>
2024-06-29 12:42:19 +02:00
Romain Vimont
f5e6b8092a Forward all clicks by default for UHID/AOA
By default, only the left click is forwarded to the device, and
secondary clicks trigger shortcuts (the behavior can be configured by
--mouse-bind=xxxx).

But when the mouse mode is relative (AOA and UHID modes), forward all
clicks by default. This makes more sense since the cursor is handled on
the device side, the user expects all mouse buttons to be forwarded.

Refs <https://github.com/Genymobile/scrcpy/issues/4727#issuecomment-2069869750>
PR #5022 <https://github.com/Genymobile/scrcpy/pull/5022>
2024-06-24 23:17:59 +02:00
Romain Vimont
035d60cf5d Add option to configure mouse bindings
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>
2024-06-24 23:17:23 +02:00
Romain Vimont
24bcc3fa2b Simplify shortcut modifiers
Restrict shortcut modifiers to be composed of only one item each.

Before, it was possible to select a list of multiple combinations of
modifier keys, like --shortcut-mod='lctrl+lalt,rctrl+rsuper', meaning
that shortcuts would be triggered either by LCtrl+LAlt+key or
RCtrl+RSuper+key.

This was overly generic, probably not used very much, and it prevents to
solve inconsistencies between UP and DOWN events of modifier keys sent
to the device.

Refs #4732 <https://github.com/Genymobile/scrcpy/issues/4732>
PR #4741 <https://github.com/Genymobile/scrcpy/pull/4741>
2024-06-23 19:15:45 +02:00
Romain Vimont
576e7552a2 Mention that the Debian package is obsolete
It cannot be updated until the android-framework-XX Debian package is
fixed.

Refs <https://tracker.debian.org/pkg/scrcpy>
2024-06-13 09:14:40 +02:00
Romain Vimont
c27ab46efb Remove suggestion to install from winget
It does not work.

Refs #4027 <https://github.com/Genymobile/scrcpy/issues/4027>
Refs #4389 <https://github.com/Genymobile/scrcpy/issues/4389>
Refs #4956 <https://github.com/Genymobile/scrcpy/issues/4956>
2024-05-30 08:23:42 +02:00
Romain Vimont
b5849db32f Document missing package to build for Windows
To build ffmpeg, libz is necessary.

Refs #4955 <https://github.com/Genymobile/scrcpy/issues/4955>
2024-05-29 10:32:58 +02:00
Romain Vimont
b5c8de08e0 Update documentation for --no-window
PR #4868 <https://github.com/Genymobile/scrcpy/pull/4868>
2024-05-11 17:12:00 +02:00
Romain Vimont
206809a99a Fix typo in documentation 2024-04-02 18:01:21 +02:00
Romain Vimont
1c3801a0b1 Add a shortcut to pause/unpause display
Pause/unpause display on MOD+z and MOD+Shift+z.

It only impacts rendering, the device is still captured, the video
stream continues to be transmitted to the device and recorded (if
recording is enabled).

Fixes #1632 <https://github.com/Genymobile/scrcpy/issues/1632>
PR #4748 <https://github.com/Genymobile/scrcpy/pull/4748>
2024-03-30 14:20:51 +01:00
Romain Vimont
79968a0ae6 Reorder documentation
Present the --tcpip option without arguments first.
2024-03-11 18:05:27 +01:00
Romain Vimont
7f23ff3f2c Add videos for pinch-to-zoom and tilt
A video is worth a thousand words.
2024-03-03 00:06:54 +01:00
Romain Vimont
cc7719079a Italicize coordinates letters in documentation 2024-03-03 00:05:26 +01:00