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:

AppKind
BitwardenPassword manager
KeePassDXPassword manager
Aegis2FA codes
Proton MailEmail
SimpleX ChatMessenger
BriarMessenger
Tor BrowserPrivate 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:

text
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

  1. Read the screen with observe. FLAG_SECURE covers pixels, not the accessibility tree: the elements, their text and their refs come back as usual, and act taps and types on them. For most agent tasks the text is the better evidence anyway, as screenshot or accessibility tree explains.
  2. Handle 409 screen_protected in 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.
  3. 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.
kotlin
if (!BuildConfig.DEBUG) {
    window.setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE)
}
  1. 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 seeLikely causeWhat to do
409 screen_protectedThe app on screen sets FLAG_SECUREobserve instead, as above
503 screenshot_failedThe phone returned an empty frame with no protected window on screenRetry: it is marked retryable
A real PNG that is all blackThe app is still drawing: a dark splash screen or a video that hasn’t startedWait for a text with wait_for, then screenshot again
A PNG of the wrong appThe app crashed or closedobserve shows the app in front; GET /v1/phones/{id}/apps/{package}/logs shows its last exit

Every error code is in errors and recovery.