免费开源的投屏软件,支持将安卓手机屏幕投放在 Windows、macOS、GNU/Linux 上,并可直接借助鼠标在投屏窗口中进行交互和录制。

Romain Vimont 665ccb32f5 Update links to 2.7 1 月之前
.github bbfac9ae1f Add FUNDING.yml 3 月之前
app 292adf294d Bump version to 2.7 1 月之前
assets 8ace3d1781 Update README 6 年之前
config 86808e8114 Upgrade Android checkstyle to 10.12.5 11 月之前
doc 665ccb32f5 Update links to 2.7 1 月之前
gradle e8801cc3c0 Upgrade AGP (8.1.3) and Gradle to 8.4 11 月之前
server 292adf294d Bump version to 2.7 1 月之前
.gitignore 90ca46ee41 Add scrcpy-server to .gitignore 1 年之前
FAQ.md b9d244b4c9 Document UHID 7 月之前
LICENSE 125b1103e1 Happy new year 2024! 7 月之前
README.md 665ccb32f5 Update links to 2.7 1 月之前
build.gradle 9030bd8be4 Upgrade AGP from 8.1.3 to 8.3.0 4 月之前
bump_version 892cfe943e Add script to bump version 2 年之前
cross_win32.txt 67f356f881 Improve crossbuild 11 月之前
cross_win64.txt 67f356f881 Improve crossbuild 11 月之前
gradle.properties d706c5df39 Enable video output file, with pts set by server 6 年之前
gradlew 9e78b765da Update to Gradle 6.3 4 年之前
gradlew.bat 9e78b765da Update to Gradle 6.3 4 年之前
install_release.sh 665ccb32f5 Update links to 2.7 1 月之前
meson.build 292adf294d Bump version to 2.7 1 月之前
meson_options.txt ca9e1a0514 Add compilation flag for USB features 2 年之前
release.mk 3b241af3f6 Allow to pass an explicit version name on release 1 月之前
release.sh 6ab80e4ce8 Rename release.make to release.mk 3 年之前
run 88543cb545 Fix icon path in ./run 2 年之前
settings.gradle b67907e24e Convert server to an Android project 6 年之前

README.md

This GitHub repo (https://github.com/Genymobile/scrcpy) is the only official source for the project. Do not download releases from random websites, even if their name contains scrcpy.

scrcpy (v2.7)

scrcpy

pronounced "screen copy"

This application mirrors Android devices (video and audio) connected via USB or over TCP/IP, and allows to control the device with the keyboard and the mouse of the computer. It does not require any root access. It works on Linux, Windows and macOS.

screenshot

It focuses on:

  • lightness: native, displays only the device screen
  • performance: 30~120fps, depending on the device
  • quality: 1920×1080 or above
  • low latency: 35~70ms
  • low startup time: ~1 second to display the first image
  • non-intrusiveness: nothing is left installed on the Android device
  • user benefits: no account, no ads, no internet required
  • freedom: free and open source software

Its features include:

Prerequisites

The Android device requires at least API 21 (Android 5.0).

Audio forwarding is supported for API >= 30 (Android 11+).

Make sure you enabled USB debugging on your device(s).

On some devices (especially Xiaomi), you might get the following error:

java.lang.SecurityException: Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.

In that case, you need to enable an additional option USB debugging (Security Settings) (this is an item different from USB debugging) to control it using a keyboard and mouse. Rebooting the device is necessary once this option is set.

Note that USB debugging is not required to run scrcpy in OTG mode.

Get the app

Usage examples

There are a lot of options, documented in separate pages. Here are just some common examples.

  • Capture the screen in H.265 (better quality), limit the size to 1920, limit the frame rate to 60fps, disable audio, and control the device by simulating a physical keyboard:

    scrcpy --video-codec=h265 --max-size=1920 --max-fps=60 --no-audio --keyboard=uhid
    scrcpy --video-codec=h265 -m1920 --max-fps=60 --no-audio -K  # short version
    
    • Record the device camera in H.265 at 1920x1080 (and microphone) to an MP4 file:
    scrcpy --video-source=camera --video-codec=h265 --camera-size=1920x1080 --record=file.mp4
    
  • Capture the device front camera and expose it as a webcam on the computer (on Linux):

    scrcpy --video-source=camera --camera-size=1920x1080 --camera-facing=front --v4l2-sink=/dev/video2 --no-playback
    
    • Control the device without mirroring by simulating a physical keyboard and mouse (USB debugging not required):
    scrcpy --otg
    
  • Control the device using gamepad controllers plugged into the computer:

    scrcpy --gamepad=uhid
    scrcpy -G  # short version
    

    User documentation

    The application provides a lot of features and configuration options. They are documented in the following pages:

    Resources

    Articles

    Contact

    You can open an issue for bug reports, feature requests or general questions.

    For bug reports, please read the FAQ first, you might find a solution to your problem immediately.

    You can also use:

    Donate

    I'm @rom1v, the author and maintainer of scrcpy.

    If you appreciate this application, you can support my open source work:

    Licence

    Copyright (C) 2018 Genymobile Copyright (C) 2018-2024 Romain Vimont

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0
    

    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.