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​

public Map<String, Object> screen()
public Map<String, Object> screen(String profile, boolean inspect)

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.

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

@return the screen's size, density and profile, and with inspect its findings

Reads or applies a screen profile, optionally reporting layout findings.

With inspect, the answer carries findings: elements past the edge, touch targets below the platform minimum, text the platform truncated, and tappable elements with nothing to announce. Treat a touch-target finding as worth a look rather than a defect — Android can enlarge a tap area without changing an element's bounds.

@param profile a screen profile's name, "reset", or empty to only read @param inspect whether to report layout findings @return the screen's size, density and profile, and with inspect its findings

Examples​

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

Map<String, Object> screen = device.screen();
System.out.println(screen);

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​

device.screen("small-phone", false);
// ... check the layout ...
device.screen("reset", false);

On a device​

mobium screen small-phone on an Android 15 emulator

mobium screen small-phone on an Android 15 emulator