Skip to main content

Screen

This tool on every surface: CLI · MCP · Python · JavaScript · Go · Java · .NET

Read the screen, or make an Android device pretend to be a different one, and optionally report what is wrong with the layout at that size. These call app_screen.

Screen​

func (d *Device) Screen(ctx context.Context, profile string, inspect bool) (Screen, error)

Screen reads the screen, or makes an Android device pretend to be another.

A flow that works on the screen you happen to have is a flow tested once. Pass a profile name to apply it, or "reset" to put the device back — an override outlives this session. Applying one discards the refs from the last map, because nothing is where it was. The answer always lists the profiles this platform knows.

On iOS the screen is fixed when the simulator is created, so this reads only and names the simulator to boot instead.

With inspect, the answer also carries Findings. Treat a tiny-target finding as worth a look rather than a defect: Android can enlarge a tap area without changing an element's bounds.

Examples​

Read the screen: size, density, and the profiles it can pretend to be​

screen, err := dev.Screen(ctx, "", false)
if err != nil {
return err
}
fmt.Println(screen.WidthPx, screen.HeightPx, screen.DPI, screen.Profiles)

The same call from the command line, mobium screen, printed on an Android 15 emulator:

1080x2400px @420dpi = 411x914dp (sw411dp)

Pretend to be a small phone, and back​

if _, err := dev.Screen(ctx, "small-phone", false); err != nil {
return err
}
// ... the flow, on a small phone ...
if _, err := dev.Screen(ctx, "reset", false); err != nil {
return err
}

On a device​

mobium screen small-phone on an Android 15 emulator

mobium screen small-phone on an Android 15 emulator