Device API
App Management
Install, launch, terminate, and uninstall apps. Manage runtime permissions.
Control the app lifecycle and runtime permissions without interacting with the UI.
install_app
Install an APK from a local file path. The file is uploaded to the cloud device automatically.
| Parameter | Type | Required | Description |
|---|---|---|---|
apkPath | string | Yes | Absolute local path to the .apk file |
Installed com.example.myapp (version 2.4.1).launch_app
Start an installed app by package name.
| Parameter | Type | Required | Description |
|---|---|---|---|
packageName | string | Yes | Package name |
Launched com.example.myapp.terminate_app
Force-stop an app without clearing its data.
| Parameter | Type | Required | Description |
|---|---|---|---|
packageName | string | Yes | Package name |
Terminated com.example.myapp.clear_app_data
Wipe all app data and cache. Equivalent to "Clear Storage" in Android settings — resets the app to a fresh install state.
| Parameter | Type | Required | Description |
|---|---|---|---|
packageName | string | Yes | Package name |
Cleared data for com.example.myapp.uninstall_app
Remove an app from the device.
| Parameter | Type | Required | Description |
|---|---|---|---|
packageName | string | Yes | Package name |
Uninstalled com.example.myapp.get_installed_packages
List all installed, enabled packages on the device.
Installed packages (142 total):
com.example.myapp — My App
com.google.android.apps.maps — Maps
com.android.chrome — Chrome
...grant_permission
Grant an Android runtime permission to an app without triggering the system dialog.
| Parameter | Type | Required | Description |
|---|---|---|---|
packageName | string | Yes | Package name |
permission | string | Yes | Full permission string |
Supported permissions:
| Category | Permissions |
|---|---|
| Camera & Audio | CAMERA, RECORD_AUDIO |
| Location | ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION, ACCESS_BACKGROUND_LOCATION |
| Storage | READ_EXTERNAL_STORAGE, WRITE_EXTERNAL_STORAGE, READ_MEDIA_IMAGES, READ_MEDIA_VIDEO, READ_MEDIA_AUDIO |
| Contacts | READ_CONTACTS, WRITE_CONTACTS |
| Phone | READ_PHONE_STATE, CALL_PHONE, READ_CALL_LOG, WRITE_CALL_LOG |
| SMS | SEND_SMS, RECEIVE_SMS, READ_SMS |
| Calendar | READ_CALENDAR, WRITE_CALENDAR |
| Sensors | BODY_SENSORS, ACTIVITY_RECOGNITION |
| Other | POST_NOTIFICATIONS, BLUETOOTH_CONNECT, BLUETOOTH_SCAN, NEARBY_WIFI_DEVICES |
Pass the full android.permission.* prefix:
Granted android.permission.CAMERA to com.example.myapp.revoke_permission
Revoke a previously granted runtime permission.
| Parameter | Type | Required | Description |
|---|---|---|---|
packageName | string | Yes | Package name |
permission | string | Yes | Full permission string |
Revoked android.permission.CAMERA from com.example.myapp.