resolution-agent
v0.1.2
Published
ADB-based Android display variant screenshot capture and gallery server
Downloads
418
Maintainers
Readme
Resolution Agent
Standalone Android screenshot capture agent for quick responsiveness galleries.
It captures the same app screen in these fixed variants:
- with gesture bar
- with 3-button bar
- without navigation bar
- wider screen
- taller screen
- shorter screen
- narrower screen
- bigger font
- smaller font
It then generates a local static gallery website with all screenshots.
For live debugging, you can also apply a single preset without taking a full capture matrix, keep the app open, and reset back afterward.
Requirements
adbonPATH- one connected Android device or emulator
- an installed app package to capture
Capture
npx resolution-agent capture --package com.example.appIf --package is omitted, the CLI tries to use the current foreground package.
Useful variants:
npx resolution-agent capture --package com.example.app --serve
npx resolution-agent capture --package com.example.app --relaunch --serve
npx resolution-agent capture --package com.example.app --relaunch --maestro-file ./flow.yaml
npx resolution-agent capture --package com.example.app --deeplink "myapp://settings" --relaunch --serve --port 37901
npx resolution-agent capture --package com.example.app --activity com.example.app/.MainActivity --out-dir ./artifacts/settingsBy default the CLI preserves the current foreground screen and only changes the
logical display config between screenshots. Use --relaunch if you want the
old deterministic behavior that restarts the app before each capture.
Serve Existing Report
npx resolution-agent serve --dir ./artifacts/settings --port 37901Live Resize
Apply one preset and keep it active while you inspect or fix the app:
npx resolution-agent apply --scenario narrower_screen
npx resolution-agent apply --scenario shorter_screen
npx resolution-agent apply --scenario bigger_fontWhen you are done, restore the original display state:
npx resolution-agent resetIf you want to force the device back to physical resolution plus fullscreen gesture navigation, use:
npx resolution-agent reset-resolutionMaestro Navigation
If you want deterministic relaunches to a deeper screen, pass a Maestro flow:
npx resolution-agent capture --package com.example.app --relaunch --maestro-file ./flow.yamlThe flow runs after each relaunch and before the screenshot. These environment variables are exposed to Maestro for each scenario:
RESOLUTION_AGENT_SCENARIORESOLUTION_AGENT_WIDTHRESOLUTION_AGENT_HEIGHTRESOLUTION_AGENT_FONT_SCALERESOLUTION_AGENT_NAV_MODERESOLUTION_AGENT_PACKAGERESOLUTION_AGENT_SERIAL
Important Flags
--device SERIAL: target a specific adb device--package APP_ID: app package to relaunch before each screenshot--activity PKG/.Activity: launch a specific activity instead of the launcher--deeplink URI: launch a deep link before each screenshot--wait-ms 1800: settle time after launch before screenshot--size-delta-pct 0.2: how much wider/taller/narrower/shorter variants differ from the baseline--font-bigger 1.25: multiplier for the bigger font scenario--font-smaller 0.85: multiplier for the smaller font scenario--relaunch: force-stop and relaunch the app before each screenshot--no-relaunch: explicit alias for the default behavior--maestro-file FLOW.yaml: run a Maestro flow after each relaunch and before captureapply --scenario SLUG: apply one preset without capturing screenshotsreset: restore the display state saved byapplyreset-resolution: resetwm sizeandwm density, then force fullscreen gesture navigation--serve: keep a local gallery server running after capture--keep-display-config: do not restore display overrides afterward
Output
The capture output directory contains:
index.html: gallery pagereport.json: machine-readable metadatascreenshots/*.png: scenario screenshots
Notes
- The CLI uses
adb shell wm size,adb shell wm density,font_scale, andpolicy_control. - By default
captureremembers the initial display/navbar state and restores that exact state at the end, unless--keep-display-configis set. resetis for restoring the baseline saved byapply;reset-resolutionis the quick recovery command if you want the device back in full-resolution fullscreen mode regardless of the starting state.widerandtallerare logical-display overrides, not real hardware changes. Use them as comparison probes, not as physical-device truth.
