scrcpy(1) | General Commands Manual | scrcpy(1) |
scrcpy - Display and control your Android device
scrcpy [options]
scrcpy provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access.
Default is 8000000.
The possible values for 'type' are 'int' (default), 'long', 'float' and 'string'.
The list of possible codec options is available in the Android documentation https://d.android.com/reference/android/media/MediaFormat.
The values are expressed in the device natural orientation (typically, portrait for a phone, landscape for a tablet). Any --max-size value is computed on the cropped size.
Also see -e (--select-tcpip).
The list of possible display ids can be listed by "adb shell dumpsys display" (search "mDisplayId=" in the output).
Default is 0.
Default is 0 (no buffering).
Also see -d (--select-usb).
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.
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).
Also see --hid-mouse.
This is a workaround for some devices not behaving as expected when setting the device clipboard programmatically.
Default is "unlocked".
Passing the option without argument is equivalent to passing "initial".
Default is 0 (unlimited).
In this mode, the computer mouse is captured to control the device directly (relative mouse mode).
LAlt, LSuper or RSuper toggle the capture mode, to give control of the mouse back to the computer.
It may only work over USB.
Also see --hid-keyboard.
This option disables this cleanup.
This option disables this automatic synchronization.
This option disables this behavior.
In this mode, adb (USB debugging) is not necessary, and mirroring is disabled.
LAlt, LSuper or RSuper toggle the mouse capture mode, to give control of the mouse back to the computer.
If any of --hid-keyboard or --hid-mouse is set, only enable keyboard or mouse respectively, otherwise enable both.
It may only work over USB.
See --hid-keyboard and --hid-mouse.
Default is 27183:27199.
This avoids issues when combining multiple keys to enter special characters, but breaks the expected behavior of alpha keys in games (typically WASD).
Default is "/sdcard/Download/".
The format is determined by the --record-format option if set, or by the file extension (.mp4 or .mkv).
Supported names are currently "direct3d", "opengl", "opengles2", "opengles", "metal" and "software".
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".
Default is "lalt,lsuper" (left-Alt or left-Super).
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 and adb port of the current device (typically connected over USB), enables TCP/IP mode if necessary, then connects to this address before starting.
It only shows physical touches (not clicks from scrcpy).
Default is localhost.
Default is 0 (not forced): the local port used for establishing the tunnel will be used.
It requires to lock the video orientation (see --lock-video-orientation).
This option is similar to --display-buffer, but specific to V4L2 sink.
Default is 0 (no buffering).
Default is "info" for release builds, "debug" for debug builds.
Default is "auto".
Default is "auto".
Default is 0 (automatic).
Default is 0 (automatic).
scrcpy will exit with code 0 on normal program termination. If an initial connection cannot be established, the exit code 1 will be returned. If the device disconnects while a session is active, exit code 2 will be returned.
In the following list, MOD is the shortcut modifier. By default, it's (left) Alt or (left) Super, but it can be configured by --shortcut-mod (see above).
scrcpy is written by Romain Vimont.
This manual page was written by Yangfl for the Debian Project (and may be used by others).
Report bugs to https://github.com/Genymobile/scrcpy/issues.
Copyright © 2018 Genymobile Genymobile
Copyright © 2018-2022 Romain Vimont
Licensed under the Apache License, Version 2.0.