8

Android's adb has a "partial application install":

$ adb install
Android Debug Bridge version 1.0.32
...

  adb install [-lrtsd] <file>
  adb install-multiple [-lrtsdp] <file...>
                               - push this package file to the device and install it
                                 (-l: forward lock application)
                                 (-r: replace existing application)
                                 (-t: allow test packages)
                                 (-s: install application on sdcard)
                                 (-d: allow version code downgrade)
                                 (-p: partial application install)

Notice -p is "partial application install".

What is a partial application install?

1 Answer 1

4

It is my assumption that the -p: partial application install is for installing packages that are an update to an existing package but are not standalone in itself, sort of how Play Store updates an app using delta or smart updates.

-p requires a base package to exist and its name passed next to it, else it will throw the error

Error: java.lang.IllegalArgumentException: Missing inherit package name

If the APK you're passing is not an incremental update to an existing package (PACKAGE), you would end up with

Failed to finalize session
Failure [INSTALL_FAILED_INVALID_APK: Missing existing base package for PACKAGE]

I do not have any incremental update so I can't verify my own claim, neither I have any other solid evidence for the whole claim other than these two:

A comment in Issue:1134353002 thread

Splits are not normal .apks, and they can only be installed via "adb install-multiple"

And, this code snippet mentioned under the source code of PackageInstallerSession.java

else {
  // Partial installs must be consistent with existing install 
  final ApplicationInfo app = mPm.getApplicationInfo(mPackageName, 0, userId);
  if (app == null) {
      throw new PackageManagerException(INSTALL_FAILED_INVALID_APK, "Missing existing base package for " + mPackageName);
  }
1
  • Briefly, this quote is enough: "adb install-multiple"
    – albert
    Oct 25, 2019 at 4:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .