GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
340 stars 18 forks source link

global toggle for allowing screenshots when they disabled by apps without losing the other properties of secure views #664

Open emanuelb opened 2 years ago

emanuelb commented 2 years ago

from twitter thread answers by GrapheneOS: https://twitter.com/GrapheneOS/status/1440759314428297216

It's important to support it but there's zero problem with adding a way to override the screenshot aspect of it. It just hasn't been implemented. We have no problem with adding a per-app toggle for that or perhaps simply a global toggle though. Someone has to submit clean patch. GrapheneOS would have to add a per-app toggle for ignoring it.

and newer tweet https://twitter.com/GrapheneOS/status/1603067211257872384

It's not a permission. Android apps can mark a view as 'secure' which disables thumbnailing for recent apps, screenshots, drawing over it and various other things. We plan to eventually provide a toggle to disable the part of this which disables taking screenshots. Low priority.

looked at how screenshots disable happen by apps:

Regarding where and which change to apply in code to override the screenshot disable, not sure, need to search & read more code to know, maybe somewhere in (screenshot/contentcapture related code): https://github.com/GrapheneOS/platform_frameworks_base/tree/0c0c3352036432e2caea4b1e8957d102906d68d1/core/java/android/view/contentcapture https://github.com/GrapheneOS/platform_frameworks_base/tree/0c0c3352036432e2caea4b1e8957d102906d68d1/packages/SystemUI/src/com/android/systemui/screenshot

looked at other "solutions" for this problem, like overriding the setFlags calls to remove the added SECURE_FLAG: https://www.securify.nl/en/blog/android-frida-hooking-disabling-flagsecure/ https://github.com/veeti/DisableFlagSecure/blob/fd8833a10a1544324f3301f647e74beee9cac58a/src/main/java/fi/veetipaananen/android/disableflagsecure/DisableFlagSecureModule.java https://forum.xda-developers.com/t/module-smali-patcher-7-4.3680053/

System32ita commented 3 months ago

I hope this feature will be implemented soon