screenshot
Capture the current screen as a PNG to verify UI state after each action. Automatically retries black frames and explains FLAG_SECURE or sleeping displays.
Instructions
Capture the current screen as a PNG so you can SEE the UI state. Call it after every action to confirm the screen changed before acting again — driving blind chains taps onto the wrong screen. The image is auto-downscaled (default max 760px) so it is accepted by the image reader; this is for seeing only — derive tap coordinates from describe_ui, not from this image. Auto-retries an all-black frame (an intermittent capture glitch) and, if it stays black, says why (FLAG_SECURE content like a native PIN pad, or a sleeping display) — when black, use describe_ui instead. Works on multi-display foldables (the default display captures correctly); pass display="cover"/"inner"/an index to grab a specific panel.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| display | No | Which physical display to capture on a multi-display device (a foldable). Omit for the default/built-in screen. Accepts a name alias ('inner'/'primary' or 'cover'/'outer'), an HWC index ('0','1'), or a raw physical display id. Only needed to grab the NON-default panel — the default display already captures correctly without it. | |
| max_dim | No | Max width/height of the returned image in pixels. Omit for the default 760; pass 0 (or a negative) to disable downscaling and get the full-resolution image. |