APK Downloader
·10 min read

How to Install APK via ADB: Complete Command Reference for Android 2026

Master ADB APK installation on Android. Learn adb install, adb uninstall, force install, downgrade, keep data, and debug installation errors with this complete terminal reference.

ADBADB installADB commandssideload APKAndroid debuggingterminal

How to Install APK via ADB: Complete Command Reference for Android 2026

ADB (Android Debug Bridge) is the most powerful tool for Android power users. When the on-screen installer fails, ADB can almost always get the job done.

ADB is a command-line tool that lets you communicate with your Android device from a computer. While it's primarily used by developers for debugging, it's also incredibly useful for advanced users who want more control over APK installation.

This guide covers every ADB command you need to install, uninstall, and manage APK files — with real examples and troubleshooting tips.


What You'll Need

Step 1: Enable Developer Options on Your Phone

Settings → About Phone → 
→ Tap "Build Number" 7 times
→ You'll see "You are now a developer!"

Step 2: Enable USB Debugging

Settings → System → Developer Options → 
→ Toggle ON "USB Debugging"
→ Toggle ON "Install via USB" (on some phones)
→ Confirm the security prompt

Step 3: Install ADB on Your Computer

Windows:

1. Download Platform Tools from developer.android.com
2. Extract to C:adb
3. Add C:adb to your system PATH
4. Open Command Prompt or PowerShell

macOS:

# Using Homebrew (easiest):
brew install android-platform-tools

# Manual download:
# Download from developer.android.com and extract to ~/adb

Linux:

# Debian/Ubuntu:
sudo apt install adb

# Fedora/RHEL:
sudo dnf install android-tools

# Arch Linux:
sudo pacman -S android-tools

Step 4: Connect Your Phone and Verify

# Connect phone via USB cable
# On phone, accept the "Allow USB debugging?" prompt

# Verify connection:
adb devices

# Expected output:
List of devices attached
XXXXXXXXXXXX    device

# If it says "unauthorized", check your phone and accept the prompt

ADB Install Commands: Complete Reference

Basic Commands

CommandDescriptionUse Case
adb install app.apkInstall an APK normallyBasic first-time installation
adb install -r app.apkReinstall/update, keep app dataUpdating an app without losing data
adb install -r -d app.apkInstall and allow downgradeDowngrading to an older version
adb install -s app.apkInstall to SD cardInstalling large apps on external storage
adb install --abi arm64-v8a app.apkInstall for specific ABIInstalling architecture-specific APKs
adb install-multiple app1.apk app2.apkInstall split APKs togetherInstalling bundles with multiple APK files

Advanced Install Options

FlagFull NameWhat It Does
-rReinstallReinstall existing app, keeping its data
-dDowngradeAllow version code downgrade (must use with -r)
-sSD cardInstall on shared mass storage (SD card)
-fForceForce install on internal storage
-tTest APKAllow installation of a test APK
-gGrant allGrant all runtime permissions during install
--instantInstant appInstall as an instant app
--abiABI overrideOverride platform ABI for native code
--no-streamingNo streamingForce ADB to push file before installing

Real-World Examples

Example 1: Basic APK Installation

# Navigate to the folder containing your APK
cd ~/Downloads

# Install an APK
adb install com.whatsapp.apk

# Success output:
Performing Streamed Install
Success

Example 2: Update an App Without Losing Data

# Update WhatsApp while keeping chat history
adb install -r com.whatsapp.apk

# The -r flag preserves app data (login, messages, etc.)

Example 3: Downgrade to an Older Version

# If a new version causes problems, go back to an older one
adb install -r -d com.whatsapp_old.apk

# -d allows downgrade to a lower version code
# Must always be used with -r

Example 4: Install Split APKs (App Bundle)

# Modern apps use split APKs. Install them together:
adb install-multiple base.apk config.arm64_v8a.apk config.en.apk

# Or with a wildcard (in some shells):
adb install-multiple *.apk

Example 5: Install to SD Card

# For large games, install to external storage
adb install -s com.heavygame.apk

# Note: Not all apps support moving to SD card

Example 6: Grant All Permissions Automatically

# Skip the permission prompts (useful for testing)
adb install -g app.apk

# All runtime permissions are granted automatically
# Works on Android 6.0+ devices

Uninstall Commands

CommandDescription
adb uninstall com.example.appUninstall an app by package name
adb uninstall -k com.example.appUninstall but keep app data and cache
adb shell pm list packagesList all installed packages to find package names
adb shell pm list packages | grep whatsappSearch for a specific package

Debugging Installation Errors

When ADB install fails, it provides detailed error messages. Here's how to interpret and fix them:

Error MessageMeaningSolution
INSTALL_FAILED_ALREADY_EXISTSApp already installedUse -r flag to reinstall
INSTALL_FAILED_VERSION_DOWNGRADENewer version already installedAdd -d flag to allow downgrade
INSTALL_FAILED_INVALID_APKAPK file is corrupted or invalidRe-download the APK from gptoapk.com
INSTALL_FAILED_NO_MATCHING_ABISCPU architecture mismatchDownload correct ABI version of the APK
INSTALL_FAILED_UPDATE_INCOMPATIBLESignature mismatchUninstall existing app first
INSTALL_FAILED_INSUFFICIENT_STORAGENot enough spaceFree up storage on your device
INSTALL_FAILED_DEXOPTDEX optimization failedReboot device and try again
Error: device not foundPhone not connected properlyCheck USB cable, driver, and USB debugging
Error: unauthorizedUSB debugging not approvedCheck phone and tap "Allow"

