Appearance
adb install: install an APK from your computer
In short: adb install copies an APK from your computer to a connected Android phone and installs it. Run adb install app.apk with USB debugging on; add -r to replace an installed app and keep its data, -d to allow an older version and -g to grant its permissions. Split APKs go in one adb install-multiple command.
The APK stays on your computer; adb copies it over and installs it in one step. USB debugging has to be on, and the phone listed as device by adb devices.
Syntax
bash
adb install [-r] [-d] [-g] [-t] path/to/app.apk
adb install-multiple base.apk split_config.arm64_v8a.apk| Option | What it does |
|---|---|
-r | Replaces the app if it is already installed and keeps its data |
-d | Allows an older version than the one installed (apps built as debuggable) |
-g | Grants every runtime permission the app asks for, so no permission prompts appear |
-t | Allows a test APK, such as the ones Android Studio builds when you press Run |
install-multiple | Installs the APKs of one app split by an app bundle, the base APK first |
With an .aab app bundle, Google's bundletool builds the right APKs for a connected phone and installs them (bundletool install-apks).
Examples
bash
# Install, or update an installed app and keep its data
adb install -r app-release.apk
# A build with a lower version code than the installed one
adb install -r -d app-debug.apk
# Skip every permission prompt, handy before an automated test
adb install -g app.apk
# One phone when several are connected (serial numbers come from adb devices)
adb -s R58M12345 install -r app.apkOn Windows, give paths with spaces in quotes: adb install "C:\Builds\My App.apk".
On many phones at once
adb installs on one phone per command. To install on every connected phone, loop over the ones adb devices lists as ready:
bash
for s in $(adb devices | awk 'NR>1 && $2=="device" {print $1}'); do
adb -s "$s" install -r app.apk
donepowershell
adb devices | Select-Object -Skip 1 | ForEach-Object {
$serial, $state = $_ -split '\s+'
if ($state -eq 'device') { adb -s $serial install -r app.apk }
}The loop installs on one phone after another. In bash, ending the adb line with & and adding wait after done installs on all of them at the same time.
In BenchFleet you do not need the loop: the phone page installs and removes apps on one phone on every plan, and on Pro, group actions install an app on a group of phones or every phone at once, with the result for each phone.
Free for up to 3 phones, with no account. Pro adds workflows, schedules and AI for up to 25 phones from £12 a month + VAT.
Common errors and fixes
| Error | What it means | Fix |
|---|---|---|
INSTALL_FAILED_UPDATE_INCOMPATIBLE | The installed app is signed with a different key, for example the Play Store version and your debug build | Uninstall the installed app first; its data is lost |
INSTALL_FAILED_VERSION_DOWNGRADE | The APK's version code is lower than the installed app's | Add -d for a debuggable build, or uninstall first |
INSTALL_FAILED_ALREADY_EXISTS | The app is installed and the install did not ask to replace it | Add -r |
INSTALL_FAILED_TEST_ONLY | The APK is marked as a test build | Add -t |
INSTALL_FAILED_INSUFFICIENT_STORAGE | The phone is short of space | Free up storage on the phone |
INSTALL_FAILED_NO_MATCHING_ABIS | The APK's native code is for another kind of processor | Install the build for the phone's processor, or a universal APK |
INSTALL_FAILED_OLDER_SDK | The app needs a newer Android version than the phone has | Use a phone with a newer Android version |
INSTALL_PARSE_FAILED_NO_CERTIFICATES | The APK is not signed | Sign it, for example with apksigner |
INSTALL_FAILED_USER_RESTRICTED | The phone blocked the install; some makers' phones ask for confirmation or need Install via USB turned on in Developer options | Accept the prompt on the phone, or turn that switch on |
adb: more than one device/emulator | Several phones are connected | Choose one with -s and its serial number |
no devices/emulators found | adb sees no phone | See adb devices |
Related
- adb uninstall: remove an app, or find its package name.
- adb logcat: see why an app crashes right after it is installed.
- ADB over Wi-Fi: install without a cable.
- All ADB commands and the ADB command builder.
Questions
What does adb install do?
It copies an APK file from your computer to the phone and asks Android's package manager to install it, as tapping the APK on the phone would, but without any prompts on most phones. It prints Success when the app is installed.
Where does adb install look for the APK?
On your computer, relative to the folder your terminal is in, so either change to the folder with the APK or give its full path. The APK does not need to be on the phone first.
How do I install an APK without a cable?
Connect over Wi-Fi first. On Android 11 and newer, pair the phone with adb pair and connect with adb connect, then run adb install as usual.
Can adb install an app from Google Play?
No. adb installs APK files you have on your computer. Apps from Google Play are installed by the Play Store app on the phone.
How do I install the same app on many phones?
Run adb install once per phone with -s and each serial number, or loop over adb devices as shown on this page. BenchFleet's group actions install an app on a group of phones or every phone at once on Pro.
Start with the Free plan
Free for up to 3 phones, with no account. Pro adds workflows, schedules and AI for up to 25 phones from £12 a month + VAT.
- A full refund within 14 days of your first payment
- Starts in Local mode, with no telemetry or analytics
- Made by WOODCOMMERCE LTD, a company registered in the UK