Skip to content

Published

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
OptionWhat it does
-rReplaces the app if it is already installed and keeps its data
-dAllows an older version than the one installed (apps built as debuggable)
-gGrants every runtime permission the app asks for, so no permission prompts appear
-tAllows a test APK, such as the ones Android Studio builds when you press Run
install-multipleInstalls 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.apk

On 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
done
powershell
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 ​

ErrorWhat it meansFix
INSTALL_FAILED_UPDATE_INCOMPATIBLEThe installed app is signed with a different key, for example the Play Store version and your debug buildUninstall the installed app first; its data is lost
INSTALL_FAILED_VERSION_DOWNGRADEThe APK's version code is lower than the installed app'sAdd -d for a debuggable build, or uninstall first
INSTALL_FAILED_ALREADY_EXISTSThe app is installed and the install did not ask to replace itAdd -r
INSTALL_FAILED_TEST_ONLYThe APK is marked as a test buildAdd -t
INSTALL_FAILED_INSUFFICIENT_STORAGEThe phone is short of spaceFree up storage on the phone
INSTALL_FAILED_NO_MATCHING_ABISThe APK's native code is for another kind of processorInstall the build for the phone's processor, or a universal APK
INSTALL_FAILED_OLDER_SDKThe app needs a newer Android version than the phone hasUse a phone with a newer Android version
INSTALL_PARSE_FAILED_NO_CERTIFICATESThe APK is not signedSign it, for example with apksigner
INSTALL_FAILED_USER_RESTRICTEDThe phone blocked the install; some makers' phones ask for confirmation or need Install via USB turned on in Developer optionsAccept the prompt on the phone, or turn that switch on
adb: more than one device/emulatorSeveral phones are connectedChoose one with -s and its serial number
no devices/emulators foundadb sees no phoneSee adb devices

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.