Forrest logo
back to the adb tool

adb-install:tldr:f1231

adb-install: Reinstall an existing app, keeping its data.
$ adb install -r ${filename-apk}
try on your machine

The command "adb install -r ${filename-apk}" is a command used with the adb (Android Debug Bridge) tool to install or replace an Android application (.apk file) on an Android device or emulator.

Here's a breakdown of the command:

  • "adb" is the command that starts the Android Debug Bridge tool, which allows communication between your computer and an Android device or emulator.

  • "install" is the adb command used to install or replace an application on the device.

  • "-r" is an option used with the "install" command to replace an existing application with the same package name/version.

  • "${filename-apk}" is a placeholder for the actual filename of the APK (Android Package) file that you want to install. It is usually specified with the full file path.

To use this command, you would replace "${filename-apk}" with the name of your APK file, for example, "myApp.apk". Then, when executed, the adb tool will install or replace the specified APK on your Android device or emulator.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the adb tool