android_session_start
Start an Android app driving session: optionally build, install, and launch the app, then return a screenshot and UI dump. Automatically reports build failures or crash stack traces for debugging.
Instructions
Start a driving session: optionally build+install, launch the app, and return the first look.
This is the main entry point. Returns a screenshot (as an image you can see directly) plus the UI dump. If the build fails you get the full build report; if the app crashes on launch you get the stack trace mapped to source instead of a screenshot of the launcher.
Args:
package: App package id, e.g. com.example.app
activity: Launch activity; resolved automatically if omitted.
device: Device serial; defaults to the first physical device.
project_dir: Gradle project root. Needed for reinstall, and lets crash stack traces be
mapped to source files.
reinstall: Build with android_build and install the result first.
fresh: pm clear the app first, wiping its data for a clean run.
module, variant: Which APK to build/install.
release_locks, allow_uninstall: Passed through to the build/install (see android_build).
scale: Long-edge px for the returned screenshot.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | ||
| scale | No | ||
| device | No | ||
| module | No | app | |
| package | Yes | ||
| variant | No | debug | |
| activity | No | ||
| reinstall | No | ||
| project_dir | No | ||
| release_locks | No | ||
| allow_uninstall | No |