The task is: Prevent the ability to take screenshots on an 6.0.x android OS globally. What I mean by "globally" is to exclude that function and block it completely so that even if the device is to be infected with a screenshot-taking malware it should not be able to do so. I am interested in screenshot-prevention in all apps and even when no apps are running, everywhere. Thanks in advance!

upd. I am really sorry if that question is not stated clearly but I thought I could find some help here at least some points in the direction I should look for. I think this question will be useful for others too if answered.

  • As long as the malware/app has not root access, the command wm screen-capture 0 false would do the job on Android 6.0.x. – Firelord Oct 12 '16 at 15:24
  • Thanks. Where should I execute that? In the console? – DedToto Oct 12 '16 at 15:32
  • I have a rooted device and still in the console it says "java.lang.SecurityException: Only system can call ScreenCaptureDisabled." – DedToto Oct 12 '16 at 15:40
  • Do su 1000 -c 'wm screen-capture 0 false'. – Firelord Oct 12 '16 at 15:58
  • Big thanks! One more question please: In order to reverse that command an attacker needs root access? And in case I have an Xposed module that sets permission for each and every new app manually this is less likely to happen? – DedToto Oct 12 '16 at 16:12

If the Android is rooted and is version 6.0 or above, then using console or , execute:

su 1000 -c 'wm screen-capture 0 false'


  • su 1000 -c - switch to user with ID 1000 (System user) and execute the following command
  • 0 - user ID of the primary user of the device.

Now, whenever you or any app would attempt to capture the screenshot using the standard means in Android, a notification with title Couldn't capture screenshot would show up.

However, as long has the malware/app can gain root access or system level privilege or becomes a member of the user group graphics (through an exploit or other means), all restrictions would be in vain since the malware/app can access framebuffer. For details, follow: Why do we need a rooted phone to capture screenshots on older versions of Android?

| improve this answer | |
  • Thanks. It worked perfectly but I have another related question: I've executed that command but right after the phone restart it doesn't work anymore and I have to type it in again. Is there a way to execute it at OS startup? – DedToto Oct 12 '16 at 16:44
  • You can use an automation app, such as Tasker to do that for you. And thanks for mentioning that issue. I wasn't aware of it. – Firelord Oct 12 '16 at 16:51
  • Yeah I just realised how serious is that problem when I witnessed a court case where such screenshots were brought as evidence against a man that used a secure chat and message trimmering. – DedToto Oct 12 '16 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.