Roundness scrcpy mirroring wraps scrcpy
with a Dock launcher and a small per-user LaunchAgent. Frida applies native
NSWindow styling after scrcpy starts—without modifying scrcpy or storing a
device serial number.
- Rounded and borderless — keeps the video flush with the window edge
- Native top-edge dragging — move the window from its hidden macOS title bar
- Direct Android control — clicks and swipes pass through everywhere else
- Unicode and IME input — UHID enables direct multilingual keyboard input
- Locked aspect ratio — diagonal resizing preserves the mirrored display shape
- Dock toggle — one click opens the mirror; another closes it
- Self-healing styling — the watcher reconnects if Frida exits
- Device-agnostic — uses
scrcpy --select-usb, not a serial or product name
Enable Developer options → USB debugging, connect exactly one Android device over USB, and accept the computer authorization prompt.
git clone https://github.com/hmmhmmhm/roundness-scrcpy-mirroing.git
cd roundness-scrcpy-mirroing
./install.shClick Roundness scrcpy Mirroring in the Dock.
On the first launch, open Android's Physical keyboard settings with MOD+K and configure the scrcpy keyboard layout. On macOS, MOD is the left Option or Command key by default. Switch languages with the shortcut configured by Android (commonly Shift+Space).
Note
Homebrew is required. The installer adds missing
dependencies with Homebrew (scrcpy, uv, and dockutil) and installs
frida-tools with uv.
| Component | Location |
|---|---|
| Dock app | ~/Applications/Roundness scrcpy Mirroring.app |
| Runtime files | ~/Library/Application Support/RoundnessScrcpyMirroring/ |
| LaunchAgent | ~/Library/LaunchAgents/com.roundness-scrcpy-mirroing.watcher.plist |
The runtime files are copied to a stable location, so moving or deleting the cloned repository does not break the LaunchAgent.
flowchart LR
A[Dock app] --> B[toggle-mirroring.sh]
B --> C[scrcpy]
D[LaunchAgent] --> E[watch-scrcpy.sh]
E --> F[Frida]
F --> G[Native NSWindow styling]
C --> G
- The AppleScript app runs
toggle-mirroring.sh. - The toggle starts scrcpy with USB auto-selection and a UHID keyboard.
- The LaunchAgent notices the scrcpy process and attaches Frida.
- Frida rounds the content, hides the title bar, and locks the content ratio.
- The Frida session stays attached while scrcpy is running; the watcher restores it automatically if it exits.
Click the Dock icon once to open the mirror and again to close it. Let scrcpy finish closing before immediately reopening it.
The launcher expects exactly one USB-debugging Android device. Check the connection with:
adb devices -lThe generated local configuration is stored at:
~/Library/Application Support/RoundnessScrcpyMirroring/config.sh
Change the initial width:
WINDOW_WIDTH=500To change the corner radius, edit cornerRadius in
round-scrcpy-window.js, then rerun:
./install.shlaunchctl print gui/$UID/com.roundness-scrcpy-mirroing.watcher
tail -f "$HOME/Library/Application Support/RoundnessScrcpyMirroring/watcher.log"A successful attachment prints output similar to:
{"title":"scrcpy mirror","cornerRadius":26,"contentAspectRatio":[500,624]}Rerun ./install.sh. The installer recreates the app under ~/Applications
before adding that stable path to the Dock.
adb devices -lConfirm that the device is listed as device, not unauthorized, and that only
one USB device is connected.
launchctl kickstart -k gui/$UID/com.roundness-scrcpy-mirroing.watcher
tail -50 "$HOME/Library/Application Support/RoundnessScrcpyMirroring/watcher.log"From the cloned repository:
./uninstall.shThis removes the Dock app, LaunchAgent, and installed runtime files. It leaves Homebrew, scrcpy, Frida, uv, and dockutil installed.
Frida attaches only to the local scrcpy process to change its NSWindow.
Nothing is uploaded. The AppleScript launcher is compiled and ad-hoc signed on
the local Mac.
- macOS only
- One scrcpy process and one USB device at a time
- scrcpy and Frida updates may require corresponding script updates