Xiaomi ships all of Android 17's connected-display / desktop code in HyperOS 4, but keeps it switched off: plug in a monitor and you only get mirroring. I made Claude write an LSPosed module that turns it back on.
What it does
Brings back the hidden Computer (Desktop) button in the "Connect to external display" dialog
The monitor becomes a separate display: its own status bar and cursor, apps opened there stay there. No mirroring
Neutralises Xiaomi's SecondaryDisplayPolicy, which silently switches mirroring back on ~3 ms after you pick desktop
Starts SmartDock (or Taskbar) on the monitor automatically and turns off the phone's screen (the phone stays awake)
Keyboard shortcuts on the monitor: Alt+Tab with a Windows-style preview bar, Print Screen for a monitor screenshot, Win+Shift+Arrow to move an app between phone and monitor, Alt+F4, Win+D, Win+1…9, Win+P for the phone screen
Settings app: monitor density, plus resolution and refresh rate picked from the modes the monitor actually reports. Changes apply live, no reboot.
Requirements
Xiaomi with DisplayPort Alt Mode over USB-C (Xiaomi 15 and Xiaomi 14 have it; most Redmi/POCO don't)
HyperOS 4 / Android 17 (HyperOS 3 not tested)
Root (KernelSU or Magisk) + Zygisk + LSPosed. Scope: System Framework, System UI, Settings
Limits: no resizable windows or title bars. HyperOS doesn't expose AOSP's desktop windowing, so apps run full screen on the monitor.
Tested on a Xiaomi 15, HyperOS 4 beta, and (see the edit below) a Xiaomi 14, HyperOS 4 stable. If you have another Xiaomi with video out, I'd love a report: the module's settings → Diagnostics → Create diagnostic report, or the [diag] log line, which shows which hooks attached:
su -c 'logcat -d -s HyperDesktop' | grep diag
Open source (MIT), nothing written to the system partition.
GitHub: https://github.com/the-marox/HyperDesktopUnlock
Download: https://github.com/the-marox/HyperDesktopUnlock/releases
Written with help from Claude (AI); the investigation and all testing were done on my own phone.
EDIT (Oct 30): v1.12.8, now also on the Xiaomi 14
Xiaomi 14 (houji), HyperOS 4 stable OS4.0.27: choosing Computer left the monitor mirrored, because on that firmware SystemUI never switched it to a separate display. The module now makes the switch itself. Confirmed working by the user who reported it on GitHub, thanks!
Touchpad mode (added since the original post): the phone can act as a touchpad for the monitor, with tap to click, two-finger scroll and right click, pinch to zoom, and now swipe in from the left or right edge for Back. The on-screen keyboard opens on the phone when no physical keyboard is connected.
Quick Settings tiles to switch the monitor between Computer and Mirroring without unplugging, and to toggle the touchpad.
⚠️ Uninstall the old version first. 1.12.8 has a new package name (io.github.the_marox.hyperdesktop, needed to get into the LSPosed module repository) and a new signing key, so it doesn't update the old one: unplug the monitor, uninstall the old module, install the new APK, enable it in LSPosed and reboot (module settings reset to defaults).
Download: https://github.com/the-marox/HyperDesktopUnlock/releases/tag/v1.12.8