Useful ADB Commands Beyond Installation

ADB can do much more than just install APKs. Here are some commands that complement APK installation:

File Management

# Push a file to your phone
adb push file.apk /sdcard/Download/

# Pull a file from your phone
adb pull /sdcard/Download/file.apk .

# List files in a directory
adb shell ls /sdcard/Download/

Package Manager (pm) Commands

# List all installed packages
adb shell pm list packages

# List only third-party apps (not system)
adb shell pm list packages -3

# Find a specific package
adb shell pm list packages | grep facebook

# Clear app data
adb shell pm clear com.example.app

# Disable an app (hide from launcher)
adb shell pm disable-user --user 0 com.example.app

# Enable a disabled app
adb shell pm enable com.example.app

Device Information

# Get device model
adb shell getprop ro.product.model

# Get Android version
adb shell getprop ro.build.version.release

# Get API level
adb shell getprop ro.build.version.sdk

# Get CPU architecture
adb shell getprop ro.product.cpu.abi

# Screen resolution
adb shell wm size

# Battery status
adb shell dumpsys battery

Wi-Fi ADB (Wireless Installation)

Starting with Android 11 (API 30), you can use ADB wirelessly without a USB cable.

Method 1: Android 11+ (Developer Options)

1. Connect phone and computer to same Wi-Fi network
2. On phone: Settings → Developer Options → 
   → Wireless Debugging → Enable
3. Pair using QR code or pairing code:
   adb pair 192.168.1.100:38399
4. Connect:
   adb connect 192.168.1.100:37251

Method 2: Traditional TCP/IP (Android 10 and below)

1. Connect phone via USB first
2. Set ADB to TCP mode:
   adb tcpip 5555
3. Disconnect USB
4. Connect over Wi-Fi:
   adb connect 192.168.1.100:5555
5. Verify:
   adb devices
   → 192.168.1.100:5555    device

Pro tip: Wi-Fi ADB is slower for large APK files (over 100MB). For big files, stick with USB.

# Disconnect wireless ADB when done:
adb disconnect 192.168.1.100:5555

# Or disconnect all:
adb disconnect

Automation: Install Multiple APKs with a Script

If you frequently install multiple APKs, create a simple script:

Bash script (macOS/Linux):

#!/bin/bash
# batch-install.sh — Install all APKs in current folder

echo "Checking for connected devices..."
adb devices

for apk in *.apk; do
    echo "Installing $apk..."
    adb install -r "$apk"
    if [ $? -eq 0 ]; then
        echo "✅ $apk installed successfully"
    else
        echo "❌ Failed to install $apk"
    fi
done
echo "Batch installation complete!"

PowerShell script (Windows):

# batch-install.ps1
Get-ChildItem -Filter *.apk | ForEach-Object {
    Write-Host "Installing $($_.Name)..."
    adb install -r $_.Name
}

Security Considerations

ADB is a powerful tool. Here's how to use it safely:

  • Disable USB Debugging when not in use — Leaving it enabled increases attack surface if your phone is lost or stolen
  • Only accept ADB prompts from trusted computers — The "Allow USB debugging?" dialog shows the computer's RSA key fingerprint
  • Use ADB over USB rather than Wi-Fi when possible — Wireless ADB is convenient but slightly less secure
  • Revoke USB debugging authorizations regularly
Settings → Developer Options → 
→ Revoke USB Debugging Authorizations
→ This clears all trusted computer associations

Quick Command Reference Card

================= ADB INSTALL CHEAT SHEET =================

INSTALLING
  adb install app.apk                    Basic install
  adb install -r app.apk                 Reinstall, keep data
  adb install -r -d app.apk              Downgrade install
  adb install -s app.apk                 Install to SD card
  adb install -g app.apk                 Grant all permissions
  adb install-multiple *.apk             Install split APKs

UNINSTALLING
  adb uninstall com.example.app          Uninstall app
  adb uninstall -k com.example.app       Uninstall, keep data

TROUBLESHOOTING
  adb devices                            List connected devices
  adb kill-server                        Restart ADB server
  adb start-server                       Start ADB server
  adb reboot                             Reboot device
  adb logcat                             View device logs

PACKAGE INFO
  adb shell pm list packages -3          User-installed apps
  adb shell pm path com.example.app      APK path on device
  adb shell pm clear com.example.app     Clear app data
  adb shell dumpsys package com.example  App details

WIRELESS
  adb tcpip 5555                         Enable TCP mode
  adb connect IP:5555                    Connect wirelessly
  adb disconnect                         Disconnect

FILE TRANSFER
  adb push file.apk /sdcard/             Copy to device
  adb pull /sdcard/file.apk .            Copy from device

*Last updated: June 2, 2026. ADB commands are consistent across Android versions. Check developer.android.com for the latest additions.*

Related guides:

  • APK Installation Error Codes: Complete Reference
  • How to Fix APK Signature Verification Failed
  • Best Free APK Download Sites 2026

Keywords: ADB, ADB install, ADB commands, sideload APK, Android debugging, terminal, adb install apk, ADB guide, Android Debug Bridge, gptoapk