Install app
Requests an app install on the device. The request body must supply exactly one of an Android packageName or an iOS bundleId. For packageName installs, optional country and versionCode select an exact regional uploaded Android version, and protected packages are rejected. background (default false) selects the response contract: false installs inline and returns the outcome directly (200 on success, an error status on failure); true accepts the request and runs the download + install in the background, returning 202 immediately — poll list-app-installs for the backend’s view of that attempt’s status. Refuses with 409 once 2 other installs are already running on the device, in either mode; a repeat request for an app that already has an install running is also refused with 409 rather than superseding it — retry once that attempt reaches a terminal state. Synchronous failures report APP_DOWNLOAD_FAILED (502) when the app file cannot be downloaded or APP_INSTALL_TIMEOUT (504) when the install times out.
background (default false) selects the response contract:
background: false(default) — installs inline; the response is the actual outcome:200on success, an error status on failure.background: true— accepts the request and runs the download + install in the background; a202response means the request was accepted, not that the app is installed yet — polllist-appsuntil the app appears, or polllist-app-installsfor the backend’s view of the install attempt itself (useful while the device is offline or crashed, whenlist-appscan’t be called at all).
409 Conflict once 2 other installs are already running on the device. A repeat request for an app that already has an install running is also refused with 409 Conflict rather than superseding it — retry once that attempt reaches a terminal state.
Provide exactly one of:
packageName— Android package name. Resolved against the device owner’s app library, so upload the APK first.bundleId— iOS bundle identifier (e.g.com.example.app) or a numeric App Store ID. The app is installed from the App Store.
country— ISO 3166-1 alpha-2 country stored on the uploaded version (for example,MYorSG).versionCode— exact uploaded app version code.
US.
Updating an installed app
Callinstall-app again with packageName to update an installed Android app; for regional versions, also pass country and versionCode from availableUpdate, read via list-apps?includeUpdates=true. Installation uses -r, keeping app data. Android rejects downgrades, and an update with a different signing key fails with adb_install_failed.
Body
- Option 1
- Option 2
Response
Install finished synchronously (background omitted or false).