Skip to content

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

@emanuelb

Description

@emanuelb

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/

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions