2019-10-30 22:14:30 +08:00
.TH "scrcpy" "1"
.SH NAME
scrcpy \- Display and control your Android device
.SH SYNOPSIS
.B scrcpy
.RI [ options ]
.SH DESCRIPTION
.B scrcpy
provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access.
.SH OPTIONS
2019-11-20 06:04:31 +08:00
.TP
.B \- \- always\-on\-top
Make scrcpy window always on top (above other windows).
2019-10-30 22:14:30 +08:00
.TP
.BI "\-b, \-\-bit\-rate " value
Encode the video at the given bit\- rate, expressed in bits/s. Unit suffixes are supported: '\fB K\fR ' (x1000) and '\fB M\fR ' (x1000000).
Default is 8000000.
2020-04-26 20:22:08 +08:00
.TP
.BI "\-\-codec\-options " key[:type]=value[,...]
Set a list of comma-separated key:type=value options for the device encoder.
The possible values for 'type' are 'int' (default), 'long', 'float' and 'string'.
The list of possible codec options is available in the Android documentation
.UR https://d.android.com/reference/android/media/MediaFormat
.UE .
2019-10-30 22:14:30 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-crop " width\fR:\fIheight\fR:\fIx\fR:\fIy
2019-10-30 22:14:30 +08:00
Crop the device screen on the server.
The values are expressed in the device natural orientation (typically, portrait for a phone, landscape for a tablet). Any
.B \- \- max\-size
value is computed on the cropped size.
2020-06-13 20:10:41 +08:00
.TP
.BI "\-\-disable-screensaver"
Disable screensaver while scrcpy is running.
2020-02-24 19:16:38 +08:00
.TP
.BI "\-\-display " id
Specify the display id to mirror.
The list of possible display ids can be listed by "adb shell dumpsys display"
(search "mDisplayId=" in the output).
Default is 0.
2021-07-07 01:04:05 +08:00
.TP
.BI "\-\-display\-buffer ms
Add a buffering delay (in milliseconds) before displaying. This increases latency to compensate for jitter.
Default is 0 (no buffering).
2020-11-09 04:11:12 +08:00
.TP
.BI "\-\-encoder " name
Use a specific MediaCodec encoder (must be a H.264 encoder).
2020-05-25 05:27:34 +08:00
.TP
.B \- \- force\-adb\-forward
Do not attempt to use "adb reverse" to connect to the device.
2020-10-06 02:45:53 +08:00
.TP
.B \- \- forward\-all\-clicks
By default, right-click triggers BACK (or POWER on) and middle-click triggers HOME. This option disables these shortcuts and forward the clicks to the device instead.
2019-10-30 22:14:30 +08:00
.TP
.B \- f, \- \- fullscreen
Start in fullscreen.
.TP
.B \- h, \- \- help
Print this help.
2021-09-10 18:57:35 +08:00
.TP
.B \- K, \- \- hid\-keyboard
Simulate a physical keyboard by using HID over AOAv2.
This provides a better experience for IME users, and allows to generate non-ASCII characters, contrary to the default injection method.
It may only work over USB, and is currently only supported on Linux.
2021-11-27 04:19:39 +08:00
The keyboard layout must be configured (once and for all) on the device, via Settings -> System -> Languages and input -> Physical keyboard. This settings page can be started directly:
adb shell am start -a android.settings.HARD_KEYBOARD_SETTINGS
However, the option is only available when the HID keyboard is enabled (or a physical keyboard is connected).
2020-10-07 03:30:10 +08:00
.TP
.B \- \- legacy\-paste
Inject computer clipboard text as a sequence of key events on Ctrl+v (like MOD+Shift+v).
This is a workaround for some devices not behaving as expected when setting the device clipboard programmatically.
2020-02-16 19:30:36 +08:00
.TP
2021-07-07 00:32:40 +08:00
.BI "\-\-lock\-video\-orientation[=value]
2021-09-02 22:46:27 +08:00
Lock video orientation to \fI value\fR . Possible values are "unlocked", "initial" (locked to the initial orientation), 0, 1, 2 and 3. Natural device orientation is 0, and each increment adds a 90 degrees rotation counterclockwise.
2020-02-16 19:30:36 +08:00
2021-04-20 00:42:20 +08:00
Default is "unlocked".
2020-02-16 19:30:36 +08:00
2021-04-20 00:40:48 +08:00
Passing the option without argument is equivalent to passing "initial".
2019-11-18 05:07:19 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-max\-fps " value
2019-12-19 18:49:50 +08:00
Limit the framerate of screen capture (officially supported since Android 10, but may work on earlier versions).
2019-11-18 05:07:19 +08:00
2019-10-30 22:14:30 +08:00
.TP
.BI "\-m, \-\-max\-size " value
Limit both the width and height of the video to \fI value\fR . The other dimension is computed so that the device aspect\- ratio is preserved.
Default is 0 (unlimited).
2021-11-22 15:49:10 +08:00
.TP
.B \- \- no\-clipboard\-autosync
By default, scrcpy automatically synchronizes the computer clipboard to the device clipboard before injecting Ctrl+v, and the device clipboard to the computer clipboard whenever it changes.
This option disables this automatic synchronization.
2019-10-30 22:14:30 +08:00
.TP
.B \- n, \- \- no\-control
Disable device control (mirror the device in read\- only).
.TP
.B \- N, \- \- no\-display
Do not display device (only when screen recording is enabled).
2020-07-27 14:26:25 +08:00
.TP
.B \- \- no\-key\-repeat
Do not forward repeated key events when a key is held down.
2020-10-01 21:06:34 +08:00
.TP
.B \- \- no\-mipmaps
If the renderer is OpenGL 3.0+ or OpenGL ES 2.0+, then mipmaps are automatically generated to improve downscaling quality. This option disables the generation of mipmaps.
2019-10-30 22:14:30 +08:00
.TP
2019-12-10 04:16:09 +08:00
.BI "\-p, \-\-port " port[:port]
Set the TCP port (range) used by the client to listen.
2019-10-30 22:14:30 +08:00
2019-12-10 04:16:09 +08:00
Default is 27183:27199.
2019-10-30 22:14:30 +08:00
2021-11-08 02:27:53 +08:00
.TP
.B \- \- power\-off\-on\-close
Turn the device screen off when closing scrcpy.
2019-11-08 02:01:35 +08:00
.TP
.B \- \- prefer\-text
Inject alpha characters and space as text events instead of key events.
This avoids issues when combining multiple keys to enter special characters,
but breaks the expected behavior of alpha keys in games (typically WASD).
2019-10-30 22:14:30 +08:00
.TP
.BI "\-\-push\-target " path
Set the target directory for pushing files to the device by drag & drop. It is passed as\- is to "adb push".
2021-06-14 04:47:16 +08:00
Default is "/sdcard/Download/".
2019-10-30 22:14:30 +08:00
.TP
.BI "\-r, \-\-record " file
Record screen to
.IR file .
The format is determined by the
2019-11-20 06:04:31 +08:00
.B \- \- record\-format
2019-10-30 22:14:30 +08:00
option if set, or by the file extension (.mp4 or .mkv).
2019-11-20 06:04:31 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-record\-format " format
2019-11-20 06:04:31 +08:00
Force recording format (either mp4 or mkv).
2020-04-11 20:34:41 +08:00
.TP
.BI "\-\-render\-driver " name
Request SDL to use the given render driver (this is just a hint).
Supported names are currently "direct3d", "opengl", "opengles2", "opengles", "metal" and "software".
2020-05-27 18:38:59 +08:00
2020-04-11 20:34:41 +08:00
.UR https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER
.UE
2019-11-20 06:04:31 +08:00
2020-04-08 16:17:12 +08:00
.TP
.BI "\-\-rotation " value
Set the initial display rotation. Possibles values are 0, 1, 2 and 3. Each increment adds a 90 degrees rotation counterclockwise.
2019-10-30 22:14:30 +08:00
.TP
.BI "\-s, \-\-serial " number
The device serial number. Mandatory only if several devices are connected to adb.
2020-07-17 06:00:42 +08:00
.TP
.BI "\-\-shortcut\-mod " key[+...]][,...]
Specify the modifiers to use for scrcpy shortcuts. Possible keys are "lctrl", "rctrl", "lalt", "ralt", "lsuper" and "rsuper".
A shortcut can consist in several keys, separated by '+'. Several shortcuts can be specified, separated by ','.
For example, to use either LCtrl+LAlt or LSuper for scrcpy shortcuts, pass "lctrl+lalt,lsuper".
2020-07-17 06:00:42 +08:00
Default is "lalt,lsuper" (left-Alt or left-Super).
2020-07-17 06:00:42 +08:00
2021-11-26 05:22:49 +08:00
.TP
.BI "\-\-tcpip[=ip[:port]]
Configure and reconnect the device over TCP/IP.
If a destination address is provided, then scrcpy connects to this address before starting. The device must listen on the given TCP port (default is 5555).
If no destination address is provided, then scrcpy attempts to find the IP address of the current device (typically connected over USB), enables TCP/IP mode, then connects to this address before starting.
2019-10-30 22:14:30 +08:00
.TP
.B \- S, \- \- turn\-screen\-off
Turn the device screen off immediately.
.TP
.B \- t, \- \- show\-touches
2020-05-25 05:14:30 +08:00
Enable "show touches" on start, restore the initial value on exit.
2019-10-30 22:14:30 +08:00
It only shows physical touches (not clicks from scrcpy).
2021-11-18 08:02:53 +08:00
.TP
.BI "\-\-tunnel\-host " ip
Set the IP address of the adb tunnel to reach the scrcpy server. This option automatically enables --force-adb-forward.
Default is localhost.
.TP
.BI "\-\-tunnel\-port " port
Set the TCP port of the adb tunnel to reach the scrcpy server. This option automatically enables --force-adb-forward.
Default is 0 (not forced): the local port used for establishing the tunnel will be used.
2021-04-04 06:10:44 +08:00
.TP
2021-04-26 23:59:35 +08:00
.BI "\-\-v4l2-sink " /dev/videoN
2021-04-04 06:10:44 +08:00
Output to v4l2loopback device.
2021-07-07 00:33:04 +08:00
It requires to lock the video orientation (see \fB \- \- lock\- video\- orientation\fR ).
2021-04-04 06:10:44 +08:00
2021-07-07 01:04:05 +08:00
.TP
.BI "\-\-v4l2-buffer " ms
Add a buffering delay (in milliseconds) before pushing frames. This increases latency to compensate for jitter.
This option is similar to \fB \- \- display\- buffer\fR , but specific to V4L2 sink.
Default is 0 (no buffering).
2020-05-25 03:51:40 +08:00
.TP
.BI "\-V, \-\-verbosity " value
2021-06-18 03:40:30 +08:00
Set the log level ("verbose", "debug", "info", "warn" or "error").
2020-05-25 03:51:40 +08:00
Default is "info" for release builds, "debug" for debug builds.
2021-04-16 23:40:39 +08:00
.TP
.B \- v, \- \- version
Print the version of scrcpy.
2020-05-02 07:54:48 +08:00
.TP
.B \- w, \- \- stay-awake
2020-05-29 05:07:28 +08:00
Keep the device on while scrcpy is running, when the device is plugged in.
2020-05-02 07:54:48 +08:00
2019-11-16 01:59:47 +08:00
.TP
.B \- \- window\-borderless
Disable window decorations (display borderless window).
2019-10-30 22:14:30 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-window\-title " text
2019-10-30 22:14:30 +08:00
Set a custom window title.
2019-11-04 00:34:01 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-window\-x " value
2019-11-04 00:34:01 +08:00
Set the initial window horizontal position.
2021-02-16 00:52:53 +08:00
Default is "auto".
2019-11-04 00:34:01 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-window\-y " value
2019-11-04 00:34:01 +08:00
Set the initial window vertical position.
2021-02-16 00:52:53 +08:00
Default is "auto".
2019-11-04 00:34:01 +08:00
2019-11-04 01:00:11 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-window\-width " value
2019-11-04 01:00:11 +08:00
Set the initial window width.
2021-02-16 00:52:53 +08:00
Default is 0 (automatic).
2019-11-04 01:00:11 +08:00
.TP
2019-11-27 17:44:14 +08:00
.BI "\-\-window\-height " value
2019-11-04 01:00:11 +08:00
Set the initial window height.
2021-02-16 00:52:53 +08:00
Default is 0 (automatic).
2019-10-30 22:14:30 +08:00
.SH SHORTCUTS
2020-07-17 06:00:42 +08:00
In the following list, MOD is the shortcut modifier. By default, it's (left)
2021-07-07 00:33:04 +08:00
Alt or (left) Super, but it can be configured by \fB \- \- shortcut\- mod\fR (see above).
2020-07-17 06:00:42 +08:00
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+f
2020-04-08 18:02:15 +08:00
Switch fullscreen mode
2019-10-30 22:14:30 +08:00
2020-04-08 05:03:23 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+Left
2020-04-08 05:03:23 +08:00
Rotate display left
.TP
2020-07-17 06:00:42 +08:00
.B MOD+Right
2020-04-08 05:03:23 +08:00
Rotate display right
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+g
2020-04-08 18:02:15 +08:00
Resize window to 1:1 (pixel\- perfect)
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+w, Double\-click on black borders
2020-04-08 18:02:15 +08:00
Resize window to remove black borders
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+h, Home, Middle\-click
2019-10-30 22:14:30 +08:00
Click on HOME
.TP
2020-07-17 06:00:42 +08:00
.B MOD+b, MOD+Backspace, Right\-click (when screen is on)
2019-10-30 22:14:30 +08:00
Click on BACK
.TP
2020-07-17 06:00:42 +08:00
.B MOD+s
2019-10-30 22:14:30 +08:00
Click on APP_SWITCH
.TP
2020-07-17 06:00:42 +08:00
.B MOD+m
2019-10-30 22:14:30 +08:00
Click on MENU
.TP
2020-07-17 06:00:42 +08:00
.B MOD+Up
2019-10-30 22:14:30 +08:00
Click on VOLUME_UP
.TP
2020-07-17 06:00:42 +08:00
.B MOD+Down
2019-10-30 22:14:30 +08:00
Click on VOLUME_DOWN
.TP
2020-07-17 06:00:42 +08:00
.B MOD+p
2019-10-30 22:14:30 +08:00
Click on POWER (turn screen on/off)
.TP
.B Right\-click (when screen is off)
2020-04-08 18:02:15 +08:00
Turn screen on
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+o
2020-04-08 18:02:15 +08:00
Turn device screen off (keep mirroring)
2019-10-30 22:14:30 +08:00
2020-05-28 00:18:39 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+Shift+o
2020-05-28 00:18:39 +08:00
Turn device screen on
2019-12-05 02:55:28 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+r
2020-04-08 18:02:15 +08:00
Rotate device screen
2019-12-05 02:55:28 +08:00
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+n
2020-04-08 18:02:15 +08:00
Expand notification panel
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+Shift+n
2020-04-08 18:02:15 +08:00
Collapse notification panel
2019-10-30 22:14:30 +08:00
2020-07-17 06:00:42 +08:00
.TP
.B Mod+c
Copy to clipboard (inject COPY keycode, Android >= 7 only)
.TP
.B Mod+x
Cut to clipboard (inject CUT keycode, Android >= 7 only)
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+v
2020-07-17 06:00:42 +08:00
Copy computer clipboard to device, then paste (inject PASTE keycode, Android >= 7 only)
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+Shift+v
2020-07-17 06:00:42 +08:00
Inject computer clipboard text as a sequence of key events
2019-10-30 22:14:30 +08:00
.TP
2020-07-17 06:00:42 +08:00
.B MOD+i
2020-04-08 18:02:15 +08:00
Enable/disable FPS counter (print frames/second in logs)
2019-10-30 22:14:30 +08:00
2020-08-09 22:04:02 +08:00
.TP
.B Ctrl+click-and-move
Pinch-to-zoom from the center of the screen
2019-10-30 22:14:30 +08:00
.TP
.B Drag & drop APK file
2020-04-08 18:02:15 +08:00
Install APK from computer
2019-10-30 22:14:30 +08:00
2021-11-08 01:44:07 +08:00
.TP
.B Drag & drop non-APK file
Push file to device (see \fB \- \- push\- target\fR )
2019-10-30 22:14:30 +08:00
.SH Environment variables
.TP
.B ADB
Specify the path to adb.
.TP
.B SCRCPY_SERVER_PATH
Specify the path to server binary.
.SH AUTHORS
.B scrcpy
is written by Romain Vimont.
This manual page was written by
.MT mmyangfl@gmail.com
Yangfl
.ME
for the Debian Project (and may be used by others).
.SH "REPORTING BUGS"
Report bugs to
.UR https://github.com/Genymobile/scrcpy/issues
.UE .
.SH COPYRIGHT
Copyright \(co 2018 Genymobile
.UR https://www.genymobile.com
Genymobile
.UE
2020-01-19 23:04:20 +08:00
Copyright \(co 2018\- 2020
2019-10-30 22:14:30 +08:00
.MT rom@rom1v.com
Romain Vimont
.ME
Licensed under the Apache License, Version 2.0.
.SH WWW
.UR https://github.com/Genymobile/scrcpy
.UE