Screenshot
This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET
Capture the device screen as a PNG. These call app_screenshot.
Screenshot
func (d *Device) Screenshot(ctx context.Context, path string) ([]byte, error)
Screenshot captures the screen as PNG. With a path it also writes the file; without one the bytes come back over the wire.
Examples
Save a screenshot
// With a path the file is written, and the PNG comes back too.
png, err := dev.Screenshot(ctx, "screen.png")
if err != nil {
return err
}
fmt.Println(len(png), "bytes")
The same call from the command line, mobium screenshot -o screen.png, printed on an Android 15 emulator:
saved …/screen.png (153875 bytes)

mobium screenshot -o screen.png on an Android 15 emulator