# scrcpy (v1.17)
[Read in another language](#translations)
This application provides display and control of Android devices connected on
USB (or [over TCP/IP][article-tcpip]). It does not require any _root_ access.
It works on _GNU/Linux_, _Windows_ and _macOS_.
![screenshot](assets/screenshot-debian-600.jpg)
It focuses on:
- **lightness** (native, displays only the device screen)
- **performance** (30~60fps)
- **quality** (1920×1080 or above)
- **low latency** ([35~70ms][lowlatency])
- **low startup time** (~1 second to display the first image)
- **non-intrusiveness** (nothing is left installed on the device)
[lowlatency]: https://github.com/Genymobile/scrcpy/pull/646
## Requirements
The Android device requires at least API 21 (Android 5.0).
Make sure you [enabled adb debugging][enable-adb] on your device(s).
[enable-adb]: https://developer.android.com/studio/command-line/adb.html#Enabling
On some devices, you also need to enable [an additional option][control] to
control it using keyboard and mouse.
[control]: https://github.com/Genymobile/scrcpy/issues/70#issuecomment-373286323
## Get the app
<a href="https://repology.org/project/scrcpy/versions"><img src="https://repology.org/badge/vertical-allrepos/scrcpy.svg" alt="Packaging status" align="right"></a>
### Summary
- Linux: `apt install scrcpy`
- Windows: [download][direct-win64]
- macOS: `brew install scrcpy`
Build from sources: [BUILD] ([simplified process][BUILD_simple])
[BUILD]: BUILD.md
[BUILD_simple]: BUILD.md#simple
### Linux
On Debian (_testing_ and _sid_ for now) and Ubuntu (20.04):
```
apt install scrcpy
```
A [Snap] package is available: [`scrcpy`][snap-link].
[snap-link]: https://snapstats.org/snaps/scrcpy
[snap]: https://en.wikipedia.org/wiki/Snappy_(package_manager)
For Fedora, a [COPR] package is available: [`scrcpy`][copr-link].
[COPR]: https://fedoraproject.org/wiki/Category:Copr
[copr-link]: https://copr.fedorainfracloud.org/coprs/zeno/scrcpy/
For Arch Linux, an [AUR] package is available: [`scrcpy`][aur-link].
[AUR]: https://wiki.archlinux.org/index.php/Arch_User_Repository
[aur-link]: https://aur.archlinux.org/packages/scrcpy/
For Gentoo, an [Ebuild] is available: [`scrcpy/`][ebuild-link].
[Ebuild]: https://wiki.gentoo.org/wiki/Ebuild
[ebuild-link]: https://github.com/maggu2810/maggu2810-overlay/tree/master/app-mobilephone/scrcpy
You could also [build the app manually][BUILD] ([simplified
process][BUILD_simple]).
### Windows
For Windows, for simplicity, a prebuilt archive with all the dependencies
(including `adb`) is available:
- [`scrcpy-win64-v1.17.zip`][direct-win64]
_(SHA-256: 8b9e57993c707367ed10ebfe0e1ef563c7a29d9af4a355cd8b6a52a317c73eea)_
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v1.17/scrcpy-win64-v1.17.zip
It is also available in [Chocolatey]:
[Chocolatey]: https://chocolatey.org/
```bash
choco install scrcpy
choco install adb # if you don't have it yet
```
And in [Scoop]:
```bash
scoop install scrcpy
scoop install adb # if you don't have it yet
```
[Scoop]: https://scoop.sh
You can also [build the app manually][BUILD].
### macOS
The application is available in [Homebrew]. Just install it:
[Homebrew]: https://brew.sh/
```bash
brew install scrcpy
```
You need `adb`, accessible from your `PATH`. If you don't have it yet:
```bash
brew install android-platform-tools
```
It's also available in [MacPorts], which sets up adb for you:
```bash
sudo port install scrcpy
```
[MacPorts]: https://www.macports.org/
You can also [build the app manually][BUILD].
## Run
Plug an Android device, and execute:
```bash
scrcpy
```
It accepts command-line arguments, listed by:
```bash
scrcpy --help
```
## Features
### Capture configuration
#### Reduce size
Sometimes, it is useful to mirror an Android device at a lower definition to
increase performance.
To limit both the width and height to some value (e.g. 1024):
```bash
scrcpy --max-size 1024
scrcpy -m 1024 # short version
```
The other dimension is computed to that the device aspect ratio is preserved.
That way, a device in 1920×1080 will be mirrored at 1024×576.
#### Change bit-rate
The default bit-rate is 8 Mbps. To change the video bitrate (e.g. to 2 Mbps):
```bash
scrcpy --bit-rate 2M
scrcpy -b 2M # short version
```
#### Limit frame rate
The capture frame rate can be limited:
```bash
scrcpy --max-fps 15
```
This is officially supported since Android 10, but may work on earlier versions.
#### Crop
The device screen may be cropped to mirror only part of the screen.
This is useful for example to mirror only one eye of the Oculus Go:
```bash
scrcpy --crop 1224:1440:0:0 # 1224x1440 at offset (0,0)
```
If `--max-size` is also specified, resizing is applied after cropping.
#### Lock video orientation
To lock the orientation of the mirroring:
```bash
scrcpy --lock-video-orientation 0 # natural orientation
scrcpy --lock-video-orientation 1 # 90° counterclockwise
scrcpy --lock-video-orientation 2 # 180°
scrcpy --lock-video-orientation 3 # 90° clockwise
```
This affects recording orientation.
The [window may also be rotated](#rotation) independently.
#### Encoder
Some devices have more than one encoder, and some of them may cause issues or
crash. It is possible to select a different encoder:
```bash
scrcpy --encoder OMX.qcom.video.encoder.avc
```
To list the available encoders, you could pass an invalid encoder name, the
error will give the available encoders:
```bash
scrcpy --encoder _
```
### Recording
It is possible to record the screen while mirroring:
```bash
scrcpy --record file.mp4
scrcpy -r file.mkv
```
To disable mirroring while recording:
```bash
scrcpy --no-display --record file.mp4
scrcpy -Nr file.mkv
# interrupt recording with Ctrl+C
```
"Skipped frames" are recorded, even if they are not displayed in real time (for
performance reasons). Frames are _timestamped_ on the device, so [packet delay
variation] does not impact the recorded file.
[packet delay variation]: https://en.wikipedia.org/wiki/Packet_delay_variation
### Connection
#### Wireless
_Scrcpy_ uses `adb` to communicate with the device, and `adb` can [connect] to a
device over TCP/IP:
1. Connect the device to the same Wi-Fi as your computer.
2. Get your device IP address, in Settings → About phone → Status, or by
executing this command:
```bash
adb shell ip route | awk '{print $9}'
```
3. Enable adb over TCP/IP on your device: `adb tcpip 5555`.
4. Unplug your device.
5. Connect to your device: `adb connect DEVICE_IP:5555` _(replace `DEVICE_IP`)_.
6. Run `scrcpy` as usual.
It may be useful to decrease the bit-rate and the definition:
```bash
scrcpy --bit-rate 2M --max-size 800
scrcpy -b2M -m800 # short version
```
[connect]: https://developer.android.com/studio/command-line/adb.html#wireless
#### Multi-devices
If several devices are listed in `adb devices`, you must specify the _serial_:
```bash
scrcpy --serial 0123456789abcdef
scrcpy -s 0123456789abcdef # short version
```
If the device is connected over TCP/IP:
```bash
scrcpy --serial 192.168.0.1:5555
scrcpy -s 192.168.0.1:5555 # short version
```
You can start several instances of _scrcpy_ for several devices.
#### Autostart on device connection
You could use [AutoAdb]:
```bash
autoadb scrcpy -s '{}'
```
[AutoAdb]: https://github.com/rom1v/autoadb
#### SSH tunnel
To connect to a remote device, it is possible to connect a local `adb` client to
a remote `adb` server (provided they use the same version of the _adb_
protocol):
```bash
adb kill-server # kill the local adb server on 5037
ssh -CN -L5037:localhost:5037 -R27183:localhost:27183 your_remote_computer
# keep this open
```
From another terminal:
```bash
scrcpy
```
To avoid enabling remote port forwarding, you could force a forward connection
instead (notice the `-L` instead of `-R`):
```bash
adb kill-server # kill the local adb server on 5037
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
scrcpy(v1.17) 此应用程序提供了对通过USB(或 )连接的Android设备的显示和控制。 它不需要任何根访问权限。 它可以在GNU / Linux , Windows和macOS上运行。 它着重于: 亮度(本机,仅显示设备屏幕) 性能(30〜60fps) 画质(1920×1080或以上) 低延迟( ) 启动时间短(〜1秒可显示第一个图像) 非侵入性(设备上未安装任何东西) 要求 Android设备至少需要API 21(Android 5.0)。 确保在设备上。 在某些设备上,您还需要启用才能使用键盘和鼠标对其进行控制。 下载这个软件 概括 Linux: apt install scrcpy Windows: macOS: brew install scrcpy 从源: () Linux 在Debian(目前测试和sid )和Ubuntu(20.04
资源详情
资源评论
资源推荐
收起资源包目录
scrcpy:显示和控制您的Android设备 (156个子文件)
scrcpy.1 8KB
IRotationWatcher.aidl 801B
IOnPrimaryClipChangedListener.aidl 757B
gradlew.bat 3KB
scrcpy-console.bat 90B
meson.build 5KB
meson.build 1KB
meson.build 345B
cli.c 31KB
input_manager.c 23KB
screen.c 20KB
server.c 18KB
scrcpy.c 14KB
recorder.c 11KB
test_control_msg_serialize.c 8KB
stream.c 8KB
test_strutil.c 7KB
event_converter.c 6KB
command.c 6KB
file_handler.c 6KB
test_cli.c 5KB
fps_counter.c 5KB
command.c 4KB
str_util.c 4KB
control_msg.c 4KB
tiny_xpm.c 3KB
controller.c 3KB
video_buffer.c 3KB
net.c 3KB
main.c 3KB
decoder.c 3KB
receiver.c 3KB
command.c 3KB
opengl.c 2KB
test_buffer_util.c 2KB
test_cbuf.c 2KB
test_device_msg_deserialize.c 2KB
device_msg.c 1KB
device.c 884B
test_queue.c 757B
.gitignore 88B
.gitignore 83B
.gitignore 40B
build.gradle 700B
android-checkstyle.gradle 642B
build.gradle 626B
settings.gradle 18B
gradlew 6KB
input.h 31KB
keycodes.h 28KB
screen.h 4KB
scrcpy.h 3KB
control_msg.h 2KB
command.h 2KB
queue.h 2KB
compat.h 2KB
str_util.h 2KB
input_manager.h 2KB
server.h 2KB
recorder.h 2KB
video_buffer.h 1KB
lock.h 1KB
file_handler.h 1KB
cbuf.h 1KB
fps_counter.h 1KB
net.h 1KB
buffer_util.h 982B
controller.h 913B
stream.h 826B
device_msg.h 747B
opengl.h 718B
event_converter.h 643B
common.h 628B
receiver.h 627B
decoder.h 536B
log.h 511B
cli.h 428B
device.h 306B
events.h 133B
tiny_xpm.h 126B
gradle-wrapper.jar 57KB
ControlMessageReaderTest.java 15KB
Controller.java 10KB
Device.java 10KB
ScreenEncoder.java 10KB
Server.java 9KB
ControlMessageReader.java 6KB
KeyComposition.java 6KB
ScreenInfo.java 6KB
ContentProvider.java 5KB
ClipboardManager.java 5KB
SurfaceControl.java 5KB
DesktopConnection.java 4KB
ControlMessage.java 4KB
WindowManager.java 4KB
CodecOptionsTest.java 4KB
ServiceManager.java 4KB
Workarounds.java 4KB
ActivityManager.java 3KB
CodecOption.java 3KB
共 156 条
- 1
- 2
xrxiong
- 粉丝: 19
- 资源: 4728
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- STM32单片机FPGA毕设电路原理论文报告汽车电动助力转向单片机控制系统设计与试验研究
- STM32单片机FPGA毕设电路原理论文报告气压传感器神经网络算法及单片机实现
- STM32单片机FPGA毕设电路原理论文报告频率的测量在单片机设计中的应用
- 音频转码工具(用于将微信语音 amr 格式转换为 mp3 格式以便在 html5 的 audio 标签中进行播放).zip
- RDK-Web-Performance-Node
- STM32单片机FPGA毕设电路原理论文报告片式电容器浪涌及老化测试系统的设计与实现
- 一个简易的贪吃蛇小游戏(C语言作业).zip
- 国家游戏防沉迷系统接口(php)
- STM32单片机FPGA毕设电路原理论文报告片剂硬度测试仪的液晶显示界面设计
- STM32单片机FPGA毕设电路原理论文报告偏磁式消弧线圈的动态调谐装置
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0