8000 GitHub - hmmhmmhm/roundness-scrcpy-mirroing: Rounded borderless scrcpy mirroring for macOS with a Dock launcher and Frida watcher · GitHub
[go: up one dir, main page]

Skip to content

About

Rounded borderless scrcpy mirroring for macOS with a Dock launcher and Frida watcher

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Roundness scrcpy mirroring

A rounded, borderless Android mirror that feels native on macOS.

Platform scrcpy Frida License

A borderless Android mirroring window with rounded corners on macOS

Install · How it works · Configuration · Uninstall

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.

Highlights

  • 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

Install

1. Prepare the Android device

Enable Developer options → USB debugging, connect exactly one Android device over USB, and accept the computer authorization prompt.

2. Run the installer

git clone https://github.com/hmmhmmhm/roundness-scrcpy-mirroing.git
cd roundness-scrcpy-mirroing
./install.sh

3. Start mirroring

Click 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.

What gets installed

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.

How it works

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
Loading
  1. The AppleScript app runs toggle-mirroring.sh.
  2. The toggle starts scrcpy with USB auto-selection and a UHID keyboard.
  3. The LaunchAgent notices the scrcpy process and attaches Frida.
  4. Frida rounds the content, hides the title bar, and locks the content ratio.
  5. The Frida session stays attached while scrcpy is running; the watcher restores it automatically if it exits.

Usage

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 -l

Configuration

The generated local configuration is stored at:

~/Library/Application Support/RoundnessScrcpyMirroring/config.sh

Change the initial width:

WINDOW_WIDTH=500

To change the corner radius, edit cornerRadius in round-scrcpy-window.js, then rerun:

./install.sh

Verify the watcher

launchctl 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]}

Troubleshooting

The Dock icon shows a question mark

Rerun ./install.sh. The installer recreates the app under ~/Applications before adding that stable path to the Dock.

The device is not detected

adb devices -l

Confirm that the device is listed as device, not unauthorized, and that only one USB device is connected.

The corners are not rounded

launchctl kickstart -k gui/$UID/com.roundness-scrcpy-mirroing.watcher
tail -50 "$HOME/Library/Application Support/RoundnessScrcpyMirroring/watcher.log"

Uninstall

From the cloned repository:

./uninstall.sh

This removes the Dock app, LaunchAgent, and installed runtime files. It leaves Homebrew, scrcpy, Frida, uv, and dockutil installed.

Security

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.

Limitations

  • macOS only
  • One scrcpy process and one USB device at a time
  • scrcpy and Frida updates may require corresponding script updates

License

MIT

About

Rounded borderless scrcpy mirroring for macOS with a Dock launcher and Frida watcher

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0