Ensure App
mobile_ensure_appEnsure a mobile app is installed on a device; if missing, install from a local package, then optionally launch and verify readiness.
Instructions
Ensure an app is installed, optionally install it from a local package when it is missing, and optionally launch it with foreground/readiness verification. Use mobile_launch_and_ready when a screenshot snapshot is needed in the same call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | resume keeps the existing app task; cold force-stops the package before launching and is opt-in | resume |
| device | Yes | The device identifier to use. Use mobile_list_available_devices to find which devices are available to you. | |
| launch | No | Launch after ensuring installation. Defaults to true. | |
| locale | No | Comma-separated BCP 47 locale tags to launch the app with. | |
| appName | No | App label in the device's current locale. | |
| appPath | No | Local .apk, .ipa, .app, or .zip to install if the app is not present. | |
| waitFor | No | Readiness conditions after launch. Foreground defaults to true. | |
| packageName | No | Exact Android package name or iOS bundle identifier. |