Scripts2026年5月20日·1 分钟阅读

scrcpy — Display and Control Android Devices from Your Desktop

scrcpy mirrors Android device screens on your computer over USB or Wi-Fi with minimal latency and no root required. It supports audio forwarding, recording, copy-paste, and camera mirroring.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
scrcpy Overview
通用 CLI 安装命令
npx tokrepo install b4a1a332-5446-11f1-9bc6-00163e2b0d79

Introduction

scrcpy (short for "screen copy") lets you display and control Android devices connected via USB or over TCP/IP from a desktop computer. It works on Linux, Windows, and macOS without requiring root access on the device, making it a go-to tool for Android developers testing apps or anyone who wants to operate their phone from a larger screen.

What scrcpy Does

  • Mirrors the Android device screen in real time with low latency (typically 35-70 ms)
  • Supports mouse and keyboard input to control the device remotely
  • Forwards audio from the device to the computer (Android 11+)
  • Records the device screen to MP4 or MKV files
  • Mirrors the device camera as a webcam feed on the desktop

Architecture Overview

scrcpy consists of a lightweight server component (a Java application pushed to the device via adb at runtime) and a native client built on SDL2 and FFmpeg. The server captures the device screen using the Android MediaCodec API, encodes it to H.264 or H.265, and streams the frames over a socket connection. The client decodes and renders the video with minimal buffering. Control events (touch, keyboard, clipboard) are sent back over a separate socket. No installation or configuration is needed on the Android side beyond enabling USB debugging.

Self-Hosting & Configuration

  • Enable USB debugging in Android Developer Options before first use
  • Install via package managers: apt, brew, choco, or scoop depending on OS
  • Configure resolution with --max-size 1024 to reduce bandwidth on slower connections
  • Set bit rate with --video-bit-rate 2M for constrained networks
  • Use --no-audio to disable audio forwarding when only the display is needed

Key Features

  • Zero installation on the device — the server binary is pushed and cleaned up automatically
  • Works over USB and Wi-Fi with the same command-line interface
  • Copy-paste synchronization between computer and device clipboards
  • OTG mode for physical keyboard/mouse passthrough without mirroring
  • Supports multiple devices simultaneously with --serial selection

Comparison with Similar Tools

  • Vysor — freemium Chrome-based mirroring with lower quality on the free tier; scrcpy is fully open source with no watermarks
  • AirDroid — cloud-dependent with account registration; scrcpy works locally with no internet required
  • Samsung DeX — limited to Samsung devices and requires a compatible monitor; scrcpy supports any Android device
  • QtScrcpy — GUI wrapper around scrcpy with added features like key mapping for gaming

FAQ

Q: Does scrcpy require root access on the Android device? A: No. It only requires USB debugging to be enabled in Developer Options.

Q: Can I use scrcpy wirelessly without ever connecting a USB cable? A: You need an initial USB connection to configure adb tcpip, or you can pair wirelessly on Android 11+ using adb pair.

Q: Does scrcpy work with iOS devices? A: No. scrcpy is designed exclusively for Android devices using the ADB protocol.

Q: What is the typical latency? A: Over USB, latency is around 35-70 ms depending on device and encoding settings. Wi-Fi adds some overhead depending on network quality.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。