LinuxCommandLibrary

scrcpy

Display and control Android devices

TLDR

Display a mirror of a connected device

$ scrcpy
copy

Display a mirror of a specific device based on its ID or IP address (find it under the adb devices command)
$ scrcpy --serial [0123456789abcdef|192.168.0.1:5555]
copy

Start display in fullscreen mode
$ scrcpy --fullscreen
copy

Rotate the display screen. Each incremental value adds a 90 degree counterclockwise rotation
$ scrcpy --rotation [0|1|2|3]
copy

Show touches on physical device
$ scrcpy --show-touches
copy

Record display screen
$ scrcpy --record [path/to/file.mp4]
copy

Specify the target directory for pushing files to device by drag and drop (non-APK)
$ scrcpy --push-target [path/to/directory]
copy

SYNOPSIS

scrcpy [options]

PARAMETERS

--always-on-top
    Keep scrcpy window always on top.

--bit-rate value
    Set the video bit rate in Mbps (default: 8).

--crop width:height:x:y
    Crop the device screen on the server.

--display id
    Specify the display id to mirror (default: 0).

--fullscreen
    Start in fullscreen mode.

--max-fps value
    Limit the frame rate (default: 60).

--max-size value
    Limit the video resolution to VALUE (preserves aspect ratio).

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

--no-display
    Do not display the device screen.

--port value
    Set the TCP port to use for ADB forwarding.

--record file.mp4
    Record the screen to a file.

--serial serial
    Specify the device serial number.

--show-touches
    Enable 'show touches' on the device.

--turn-screen-off
    Turn off the device screen on start.

DESCRIPTION

scrcpy (screen copy) is a free and open-source screen mirroring application that allows you to display and control your Android device's screen on your computer (Linux, Windows, macOS). It requires no root access on the device.

scrcpy focuses on lightness, performance, and quality. It achieves this by communicating over ADB (Android Debug Bridge) and providing a minimal interface. Input events (keyboard, mouse) are transmitted directly to the Android device, enabling seamless interaction. Audio forwarding is supported in newer versions, enhancing the overall user experience.

The primary use case for scrcpy includes gaming, app testing, demonstrating applications, and simply accessing your phone from your desktop. It supports various configuration options to adjust video quality, resolution, and other aspects of the mirroring process. scrcpy offers command-line options for advanced usage, allowing customization and automation.

CAVEATS

Requires ADB (Android Debug Bridge) to be configured and the device to be in debugging mode.
Audio forwarding may require additional setup.

REQUIREMENTS

Your Android device must be running API level 21 (Android 5.0) or higher.
adb must be accessible in your system PATH.

DEVICE CONNECTION

Ensure your Android device is connected to your computer via USB.
Enable USB debugging in the developer options on your device.
Authorize your computer to debug your device when prompted.

HISTORY

scrcpy was initially developed by Romain Vimont and released as an open-source project. It has since gained considerable popularity within the Android developer and enthusiast communities. Development is ongoing, with new features and improvements being regularly added.

SEE ALSO

adb(1)

Copied to clipboard