Apps such as Bitwarden and Silence block screenshots. Attemtping to take a screenshot on the device results in this error.

Using scrcpy, the app functions normally on the device, but scrcpy displays a black background with the status bar visible. No notification or log output indicates anything abnormal. The screenshot notifciation does not appear.

Strangely enough, LineageOS's built-in screen recording app captures these applications _without problems_. The device is not rooted.
Tested on a OnePlus 3T running LineageOS 15.1 20180305.
You can disable it in Silence settings → Privacy → Screen security.
Strangely enough, LineageOS's built-in screen recording app captures these applications without problems.
They probably modified the feature in the ROM, because on AOSP, even screenrecord do not display the screen content.
Since I added an entry in the FAQ, I'm closing.
Now you can (on dev branch): https://github.com/Genymobile/scrcpy/commit/1fdde490fd2a0b89680a2b5da5e5274192398023
Now you can (on
devbranch): 1fdde49
After Testing SafeInCloud and Enpass, I can confirm that it works.
Very great, thanks for fixing! I now can finally see the password field for paypal on my phone with broken screen :heart:
I really enjoy using scrcpy. I think that it's a great product. Unfortunately I am having the black screen issue mentioned above on some specific apps. I am new to coding so I apologize. I was wondering if someone could explain more in details how you fixed the issue so that I can do it myself.
Thanks for the help!
The apps which remain black could not be mirrored with scrcpy (some drm prevent it to be captured).
Thank you. Great app.
@rom1v Do you know if an app is able to detect the case when an app such as scrcpy is pretending to be a secure display even though it's not?
The problem I have is that scrcpy allows taking screenshots and screen recordings, even though it pretends to be a secure screen, which creates a security vulnerability.
Furthermore, even if scrcpy filtered out protected content from screenshots and recordings, it would be possible to record the whole screen on the computer, unless scrcpy would filter that too.
But even then, anybody could build scrcpy from source as it is currently and use it to take screenshots of content that was supposed to be protected. So do you know if it's possible to detect "fake" secure displays?
(I know that it's always possible to take a photo of the phone with an ordinary camera, but I don't need to worry about that, I just need to prevent taking screenshots)
I don't know.
FWIW, I think that the users should always be able to take screenshots or videos of ther screen (it's their own device). It's ok that app developers provide a hint that some screen should not be captured by default, but device users should always have the possibility to easily bypass this setting. (I know that this is not the current trend from Google or others.)
Most helpful comment
After Testing
SafeInCloudandEnpass, I can confirm that it works.