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 128K (128000).
Lower values decrease the latency, but increase the likelihood of buffer underrun (causing audio glitches).
Default is 50.
Default is opus.
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>
This feature is only available with --audio-source=playback.
The available encoders can be listed by --list-encoders.
- "output": forwards the whole audio output, and disables
playback on the device.
- "playback": captures the audio playback (Android apps can
opt-out, so the whole output is not necessarily captured).
- "mic": captures the microphone.
- "mic-unprocessed": captures the microphone unprocessed (raw)
sound.
- "mic-camcorder": captures the microphone tuned for video
recording, with the same orientation as the camera if available.
- "mic-voice-recognition": captures the microphone tuned for
voice recognition.
- "mic-voice-communication": captures the microphone tuned for
voice communications (it will for instance take advantage of echo
cancellation or automatic gain control if available).
- "voice-call": captures voice call.
- "voice-call-uplink": captures voice call uplink only.
- "voice-call-downlink": captures voice call downlink only.
- "voice-performance": captures audio meant to be processed for
live performance (karaoke), includes both the microphone and the device
playback.
Default is output.
If you get "robotic" audio playback, you should test with a higher value (10). Do not change this setting otherwise.
Default is 5.
Default is 8M (8000000).
Possible values are "sensor" (use the camera sensor aspect ratio), "num:den" (e.g. "4:3") and "value" (e.g. "1.6").
Possible values are "front", "back" and "external".
If not specified, Android's default frame rate (30 fps) is used.
This mode is restricted to specific resolutions and frame rates, listed by --list-camera-sizes.
The available camera ids can be listed by --list-cameras.
The number represents the clockwise rotation in degrees; the "flip" keyword applies a horizontal flip before the rotation.
If a leading '@' is passed (@90) for display capture, then the rotation is locked, and is relative to the natural device orientation.
If '@' is passed alone, then the rotation is locked to the initial device orientation.
Default is 0.
The values are expressed in the device natural orientation (typically, portrait for a phone, landscape for a tablet).
Also see -e (--select-tcpip).
The available display ids can be listed by --list-displays.
Default is 0.
Possible values are "local", "fallback" and "hide":
- "local" means that the IME should appear on the local
display.
- "fallback" means that the IME should appear on a fallback
display (the default display).
- "hide" means that the IME should be hidden.
By default, the IME policy is left unchanged.
Possible values are 0, 90, 180, 270, flip0, flip90, flip180 and flip270. The number represents the clockwise rotation in degrees; the "flip" keyword applies a horizontal flip before the rotation.
Default is 0.
Also see -d (--select-usb).
Possible values are "disabled", "uhid" and "aoa":
- "disabled" does not send gamepad inputs to the device.
- "uhid" simulates physical HID gamepads using the Linux HID
kernel module on the device.
- "aoa" simulates physical HID gamepads using the AOAv2
protocol. It may only work over USB.
Also see --keyboardand R--mouse.
Possible values are "disabled", "sdk", "uhid" and "aoa":
- "disabled" does not send keyboard inputs to the device.
- "sdk" uses the Android system API to deliver keyboard events
to applications.
- "uhid" simulates a physical HID keyboard using the Linux HID
kernel module on the device.
- "aoa" simulates a physical HID keyboard using the AOAv2
protocol. It may only work over USB.
For "uhid" and "aoa", 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 using the shortcut MOD+k (except in OTG mode), or by executing:
adb shell am start -a android.settings.HARD_KEYBOARD_SETTINGS
This option is only available when the HID keyboard is enabled (or a physical keyboard is connected).
Also see --mouse and --gamepad.
This is a workaround for some devices not behaving as expected when setting the device clipboard programmatically.
Default is 0 (unlimited).
Possible values are "disabled", "sdk", "uhid" and "aoa":
- "disabled" does not send mouse inputs to the device.
- "sdk" uses the Android system API to deliver mouse events to
applications.
- "uhid" simulates a physical HID mouse using the Linux HID
kernel module on the device.
- "aoa" simulates a physical mouse using the AOAv2 protocol. It
may only work over USB.
In "uhid" and "aoa" modes, 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.
Also see --keyboard and --gamepad.
The argument must be one or two sequences (separated by ':') of exactly 4 characters, one for each secondary click (in order: right click, middle click, 4th click, 5th click).
The first sequence defines the primary bindings, used when a mouse button is pressed alone. The second sequence defines the secondary bindings, used when a mouse button is pressed while the Shift key is held.
If the second sequence of bindings is omitted, then it is the same as the first one.
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"
Default is 'bhsn:++++' for SDK mouse, and '++++:bhsn' for AOA and UHID.
Examples:
--new-display=1920x1080
--new-display=1920x1080/420
--new-display # main display size and density
--new-display=/240 # main display size and 240 dpi
This option disables this cleanup.
This option disables this automatic synchronization.
This option disables this behavior.
With this option, when the virtual display is closed, the running apps are moved to the main display rather than being destroyed.
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 --keyboard, --mouse and --gamepad.
Default is 27183:27199.
This is useful to prevent the terminal window from automatically closing, so that error messages can be read.
Default is "false".
Passing the option without argument is equivalent to passing "true".
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.
Possible values are 0, 90, 180 and 270. The number represents the clockwise rotation in degrees.
Default is 0.
Supported names are currently "direct3d", "opengl", "opengles2", "opengles", "metal" and "software".
<https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER>
Several shortcut modifiers can be specified, separated by ','.
For example, to use either LCtrl or LSuper for scrcpy shortcuts, pass "lctrl,lsuper".
Default is "lalt,lsuper" (left-Alt or left-Super).
Add a '?' prefix to select an app whose name starts with the given name, case-insensitive (retrieving app names on the device may take some time):
scrcpy --start-app=?firefox
Add a '+' prefix to force-stop before starting the app:
scrcpy --new-display --start-app=+org.mozilla.firefox
Both prefixes can be used, in that order:
scrcpy --start-app=+?firefox
It only shows physical touches (not clicks from scrcpy).
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.
Prefix the address with a '+' to force a reconnection.
Default is localhost.
Default is 0 (not forced): the local port used for establishing the tunnel will be used.
Default is "info" for release builds, "debug" for debug builds.
This option is similar to --video-buffer, but specific to V4L2 sink.
Default is 0 (no buffering).
This increases latency to compensate for jitter.
Default is 0 (no buffering).
Default is h264.
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 available encoders can be listed by --list-encoders.
Camera mirroring requires Android 12+.
Default is display.
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 <https://www.genymobile.com>
Copyright © 2018-2025 Romain Vimont <rom@rom1v.com>
Licensed under the Apache License, Version 2.0.
<https://github.com/Genymobile/scrcpy>