Usually because the app sets FLAG_SECURE, which tells Android to keep its screen out of screenshots and screen recordings: password managers, 2FA apps, banking apps and private browsers do it. On Mobilebox, which runs cloud Android phones for AI agents at $0.01 a minute, such a screenshot answers 409 screen_protected and names the app, and observe still reads the screen as text, so the agent keeps working.
What FLAG_SECURE does
An app sets FLAG_SECURE on a window to say its content is private. Android then keeps that window out of screenshots and off non-secure displays, so screen recordings and screen sharing show it black too. On a phone in your hand, a screenshot of such an app comes out black or is refused with a message. With adb exec-out screencap -p on your own emulator, you get an empty file or a black frame.
It is the app’s decision, not a broken tool. An agent should not try to get around it, and Mobilebox doesn’t: the point is to tell the agent at once, so it doesn’t send an empty image to its model or report a black screen as a bug in your app.
Apps that did it in our test
Our app compatibility run on production on November 22, 2026 installed apps from F-Droid and their makers' own downloads. Seven of them blocked the screenshot on the screen they opened to:
| App | Kind |
|---|---|
| Bitwarden | Password manager |
| KeePassDX | Password manager |
| Aegis | 2FA codes |
| Proton Mail | |
| SimpleX Chat | Messenger |
| Briar | Messenger |
| Tor Browser | Private browser |
Before the fix that day, our screenshot call answered those with 200 and 0 bytes: an image that wasn’t one. Now it answers like this, measured on production with Aegis 3.4.3:
GET /v1/phones/{id}/screenshot on the home screen → 200, image/png, 1,356,910 bytes
Aegis open, GET /v1/phones/{id}/screenshot → 409
{"code":"screen_protected",
"message":"com.beemdevelopment.aegis blocks screenshots (FLAG_SECURE), so this screen can't be captured.",
"next":"Read it with observe: …"}
GET /v1/phones/{id}/observe → app: com.beemdevelopment.aegis, 6 elements,
"Welcome", "Aegis is a free, secure and open source 2FA app", …Over MCP the screenshot tool returns the same code and message as its error, so the agent reads why there is no image.
What to do
- Read the screen with
observe. FLAG_SECURE covers pixels, not the accessibility tree: the elements, their text and their refs come back as usual, andacttaps and types on them. For most agent tasks the text is the better evidence anyway, as screenshot or accessibility tree explains. - Handle 409
screen_protectedin your code. It is not retryable: the same screen gives the same answer. Fall back to observe, and take the screenshot again once the agent has left the protected screen. - Testing your own app? Set the flag in release builds only. A debug build without it gives your agent screenshots and recordings; the release build keeps it.
if (!BuildConfig.DEBUG) {
window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}- Need a picture for a person? The live view shows a protected app black too. Screenshot the screens before and after it, and keep the observe text of the protected screen as the evidence.
Other reasons a screenshot is black or empty
| What you see | Likely cause | What to do |
|---|---|---|
409 screen_protected | The app on screen sets FLAG_SECURE | observe instead, as above |
503 screenshot_failed | The phone returned an empty frame with no protected window on screen | Retry: it is marked retryable |
| A real PNG that is all black | The app is still drawing: a dark splash screen or a video that hasn’t started | Wait for a text with wait_for, then screenshot again |
| A PNG of the wrong app | The app crashed or closed | observe shows the app in front; GET /v1/phones/{id}/apps/{package}/logs shows its last exit |
Every error code is in errors and recovery.