Complete rewrite from KernelSU shell scripts to LSPosed module using modern libxposed API. Hooks Android's hidden Wi-Fi Display framework to enable native Miracast support on Android 12+ devices. - Framework resource hooks (config_enableWifiDisplay) - WifiDisplayStatus feature state override - System feature and permission injection - Settings Cast UI integration - Quick Settings tile - Settings activity with device-specific options
2.6 KiB
2.6 KiB
Miracast Enabler v2.0.0
Native Miracast support for Android 12+ via LSPosed
What's New
Complete rewrite as an LSPosed/Xposed module. Instead of trying to set system properties after boot (which never worked reliably), the module now hooks directly into Android's framework to re-enable the hidden Wi-Fi Display (Miracast) stack.
Highlights
- It actually works now. The v1.x KernelSU approach of setting properties and fabricating overlays couldn't overcome the framework-level disabling. This version hooks the right classes at the right time.
- Quick Settings tile — tap to open Cast settings where Miracast receivers now appear. Tap again to disconnect an active session.
- Zero custom streaming — uses Android's own
WifiDisplayAdapter,WifiDisplayController, andRemoteDisplayclasses. The protocol stack was always there, just hidden. - Settings app — resolution caps, HDCP toggle, foldable display source, Tensor-specific GPU and Wi-Fi fixes.
Framework Hooks
| Hook | Target | Purpose |
|---|---|---|
Resources.getBoolean() |
All processes (zygote) | Force config_enableWifiDisplay = true |
WifiDisplayStatus.getFeatureState() |
system_server, Settings | Return FEATURE_STATE_ON |
hasSystemFeature() |
system_server | Report android.software.wifi_display as available |
WifiDisplayPreferenceController |
Settings | Make WFD section visible in Cast preferences |
| Permission check | system_server | Grant CONFIGURE_WIFI_DISPLAY / CONTROL_WIFI_DISPLAY |
Device Support
Optimized for Pixel phones with Tensor SoCs (Pixel 6 through Pixel 10 series, including all Fold variants). Should work on any Android 12+ device where the WFD framework classes still exist — which is most devices, since Google hasn't actually removed the code.
Requirements
- Android 12+ (API 31+)
- LSPosed or LSPosed-IT
- Root via KernelSU, Magisk, or APatch
Installation
- Download and install
miracast-enabler-v2.0.0.apk - Open LSPosed → Modules → enable Miracast Enabler
- Set scope: System Framework, System UI, Settings
- Reboot
- Open Settings → Connected devices → Cast, or use the Quick Settings tile
Known Issues
- First scan after boot may take 10-15 seconds for receivers to appear
- Tensor G4/G5: enable "Force GPU composition" if you see black/green frames
- Some Miracast receivers require HDCP — toggle it on in settings if connection fails with a specific receiver
- Google Home app Cast screen still filters WFD routes (use system Settings instead)
Full changelog: v1.0.0 (KernelSU shell scripts) → v2.0.0 (LSPosed framework hooks)