No description
  • Swift 97.8%
  • Shell 2.2%
Find a file
2026-09-02 14:35:00 +02:00
.claude/skills/release Fix tea asset subcommand order in release skill 2026-06-29 09:49:42 +02:00
Scrcpy.icon Add app icon (Icon Composer .icon) 2026-06-26 13:12:19 +02:00
ScrcpyManager Stabilize device transport and detached sessions 2026-09-02 14:35:00 +02:00
Scripts Add wireless ADB pairing and a bundled, self-updating adb 2026-06-29 08:55:54 +02:00
Tests Stabilize device transport and detached sessions 2026-09-02 14:35:00 +02:00
.gitignore Add drag & drop to install APKs and push files to the device 2026-07-28 11:59:51 +02:00
CLAUDE.md Add drag & drop to install APKs and push files to the device 2026-07-28 11:59:51 +02:00
project.yml Stabilize device transport and detached sessions 2026-09-02 14:35:00 +02:00
README.md Add drag & drop to install APKs and push files to the device 2026-07-28 11:59:51 +02:00

ScrcpyManager

A native macOS app for mirroring and controlling Android devices. It lists connected devices and streams each one with low latency, attached to the main window by default and detachable into its own window per device.

Unlike a wrapper around the scrcpy binary, ScrcpyManager is a custom scrcpy client: it bundles scrcpy-server.jar, speaks the scrcpy v4.0 protocol directly, decodes H.264 with VideoToolbox (hardware), and renders into an AVSampleBufferDisplayLayer. This keeps the footprint small (one app process, no FFmpeg/SDL) and makes true attach/detach possible — macOS does not allow embedding another process's window.

Features

  • Live device list via adb, with hot-plug detection
  • Hardware-decoded mirroring (H.264 / VideoToolbox)
  • Detachable per-device windows — move a device into its own window without interrupting the stream
  • Full control: mouse (tap/drag/scroll), keyboard, and clipboard sync
  • Drag & drop onto the mirrored screen — APKs install, other files land in /sdcard/Download
  • scrcpy device-action shortcuts (see below)
  • Auto-connect toggle — connect ready devices automatically as they appear
  • Built-in scrcpy-server updater — checks GitHub releases, shows release notes, verifies the download's SHA-256, and installs without modifying the app bundle

Requirements

  • macOS 14+ (Apple Silicon or Intel)
  • Xcode 26+ (the app icon uses the Icon Composer .icon format)
  • adb (Android platform-tools) on the system
  • XcodeGen (brew install xcodegen) — the Xcode project is generated, not committed
  • An Android device with USB debugging enabled

Build & run

xcodegen generate
xcodebuild -project ScrcpyManager.xcodeproj -scheme ScrcpyManager -destination 'platform=macOS' build
# or just open ScrcpyManager.xcodeproj in Xcode and run

Run the tests:

xcodebuild -project ScrcpyManager.xcodeproj -scheme ScrcpyManagerTests -destination 'platform=macOS' test

Usage

  1. Connect an Android device (USB debugging on). It appears in the sidebar.
  2. Select it and click Connect (or enable the Auto-connect toolbar toggle).
  3. Click Detach to pop the device into its own window; Reattach or close the window to bring it back.
  4. Click the video to give it keyboard focus, then control the device.

Mouse

Input Action
Left click / drag Tap / swipe
Right click Back
Middle click Home
4th button App switch
5th button Notification panel
Scroll wheel Scroll

Keyboard

Typing is injected as text; Enter / Backspace / Tab / Esc / arrows map to Android keys.

⌘C / ⌘V (or ⌥c / ⌥v) copy from / paste to the device clipboard.

scrcpy shortcuts (MOD = Option)

Shortcut Action Shortcut Action
⌥h Home ⌥o / ⌥⇧o Screen off / on
⌥b Back ⌥r Rotate device
⌥s App switch ⌥n / ⌥⇧n Notifications / collapse
⌥m Menu ⌥c / ⌥x Copy / cut from device
⌥p Power ⌥v Sync clipboard & paste
⌥↑ / ⌥↓ Volume up / down ⌥⇧v Inject clipboard as text

(not ) is used as MOD because ⌘W/⌘H/⌘M/⌘Q are owned by macOS.

Updating scrcpy-server

The app bundles a baseline scrcpy-server.jar and prefers any newer jar downloaded into ~/Library/Application Support/ScrcpyManager/. Open the ⬇︎ toolbar button to view the current/latest versions and release notes and to update. Updates are gated by protocol major version; a new major waits for explicit confirmation.

Scripts/update-bundled-server.sh runs as a best-effort pre-build step to keep the bundled baseline current (skippable with SKIP_SERVER_FETCH=1).

Project layout

ScrcpyManager/
  Adb/        adb subprocess wrapper, device listing
  Models/     device list, per-device session, session manager
  Net/        local listener, reverse tunnel, video/control sockets, protocol parsing
  Video/      VideoToolbox decoder + AVSampleBufferDisplayLayer view + input handling
  Control/    control-message serialization, Android keycodes
  Update/     GitHub release client, jar store, update service
  UI/         SwiftUI views
  Resources/  bundled scrcpy-server.jar + version marker
Scripts/      build-time server refresh
Tests/        unit tests (parsing, versioning, control messages)
project.yml   XcodeGen spec (source of truth for the project)
Scrcpy.icon   Icon Composer app icon