Scroll to navigation

scrcpy(1) General Commands Manual scrcpy(1)

NAME

scrcpy - Display and control your Android device

SYNOPSIS

scrcpy [options]

DESCRIPTION

scrcpy provides display and control of Android devices connected on USB (or over TCP/IP). It does not require any root access.

OPTIONS

Make scrcpy window always on top (above other windows).

Encode the video at the given bit-rate, expressed in bits/s. Unit suffixes are supported: 'K' (x1000) and 'M' (x1000000).

Default is 8000000.

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 https://d.android.com/reference/android/media/MediaFormat.

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 --max-size value is computed on the cropped size.

Disable screensaver while scrcpy is running.

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.

Use a specific MediaCodec encoder (must be a H.264 encoder).

Do not attempt to use "adb reverse" to connect to the device.

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.

Start in fullscreen.

Print this help.

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.

Lock video orientation to value. Possible values are -1 (unlocked), 0, 1, 2 and 3. Natural device orientation is 0, and each increment adds a 90 degrees otation counterclockwise.

Default is -1 (unlocked).

Limit the framerate of screen capture (officially supported since Android 10, but may work on earlier versions).

Limit both the width and height of the video to value. The other dimension is computed so that the device aspect-ratio is preserved.

Default is 0 (unlimited).

Disable device control (mirror the device in read-only).

Do not display device (only when screen recording is enabled).

Do not forward repeated key events when a key is held down.

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.

Set the TCP port (range) used by the client to listen.

Default is 27183:27199.

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).

Set the target directory for pushing files to the device by drag & drop. It is passed as-is to "adb push".

Default is "/sdcard/".

Record screen to file.

The format is determined by the --record-format option if set, or by the file extension (.mp4 or .mkv).

Force recording format (either mp4 or mkv).

Request SDL to use the given render driver (this is just a hint).

Supported names are currently "direct3d", "opengl", "opengles2", "opengles", "metal" and "software".

https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER

By default, to minimize latency, scrcpy always renders the last available decoded frame, and drops any previous ones. This flag forces to render all frames, at a cost of a possible increased latency.

Set the initial display rotation. Possibles values are 0, 1, 2 and 3. Each increment adds a 90 degrees rotation counterclockwise.

The device serial number. Mandatory only if several devices are connected to adb.

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".

Default is "lalt,lsuper" (left-Alt or left-Super).

Turn the device screen off immediately.

Enable "show touches" on start, restore the initial value on exit.

It only shows physical touches (not clicks from scrcpy).

Print the version of scrcpy.

Set the log level ("debug", "info", "warn" or "error").

Default is "info" for release builds, "debug" for debug builds.

Keep the device on while scrcpy is running, when the device is plugged in.

Disable window decorations (display borderless window).

Set a custom window title.

Set the initial window horizontal position.

Default is "auto".

Set the initial window vertical position.

Default is "auto".

Set the initial window width.

Default is 0 (automatic).

Set the initial window height.

Default is 0 (automatic).

SHORTCUTS

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).

Switch fullscreen mode

Rotate display left

Rotate display right

Resize window to 1:1 (pixel-perfect)

Resize window to remove black borders

Click on HOME

Click on BACK

Click on APP_SWITCH

Click on MENU

Click on VOLUME_UP

Click on VOLUME_DOWN

Click on POWER (turn screen on/off)

Turn screen on

Turn device screen off (keep mirroring)

Turn device screen on

Rotate device screen

Expand notification panel

Collapse notification panel

Copy to clipboard (inject COPY keycode, Android >= 7 only)

Cut to clipboard (inject CUT keycode, Android >= 7 only)

Copy computer clipboard to device, then paste (inject PASTE keycode, Android >= 7 only)

Inject computer clipboard text as a sequence of key events

Enable/disable FPS counter (print frames/second in logs)

Pinch-to-zoom from the center of the screen

Install APK from computer

Environment variables

Specify the path to adb.

Specify the path to server binary.

AUTHORS

scrcpy is written by Romain Vimont.

This manual page was written by Yangfl for the Debian Project (and may be used by others).

REPORTING BUGS

Report bugs to https://github.com/Genymobile/scrcpy/issues.

COPYRIGHT

Copyright © 2018 Genymobile Genymobile

Copyright © 2018-2020 Romain Vimont

Licensed under the Apache License, Version 2.0.

WWW

https://github.com/Genymobile/scrcpy