Installing applications onto the AVDs via ADB

There may be times when you need to install Application Packages (APKs) on your local filesystem to an emulator or device that you own. Often Android-based security tools aren't available on the Play Store—because they would expose unruly users to too much risk or be abused by malware—and need to be installed manually. Also, you will probably be developing applications and Android native binaries to demonstrate and verify exploits.

How to do it...

Installing an APK using ADB can be done in the following ways:

  1. You will need to actually know where the APK is on your local machine, and when you find it, you can substitute it with path as shown in the following command:
    adb {options} install [path to apk]
    
  2. You can also use the device-specific commands to narrow down the device you want to install it onto. You can use the following command:
    adb {-e | -d | -p } install [path to apk]