This document provides a high-level introduction to scrcpy, its architecture, and how the major components interact. It is intended for developers who want to understand the system structure before diving into specific subsystems.
For installation instructions, see Installation & Setup. For command-line usage, see Command-Line Interface. For detailed architecture and communication protocols, see System Architecture.
scrcpy (pronounced "screen copy") is a screen mirroring and control application that displays and controls Android devices from desktop computers. It operates as a client-server system where a lightweight Java server runs on the Android device and a native client application runs on the desktop (Linux, Windows, or macOS).
Key characteristics:
scrcpy-server) is deployed temporarily via ADB and leaves no permanent installation [README.md:30-30].Sources: README.md6-61
scrcpy consists of two main components that communicate over network sockets established via ADB:
The architecture follows a clear separation:
Sources: app/src/main.c27-126 app/src/scrcpy.h19-20 app/meson.build1-69
The system follows a well-defined initialization and runtime sequence:
Key phases:
main.c calls scrcpy_parse_args() to process command-line options into struct scrcpy_options [app/src/main.c:54-57].server.c [app/meson.build:35-35].app_process on the device, typically using Server.java as the entry point.scrcpy() to process media and inputs [app/src/scrcpy.h:19-20].Sources: app/src/main.c39-107 app/src/scrcpy.h8-20 install_release.sh1-22
scrcpy uses separate build systems for client and server:
Client Build:
Server Build:
scrcpy-server) [install_release.sh:9-16].Simplified Installation:
The install_release.sh script automates installation on Linux by downloading a prebuilt server and building the client [install_release.sh:1-22].
Sources: doc/build.md1-270 install_release.sh1-22 app/meson.build1-198
For more detailed information on specific subsystems:
Refresh this wiki
This wiki was recently refreshed. Please wait 3 days to refresh again.