Add Install API to install apps via PackageInstaller session#886
Open
shrx wants to merge 1 commit into
Open
Conversation
…on, supporting split APK bundles Add an Install API method that installs an application using the PackageInstaller session API. This works with the REQUEST_INSTALL_PACKAGES permission already held by the app and shows the system confirmation dialog, so it can install multi part packages (a base APK plus its split APKs, e.g. Android App Bundles distributed as .apkm/.apks/.xapk) which the single file install intent cannot handle. Package signatures are preserved. The "file" extra may point to a single .apk, a directory of split APKs, or a zip based bundle whose .apk entries are extracted and installed together as one session. A nested InstallStatusReceiver launches the confirmation intent on STATUS_PENDING_USER_ACTION and reports the final result.
This was referenced Jun 16, 2026
Added termux-install command to install apps via the package installer
termux/termux-api-package#239
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an
InstallAPI method that installs an application using thePackageInstallersession API. It works with theREQUEST_INSTALL_PACKAGESpermission the app already holds and shows the system confirmation dialog, so it can install multi-part packages (a base APK plus its split APKs, e.g. Android App Bundles distributed as.apkm/.apks/.xapk) that the single-file install intent cannot handle. Package signatures are preserved.This implements the README's "Ideas" item: "Add extra permissions to the app to (un)install apps".
The
fileextra may point to a single.apk, a directory of split APKs, or a zip-based bundle whose.apkentries are extracted and installed together as one session. A nestedInstallStatusReceiverlaunches the confirmation intent onSTATUS_PENDING_USER_ACTIONand reports the final result.Client script (
termux-install) added in a related PR to termux-api-package.