Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrmux — mirror every Android device in one window

scrmux is a lightweight Linux tool that mirrors all of your connected Android phones inside a single window, one pane per device, side by side. It is built on top of scrcpy and adb, but instead of the usual one-window-per-phone sprawl, it reparents each mirror into one clean, fully resizable window and labels every pane for you.

Each pane gets its own coloured header: green for a rooted device, orange for a non-rooted one, with the phone's model next to it. scrmux works out which is which on its own — no configuration, no flags. Plug in a phone and, within a couple of seconds, a new pane appears in the right place with the right label. Unplug it and the pane disappears and the rest expand to fill the space.

scrmux mirroring a rooted phone and a non-rooted phone in one window

Why it exists

The normal way to mirror two phones with scrcpy is to run two copies of it, which gives you two separate floating windows with two separate title bars to chase around your screen. Bigger GUI wrappers exist, but they tend to be heavy Electron or Qt applications. scrmux is the opposite: a single small script that uses native X11 window reparenting to fold any number of scrcpy mirrors into one window, adds a per-pane root / non-root label, and mirrors new devices automatically the moment they connect. It is meant for people who test on several handsets at once — app developers, QA, and security researchers — and want them lined up in one place.

Resizing the scrmux window from any edge; the panes, headers and divider reflow live

Features

  • One window, many phones — every connected device becomes a pane in a single window, laid out side by side.
  • Automatic root detection — scrmux checks each device over adb and marks it ROOT (green header) or NON-ROOT (orange header) with the device model, with no setup.
  • Rooted devices first — panes are ordered with rooted phones on the left, so the layout is predictable.
  • Fully dynamic — the window resizes from every edge and corner; the panes, headers and dividers reflow to match, live.
  • Auto-mirror on connect — a small background service watches for devices and adds or removes panes within a few seconds of plugging in or unplugging, no clicking required.
  • Clean, readable layout — a coloured divider between panes and a title bar of its own.
  • Tiny and dependency-light — one Python script over scrcpy, adb, xdotool and python3-xlib. No Electron, no compiled binaries.

Compatible with

scrmux runs on any Linux distribution running an X11 session with a normal window manager. It has been built and tested on KDE Plasma 6 on X11.

Expected to work on:

  • Kali Linux and Parrot OS
  • Debian 13+ and Ubuntu / Kubuntu 24.04+
  • Fedora KDE
  • Arch Linux / Manjaro / EndeavourOS
  • openSUSE Tumbleweed

A few notes on scope:

  • X11 session required. scrmux places the mirrors with X11 window reparenting, which a Wayland session does not allow between separate applications. Log in on an X11 (Xorg) session to use it.
  • Any phone works. Root is not required — root detection only changes a pane's label and colour, not whether it mirrors.
  • Written in Python (the viewer) with a little Bash (installer) — no compiled binaries.

Install

Clone the repository and run the installer. Do not run it as root; it uses sudo only to install the packages it needs.

git clone https://github.com/masudinfosec/scrmux.git
cd scrmux
./install.sh

The installer sets up the scrmux command, a background user service that auto-mirrors devices, and a menu launcher. It will try to install scrcpy, adb, xdotool and python3-xlib for you on apt, pacman, dnf and zypper systems.

Using it

Enable USB debugging on each phone (Settings → Developer options), connect it, and accept the one-time Allow USB debugging prompt on the phone. scrmux mirrors it automatically. You can also start it by hand at any time:

scrmux

Inside a pane, control is the same as scrcpy: left-click to tap, drag to swipe, right-click for Back, middle-click for Home, scroll to scroll, and just type to send text. Resize the whole window from any edge and the panes follow.

How it works

scrmux runs one scrcpy per device in borderless mode and reparents each mirror into a single container window, giving each a coloured header drawn on top. A short loop polls adb a few times a second: when a device appears it launches and adopts its mirror, and when a device goes away it drops the pane and re-lays out the rest. Root status is read once per device from adb and cached. Nothing runs as root, and it only ever talks to devices you have already authorised over adb.

Uninstall

Run ./uninstall.sh from the same folder. It stops and removes the service, the command and the launcher, and leaves scrcpy, adb and the other tools in place.

A note on scope

Use scrmux only with devices you own or are authorised to access. It mirrors and controls whatever you have already authorised over adb; that access is yours to manage responsibly.

License

scrmux is free to use, for people and companies alike. It is not open source. It is distributed as source only because it has to be installed that way, and copying or redistribution is not permitted. The full terms are in LICENSE.

Built by masudinfosec.

About

Mirror all your connected Android devices in one window - one pane per phone, side by side, with automatic ROOT / NON-ROOT labels. A lightweight scrcpy + adb front-end for Linux (X11), with auto-mirror on connect.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages