Package Management
Android 1.0+
Risk: MODIFIES_DEVICE
Install Android APK Package
Pushes an APK file to the device and installs it via Package Manager.
Command Syntax
adb install
Generic Syntax:
adb install [-r] [-t] [-d] [-g] [--abi <ABI>] <path-to-apk>
Options & Parameters
| Flag | Description |
|---|---|
| -r | Reinstall existing app, keeping its data and cache intact. |
| -t | Allow test APKs (marked android:testOnly="true" in manifest). |
| -d | Allow version code downgrade. |
| -g | Grant all runtime permissions specified in app manifest automatically (Android 6.0+). |
| --fastdeploy | Fast deploy: stream only modified DEX/resources. |
| --user <ID> | Install for a specific multi-user account. |
Real-World Usage Examples
Standard app install
Installs the APK on device.
adb install myapp.apk
Output:
Performing Streamed Install
Success
Reinstall / upgrade existing app and grant all runtime permissions
Replaces existing app retaining user data and auto-grants runtime permissions.
adb install -r -g myapp.apk
Output:
Performing Streamed Install
Success
Allow version downgrade and test-only build
Installs debug APK with a lower versionCode than the one currently on the device.
adb install -r -d -t debug-build.apk
Output:
Performing Streamed Install
Success