Xiaomi Rear Screen Enhancement LSPosed Module
English | 简体中文
Unlock the full potential of your Xiaomi rear screen
Janus is an LSPosed module for Xiaomi phones with a rear screen, designed to enhance the rear screen experience. By hooking com.xiaomi.subscreencenter, it bypasses various system restrictions on the rear screen.
| Music Whitelist Unlock | Remove rear screen music app whitelist restrictions, manage whitelist per app |
| Live Wallpaper Anti-Interrupt | Prevent live wallpaper from pausing or resetting when rear screen is covered |
| Lock Wallpaper Switching | Block long-press gesture on rear screen wallpaper to prevent accidental changes |
| Custom Rear Wallpaper Video | Replace AI-generated wallpaper video with your own, with loop playback toggle and backup/restore |
| Rear Screen DPI Adjustment | Customize rear screen display density for better small-screen experience |
| Rear Screen Keep Alive | Foreground service periodically sends key events to prevent auto-sleep |
| Screen Casting Settings | Screen casting rotation control, keep rear screen on during casting |
| Smart Assistant Custom Cards | Import and manage custom MAML cards for the Smart Assistant panel, with drag-and-drop reordering, per-card enable/disable, priority and refresh interval settings |
| Custom Music Card | Replace the stock music card template with a custom MAML template, with optional lyric scrolling patch |
| Lyric Hook Rules | Per-app lyric hook rules via JSON rule engine. Import community-provided rules to display timed lyrics (TTML/LRC) from any music app on the rear screen |
| Telemetry Blocking | Intercept DailyTrackReceiver to block data reporting |
| Quick Switch | Quick settings tile for one-tap casting to rear screen |
| Hide Launcher Icon | Hide app icon from launcher, open via LSPosed module manager |
- Device must have an unlocked Bootloader and Root access
- Install LSPosed framework
- Enable Janus module in LSPosed, select scope
com.xiaomi.subscreencenter - Open Janus app and configure features as needed
- Restart the scope or reboot the device for hooks to take effect
Note
Keep alive, DPI adjustment, task migration and other features require Root access.
| App Name | Package Name |
|---|---|
| Rear Display | com.xiaomi.subscreencenter |
Tip
Additional scopes (e.g. music apps for lyric hooks) are added dynamically via requestScope() when importing hook rules.
# Debug build
./gradlew assembleDebug
# Release build (with ProGuard/R8 obfuscation + resource shrinking)
./gradlew assembleRelease
# Clean build artifacts
./gradlew cleanBuild Environment
| Requirement | Version |
|---|---|
| JDK | 17+ |
| Android SDK | compileSdk 36 |
| Kotlin | 2.3.20 |
| Compose BOM | 2025.03.01 |
Janus is split into four Gradle modules to keep the Xposed hook surface free of UI/AndroidX dependencies and to make the rule contract independently testable on pure JVM.
janus/
├── hook-api/ # Pure Kotlin (java-library) — engine contracts
│ └── org/pysh/janus/hookapi/
│ ├── HookRule.kt # Rule / HookTarget / HookAction JSON model
│ ├── CardInfo.kt # Card data contract shared by UI + hook
│ └── ConfigSource.kt # Abstract K/V config (no SharedPreferences)
│
├── hook/ # Android library — runs inside the hooked host
│ ├── META-INF/xposed/ # module.prop / scope.list / java_init.list
│ │ # (module.prop generated from version catalog)
│ ├── consumer-rules.pro # R8 keeps for HookEntry + libxposed API
│ └── org/pysh/janus/hook/
│ ├── HookEntry.kt # libxposed 101 XposedModule entry point
│ ├── engine/ # RuleEngine, RuleLoader, ActionExecutor
│ ├── engine/engines/ # Whitelist, SystemCard, CardInjection,
│ │ WallpaperKeepAlive
│ └── config/ # SharedPreferencesConfigSource (RemotePrefs)
│
├── core/ # Android library — UI-side utilities
│ └── org/pysh/janus/core/util/ # DisplayUtils, JanusPaths, RootUtils...
│
└── app/ # Android application — UI / Service / Receiver
└── org/pysh/janus/
├── JanusApplication.kt # XposedService binding (manager side)
├── ui/ # Compose + MIUIX pages
├── data/ # WhitelistManager, CardManager, etc.
├── service/ receiver/ util/
└── MainActivity.kt
Key properties:
- Module version is a single source of truth in
gradle/libs.versions.toml(moduleVersion/moduleVersionCode). It reachesMETA-INF/xposed/module.propvia a generated Gradle task and the runtime boot log viaBuildConfig.MODULE_VERSION. :hookis the only module carryingMETA-INF/xposed/— the:appAPK consumes:hookas a library, so the hook classes and metadata are merged into the final APK while the Gradle dependency graph keeps Compose/MIUIX out of the hook classpath.- Engines depend on
ConfigSource, notSharedPreferences, so they can be unit-tested on pure JVM via./gradlew :hook-api:testwithout Robolectric. - libxposed API 101 (
io.github.libxposed:api) is the only hook framework dependency; no EdXposed/legacyde.robv.android.xposedimports.
If you find this project helpful, consider supporting the development on Afdian.
Janus uses content from the following open-source projects. Thanks to the developers of these projects.
- MIUIX by YuKongA — Xiaomi-style Compose UI component library
- LSPosed by LSPosed — Modern Xposed framework
This project is licensed under the GPL-3.0 license.