Android ADB Install / Uninstall App Examples

This article will tell you how to use android debug bridge to install or uninstall apps in android devices. You can read article How To Use Android Debug Bridge (ADB) to learn more if you do not know about android ADB.

1. Use ADB To Install Android Application.

1.1 Push app apk file to android device.

//Push to system app folder
adb push example.apk /system/app.

//Push to user app folder
adb push example.apk /data/app.

This method has below disadvantages.

  1. Maybe overwrite original app, so you had better use below command to backup original app before operation.
    // Pull android apk from device to local folder.
    adb pull /system/app/example.apk    /user/app_bak
  2. Usually you can encounter below error messages.
    failed to copy '/user/example.apk' to '/system/app/example.apk': Read-only file system.

    This is bacause /system/app folder is read only, you can not push files into this folder.

    To resolve this problem, you need use adb install command with -r option to force install the apk files, we will introduce it below.

    // -r means force install.
    adb install -r /user/example.apk

    Above command will install the apk into /data/local/tmp/ directory.

1.2 Use adb install command.

  1. Startup android emulator.
  2. Run adb install command as below to push android app into emulator /data/app directory.
    adb install C:/work/example.apk
  3. Click the android app icon to run it in android emulator screen.

2. Use ADB To Uninstall Android Application.

2.1 Use ADB Uninstall Command.

You can find the android app package name use android device monitor. The package name is located in /data/data folder.

You can refer article Android Device Monitor Cannot Open Data Folder Resolve Method to how to use android device monitor.

adb uninstall <app package name>

adb command uninstall android app

2.2 Use ADB Shell Command.

adb shell

cd /data/app

rm com.dev2qa.example.apk

adb shell rm command uninstall android app

3. Uninstall Android App In Emulator.

You can also use android emulator to uninstall installed apps.

  1. Click Settings —> Apps.
    uninstall android app click settings apps
  2. Click the android app that you want to uninstall in app list.
    android app list
  3. Click uninstall button in app info panel.
    click uninstall button in app info panel

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.