previewapk_push_apk
Upload a local APK to an Android device: attach it when the device is off, or hot-swap and relaunch it live when running; optionally replace older builds after a data wipe.
Instructions
Upload an APK file from this machine to the device. If the device is OFF it becomes the attached app (then call previewapk_start). If the device is RUNNING and you hold the wheel, the new app is hot-swapped in live — installed and relaunched with no reboot. Returns the parsed app info (swapped=true on a hot swap; deduped=true when identical bytes were already stored). Installing an OLDER versionCode over the app in a live session is refused (version_downgrade) unless replace=true, which uninstalls the installed app first — its data is deleted.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "previewapk_push_apk"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | local path to the .apk file | |
| device | No | ||
| replace | No | allow replacing a newer installed build with an older one (uninstalls first, deleting its data) |