ADB

How to Install an APK With ADB (Plus Error Fixes)

Install APKs with adb install: the command, the -r -d -g flags, installing on every phone at once, split APKs and INSTALL_FAILED fixes.

Updated Oct 25, 20267 min readBy the RovaFlow team

adb install is the fastest way to put an app on an Android phone from a PC: no Play Store, no copying files, no tapping through installers. This guide covers the basic command, the flags you'll actually use, installing on every connected phone at once, and how to fix the common INSTALL_FAILED errors.

Basic command: adb install app.apk. To update an installed app and keep its data: adb install -r app.apk.

Install an APK with ADB

  1. Turn on USB debugging on the phone (Settings → About phone → tap Build number 7 times → Developer options).
  2. Connect it to the PC and accept the "Allow USB debugging?" prompt.
  3. Check it's connected, then install:
adb devices
adb install "C:\Downloads\app.apk"
Performing Streamed Install
Success

If more than one phone is connected, add the serial: adb -s R58M42ABCDE install app.apk.

Useful adb install flags

FlagWhat it doesWhen to use it
-rReplace an existing app, keeping its dataUpdating an app
-dAllow a lower version code (downgrade)Rolling back a build (debuggable apps)
-gGrant all runtime permissions listed in the manifestTest devices, to skip permission prompts
-tAllow test-only APKsAPKs built with testOnly
install-multipleInstall several split APKs as one appApps delivered as split APKs

Install on every connected phone

Windows CMD (install-all.bat)

@echo off
rem Usage: install-all.bat C:\builds\app.apk
for /f "skip=1 tokens=1,2" %%a in ('adb devices') do (
  if "%%b"=="device" (
    echo Installing on %%a...
    adb -s %%a install -r "%~1"
  )
)

PowerShell 7, in parallel

$apk = "C:\builds\app.apk"
adb devices | Select-String "\tdevice$" | ForEach-Object { ($_ -split "\t")[0] } |
  ForEach-Object -Parallel {
    $r = adb -s $_ install -r $using:apk
    "$_ : $r"
  } -ThrottleLimit 8

Parallel installs are much faster on 10+ phones. More bulk commands are in ADB commands for multiple devices.

Common errors and fixes

ErrorCauseFix
INSTALL_FAILED_UPDATE_INCOMPATIBLEInstalled app has a different signatureadb uninstall com.example.app, then install (deletes the app's data)
INSTALL_FAILED_VERSION_DOWNGRADEAPK is older than the installed versionUse -d (debuggable apps) or uninstall first
INSTALL_FAILED_ALREADY_EXISTSApp already installedAdd -r
INSTALL_FAILED_INSUFFICIENT_STORAGENot enough free spaceFree up storage on the phone
INSTALL_FAILED_OLDER_SDKApp needs a newer Android versionUse a newer phone or a build with a lower minSdk
INSTALL_FAILED_NO_MATCHING_ABISAPK built for a different CPU (e.g. x86 vs ARM)Use the APK for the phone's architecture
INSTALL_PARSE_FAILED_NO_CERTIFICATESAPK isn't signedSign the APK (debug or release key)
INSTALL_FAILED_USER_RESTRICTEDPhone blocks USB installs (common on Xiaomi)Turn on "Install via USB" in Developer options
more than one device/emulatorSeveral phones connectedAdd -s SERIAL

Split APKs, .apks and .xapk files

Many Play Store apps are delivered as several APK files (a base plus splits for language, screen density and CPU). Install them together:

adb install-multiple base.apk split_config.arm64_v8a.apk split_config.en.apk split_config.xxhdpi.apk

.apks and .xapk files are archives of these splits: unzip them and use install-multiple, or use Google's bundletool for .apks.

One click, every phone

RovaFlow's mass app installer pushes an APK to every phone (or a group) in one click while you watch each screen live. Plus one-to-many control, workflows and device health. Windows, one-time price.

See RovaFlow pricing

FAQ

How do I install an APK with ADB?

Connect the phone with USB debugging on and run adb install path\to\app.apk. Use adb install -r to update an app that is already installed while keeping its data.

How do I install an APK on multiple devices at once?

Loop over the serial numbers from adb devices and run adb -s SERIAL install -r app.apk for each one. In PowerShell 7, ForEach-Object -Parallel installs on several phones at the same time.

How do I fix INSTALL_FAILED_UPDATE_INCOMPATIBLE?

The installed app is signed with a different key than the new APK. Uninstall the old app first with adb uninstall PACKAGE_NAME (this deletes its data), then install again.

How do I install split APKs or an .apks file?

Extract the APK files and install them together with adb install-multiple base.apk split_config.arm64_v8a.apk split_config.en.apk, or use Google's bundletool for .apks archives.

Related guides

Home Features Pricing Sign In
Chat with us