2023-12-13 11:50:06 +00:00
**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` .**
2024-09-15 19:15:26 +00:00
# scrcpy (v2.7)
2017-12-12 14:54:33 +00:00
2022-02-23 00:21:18 +00:00
< img src = "app/data/icon.svg" width = "128" height = "128" alt = "scrcpy" align = "right" / >
2021-10-23 07:29:30 +00:00
2022-01-27 16:08:14 +00:00
_pronounced "**scr**een **c**o**py** "_
2023-03-04 07:56:35 +00:00
This application mirrors Android devices (video and audio) connected via
2023-07-18 16:09:54 +00:00
USB or [over TCP/IP ](doc/connection.md#tcpip-wireless ), and allows to control the
2023-03-04 07:56:35 +00:00
device with the keyboard and the mouse of the computer. It does not require any
_root_ access. It works on _Linux_ , _Windows_ and _macOS_ .
2017-12-12 14:54:33 +00:00
2018-02-13 18:31:44 +00:00
![screenshot ](assets/screenshot-debian-600.jpg )
2017-12-12 14:54:33 +00:00
2019-08-04 12:43:08 +00:00
It focuses on:
2021-11-13 08:39:26 +00:00
- **lightness**: native, displays only the device screen
- **performance**: 30~120fps, depending on the device
- **quality**: 1920× 1080 or above
- **low latency**: [35~70ms][lowlatency]
- **low startup time**: ~1 second to display the first image
2022-04-10 15:45:34 +00:00
- **non-intrusiveness**: nothing is left installed on the Android device
2021-11-13 08:39:26 +00:00
- **user benefits**: no account, no ads, no internet required
- **freedom**: free and open source software
2019-08-04 12:43:08 +00:00
[lowlatency]: https://github.com/Genymobile/scrcpy/pull/646
2021-11-13 08:39:26 +00:00
Its features include:
2023-10-30 22:27:11 +00:00
- [audio forwarding ](doc/audio.md ) (Android 11+)
2023-03-04 07:56:35 +00:00
- [recording ](doc/recording.md )
2024-10-23 16:52:35 +00:00
- [virtual display ](doc/virtual_display.md )
2023-03-04 07:56:35 +00:00
- mirroring with [Android device screen off ](doc/device.md#turn-screen-off )
- [copy-paste ](doc/control.md#copy-paste ) in both directions
- [configurable quality ](doc/video.md )
2023-10-30 22:27:11 +00:00
- [camera mirroring ](doc/camera.md ) (Android 12+)
- [mirroring as a webcam (V4L2) ](doc/v4l2.md ) (Linux-only)
2024-02-29 09:00:56 +00:00
- physical [keyboard][hid-keyboard] and [mouse][hid-mouse] simulation (HID)
2024-09-09 16:25:50 +00:00
- [gamepad ](doc/gamepad.md ) support
2024-02-29 09:00:56 +00:00
- [OTG mode ](doc/otg.md )
2021-11-13 08:39:26 +00:00
- and more…
2017-12-12 14:54:33 +00:00
2024-02-29 09:00:56 +00:00
[hid-keyboard]: doc/keyboard.md#physical-keyboard-simulation
[hid-mouse]: doc/mouse.md#physical-mouse-simulation
2023-03-13 07:40:31 +00:00
## Prerequisites
2018-02-13 18:31:44 +00:00
2019-07-21 08:08:27 +00:00
The Android device requires at least API 21 (Android 5.0).
2018-02-13 18:31:44 +00:00
2023-04-26 13:49:26 +00:00
[Audio forwarding ](doc/audio.md ) is supported for API >= 30 (Android 11+).
2023-03-04 07:56:35 +00:00
2023-03-13 09:17:08 +00:00
Make sure you [enabled USB debugging][enable-adb] on your device(s).
2018-02-13 18:31:44 +00:00
2023-03-13 09:17:08 +00:00
[enable-adb]: https://developer.android.com/studio/debug/dev-options#enable
2018-02-13 18:31:44 +00:00
2024-08-02 16:40:07 +00:00
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][control] `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.
2018-11-25 10:29:27 +00:00
[control]: https://github.com/Genymobile/scrcpy/issues/70#issuecomment-373286323
2024-02-29 09:00:56 +00:00
Note that USB debugging is not required to run scrcpy in [OTG mode ](doc/otg.md ).
2023-03-31 05:51:34 +00:00
2018-02-13 18:31:44 +00:00
2018-08-17 15:49:13 +00:00
## Get the app
2017-12-12 14:54:33 +00:00
2023-03-04 07:56:35 +00:00
- [Linux ](doc/linux.md )
- [Windows ](doc/windows.md )
- [macOS ](doc/macos.md )
2018-09-04 16:40:57 +00:00
2018-11-11 16:27:59 +00:00
2024-02-29 08:01:25 +00:00
## Usage examples
There are a lot of options, [documented ](#user-documentation ) 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:
```bash
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
```
2024-10-23 16:52:35 +00:00
- Start VLC in a new virtual display (separate from the device display):
```bash
scrcpy --new-display=1920x1080 --start-app=org.videolan.vlc
```
2024-02-29 08:01:25 +00:00
- Record the device camera in H.265 at 1920x1080 (and microphone) to an MP4
file:
```bash
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):
```bash
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):
```bash
scrcpy --otg
```
2024-09-09 16:25:50 +00:00
- Control the device using gamepad controllers plugged into the computer:
```bash
scrcpy --gamepad=uhid
scrcpy -G # short version
```
2023-03-04 07:56:35 +00:00
## User documentation
2018-11-11 16:27:59 +00:00
2023-03-04 07:56:35 +00:00
The application provides a lot of features and configuration options. They are
documented in the following pages:
2018-11-13 19:36:57 +00:00
2023-07-14 21:29:09 +00:00
- [Connection ](doc/connection.md )
2023-03-04 07:56:35 +00:00
- [Video ](doc/video.md )
- [Audio ](doc/audio.md )
- [Control ](doc/control.md )
2024-02-29 09:00:56 +00:00
- [Keyboard ](doc/keyboard.md )
- [Mouse ](doc/mouse.md )
2024-09-09 16:25:50 +00:00
- [Gamepad ](doc/gamepad.md )
2023-07-14 21:29:09 +00:00
- [Device ](doc/device.md )
2023-03-04 07:56:35 +00:00
- [Window ](doc/window.md )
- [Recording ](doc/recording.md )
2024-10-23 16:52:35 +00:00
- [Virtual display ](doc/virtual_displays.md )
2023-03-04 07:56:35 +00:00
- [Tunnels ](doc/tunnels.md )
2024-02-29 09:00:56 +00:00
- [OTG ](doc/otg.md )
2023-10-30 22:27:11 +00:00
- [Camera ](doc/camera.md )
2023-03-04 07:56:35 +00:00
- [Video4Linux ](doc/v4l2.md )
- [Shortcuts ](doc/shortcuts.md )
2018-11-13 19:36:57 +00:00
2023-03-04 07:56:35 +00:00
## Resources
2018-11-13 19:36:57 +00:00
2023-03-04 07:56:35 +00:00
- [FAQ ](FAQ.md )
- [Translations][wiki] (not necessarily up to date)
- [Build instructions ](doc/build.md )
- [Developers ](doc/develop.md )
2018-11-13 19:36:57 +00:00
2023-03-04 07:56:35 +00:00
[wiki]: https://github.com/Genymobile/scrcpy/wiki
2018-03-08 08:25:02 +00:00
2023-03-04 07:56:35 +00:00
## Articles
2018-03-08 08:25:02 +00:00
2023-03-04 07:56:35 +00:00
- [Introducing scrcpy][article-intro]
- [Scrcpy now works wirelessly][article-tcpip]
2023-03-12 20:08:30 +00:00
- [Scrcpy 2.0, with audio][article-scrcpy2]
2018-03-08 08:25:02 +00:00
2023-03-04 07:56:35 +00:00
[article-intro]: https://blog.rom1v.com/2018/03/introducing-scrcpy/
[article-tcpip]: https://www.genymotion.com/blog/open-source-project-scrcpy-now-works-wirelessly/
2023-03-12 20:08:30 +00:00
[article-scrcpy2]: https://blog.rom1v.com/2023/03/scrcpy-2-0-with-audio/
2018-08-17 15:49:13 +00:00
2023-03-04 07:56:35 +00:00
## Contact
2018-08-17 15:49:13 +00:00
2024-07-19 15:51:50 +00:00
You can open an [issue] for bug reports, feature requests or general questions.
For bug reports, please read the [FAQ ](FAQ.md ) first, you might find a solution
to your problem immediately.
2018-08-17 15:49:13 +00:00
2023-03-04 07:56:35 +00:00
[issue]: https://github.com/Genymobile/scrcpy/issues
2018-03-11 09:34:11 +00:00
2024-07-19 15:51:50 +00:00
You can also use:
2022-02-22 18:31:35 +00:00
2023-03-04 07:56:35 +00:00
- Reddit: [`r/scrcpy` ](https://www.reddit.com/r/scrcpy )
- Twitter: [`@scrcpy_app` ](https://twitter.com/scrcpy_app )
2018-03-11 09:34:11 +00:00
2023-03-04 07:56:35 +00:00
## Donate
2018-03-08 08:25:02 +00:00
2023-03-04 07:56:35 +00:00
I'm [@rom1v ](https://github.com/rom1v ), the author and maintainer of _scrcpy_ .
2018-03-08 08:25:02 +00:00
2023-03-04 07:56:35 +00:00
If you appreciate this application, you can [support my open source
2023-06-27 19:23:42 +00:00
work][donate]:
- [GitHub Sponsors ](https://github.com/sponsors/rom1v )
- [Liberapay ](https://liberapay.com/rom1v/ )
- [PayPal ](https://paypal.me/rom2v )
2018-03-08 08:25:02 +00:00
2023-03-04 07:56:35 +00:00
[donate]: https://blog.rom1v.com/about/#support-my-open-source-work
2018-03-08 08:25:02 +00:00
2018-02-13 18:31:44 +00:00
## Licence
2017-12-12 14:54:33 +00:00
2018-02-13 18:31:44 +00:00
Copyright (C) 2018 Genymobile
2024-03-02 14:39:56 +00:00
Copyright (C) 2018-2024 Romain Vimont
2017-12-12 14:54:33 +00:00
2018-02-13 18:31:44 +00:00
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
2017-12-12 14:54:33 +00:00
2018-02-13 18:31:44 +00:00
http://www.apache.org/licenses/LICENSE-2.0
2018-02-04 11:17:34 +00:00
2018-02-13 18:31:44 +00:00
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.