Articles · Guides

Installing an APK from your computer over USB

Android's developer tools include a command that installs a package over USB. It needs a one-off setup on the phone and a download on the computer, and after that it does several things that are difficult or impossible from the phone itself.

What it is better at

TaskFrom the phoneOver USB
Installing a single APKEasyNo advantage
Installing a split bundleNeeds an installer appBuilt in
Writing into Android/dataBlockedWorks
Installing to a phone with no browserAwkwardStraightforward
Installing the same app on several phonesTediousScripted
Removing preinstalled appsDisable onlyRemove for the user

Setting it up

  1. Enable developer options Settings, About phone, tap the build number seven times.
  2. Turn on USB debugging In developer options. The phone will ask you to authorise the computer when you first connect.
  3. Install the platform tools on the computer Google publishes them as a standalone download for Windows, macOS and Linux. No full development environment is needed.
  4. Connect and authorise Accept the prompt on the phone. Tick always allow only for a computer you own.
  5. Confirm the device is listed The devices command should show your phone. If it shows unauthorised, the prompt was not accepted.

The three things worth knowing

TaskCommand shape
Install one APKadb install app.apk
Install a split set togetheradb install-multiple base.apk split1.apk split2.apk
Replace an existing installadb install -r app.apk
Copy a file to the phoneadb push local.file /sdcard/Download/
Remove an app for this useradb shell pm uninstall --user 0 com.example.app

The multiple-install command is the one that matters most, because it is how a split bundle gets installed as a single atomic session, exactly as the Play Store does it.

Doing it without a cable

Android 11 and newer support wireless debugging, paired with a code shown in developer options. It is slower for large files and much more convenient for repeated installs, and it does not need the phone tethered to the desk.

Use a cable
  • Installing a large game bundle
  • Copying gigabytes of game data
  • A first-time setup
  • Anything where a dropout is costly
Wireless is fine
  • Small APK installs
  • Repeated testing
  • A phone across the room
  • Reading logs

Enable debugging, install the platform tools, use install-multiple for bundles, and turn debugging off when you are done.

Frequently asked questions

Do I need Android Studio?

No. The platform tools are a small standalone download containing everything needed.

Does this work on a Mac or Linux?

Yes, identically. Windows sometimes needs a manufacturer USB driver; the others generally do not.

Is USB debugging a security risk?

While enabled and authorised to a computer, yes, meaningfully. Turn it off when you have finished.

Read next

Wrong street, wrong city, or a blue dot that jumps

A dot in the wrong city is not a broken receiver. It is a WiFi network that moved house.

The printer is on the network and the phone cannot see it

There is no print button. There is a print service, and an entry in the share menu.

Six hours to fill and no socket

Aeroplane mode and a turn-based game will outlast any setting inside the game itself.

Read next

Wrong street, wrong city, or a blue dot that jumps

A dot in the wrong city is not a broken receiver. It is a WiFi network that moved house.

The printer is on the network and the phone cannot see it

There is no print button. There is a print service, and an entry in the share menu.

Work through it in the order that finds the cause

It is the cable far more often than it is the battery, and it costs nothing to rule out.