-
-
Couldn't load subscription status.
- Fork 12.2k
Description
- I have checked that a similar feature request does not already exist.
I found #2242 but that seemed to focus on non-root options.
Is your feature request related to a problem? Please describe.
In Android 12+, it is no longer possible to mirror the output of apps expecting a FLAG_SECURE display. The non-root fix scrcpy uses now is to no longer capture secure output on Android 12+.
Describe the solution you'd like
For those with root, it'd be nice if scrcpy could optionally make use of root access to enable mirroring apps that require secure display output.
Brainstorming:
- Directly request root access via
suto do what's needed, if possible - Provide an app
.apkto be installed with system privileges (e.g. as a simple Magisk module)- Magisk now provides Zygisk to inject code into processes, so it may be possible to revert the shell UID check
- Integration with
Suito provide more natural access to Java APIs as the root user- Assuming this may require more effort on
scrcpy's side to provide an app (APK?) that requests Sui access
- Assuming this may require more effort on
Describe alternatives you've considered
Disable FLAG_SECURE for all apps using the LSposed (modern Xposed), or via a Magisk "Zygisk" code injection to the system framework.
This would unfortunately enable every app to have this access instead of just allowing the shell, unless a module could be made to revert specifically the shell UID FLAG_SECURE check.
Additional context
All of this except for maybe using su directly if possible sounds rather complicated for a niche of scrcpy users. I'd understand if the immediate reaction to this feature request is to close it and go "Nope, not touching that." 🙂