Repository navigation
Conversation
mar-v-in
requested changes
Jul 11, 2026
| // Without this flag, EMUI intercepts each PackageInstaller session and shows a | ||
| // mandatory user-confirmation dialog — including for Dynamic Feature Module installs. | ||
| // USER_ACTION_NOT_REQUIRED requires API 31 (Android 12 / S). | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { |
Member
There was a problem hiding this comment.
Please use import android.os.Build.VERSION.SDK_INT and directly refer to SDK_INT (to not confuse with the Build from device profiles.
Also please use direct SDK level code (31) instead of named version codes.
Contributor
Author
There was a problem hiding this comment.
Done, updated in the latest commit.
- Add USER_ACTION_NOT_REQUIRED to SessionParams in installPackagesInternal() for API 31+ (Android 12+) to prevent Huawei EMUI InstallDistActivity from intercepting every PackageInstaller session commit with a confirmation dialog. - Implement splitDeferred() in SplitInstallService to route deferred DFM install requests through splitInstallFlow() instead of being a no-op stub. Previously, apps like Facebook would fall back to startInstall() for each deferred module, triggering additional PackageInstaller sessions and additional InstallDistActivity dialogs on EMUI. Fixes: microg#3541
grenadin
force-pushed
the
fix/emui-install-dist-dialog-user-action-required
branch
from
July 11, 2026 14:43
f79cbba to
fa111c0
Compare
Contributor
Author
|
@mar-v-in I've updated the SDK_INT import and switched to the direct API level (31) as requested. Ready for another look whenever you have time, please let me know if anything else needs changing. |
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.
Fixes #3541
When an app installed through microG requests dynamic feature modules, microG asks for an install confirmation again and again.
splitDeferred()was a no-op stub, so apps such as Facebook never got an answer and fell back tostartInstall()for the same modules. Every request created a newPackageInstallersession that needed a confirmation:InstallDistActivityon Huawei EMUI,PackageInstallerActivityon stock Android.As a side benefit, the same change removes the confirmation on stock Android 12+ for apps updated through the installer proxy (#3074), for example Aurora Store's "Update all" with the microG installer.
Changes
SplitInstallService.kt: implementsplitDeferred()through the samesplitInstallFlow()asstartInstall(), and always callonDeferredInstall()afterwards so the caller is not left waiting.Install.kt: setUSER_ACTION_NOT_REQUIREDon the session forSDK_INT >= 31.AndroidManifest.xml: requestUPDATE_PACKAGES_WITHOUT_USER_ACTION(normal permission, API 31+). Without it, Android ignoresUSER_ACTION_NOT_REQUIRED(PackageInstallerSession.computeUserActionRequirement).Security considerations
com.android.vendingas installer of record, so they are covered too.getAndCheckCallingPackage) and download the splits from Play.Testing
Dynamic feature modules (Huawei MatePad Mini, EMUI 12,
fa111c0)splitDeferred()calls are answered, and it no longer falls back to repeatedstartInstall()requests. In this run the split install service was disabled in microG's settings, so the requests were rejected and no modules were installed. Not re-tested yet with split install enabled.Huawei MatePad Mini (EMUI 15.0.0, Android 12), debug build of
d0999c6, an update through the installer proxy (called the same way as Aurora)SilentUpdatePolicy, an allowlist of installer packages that Huawei's PackageInstaller fetches from Huawei's server. It returnsallowed: falseforcom.android.vending, soInstallDistActivityis still shown once per install. This cannot be changed from microG.Huawei log
Side benefit: Android 12 emulator (AOSP image), Aurora Store 4.8.4 with the microG installer, "Update all" (2 apps, microG as installer of record)
bb9a37d):PackageInstallerActivityfor both apps; they installed only after confirming.d0999c6): no confirmation, both apps updated, Aurora's task stayed at 4 activities.Emulator logs
Without the permission (
bb9a37d):With the permission (
d0999c6):Before this PR: Aurora "Update all" (0.3.17 release, Huawei Mate X6, EMUI 15, Android 12, Aurora Store 4.8.3 / 4.8.4 with the microG installer)
InstallDistActivityfor every app. While the dialogs waited, Aurora's task grew to 65 activities (MicroGInstallerActivityandAppInstallActivity), and Aurora could not be scrolled.Too many active sessions.Logs
Later, installing YouTube through the microG installer (50 sessions of
com.android.vendinglisted under "Active install sessions" indumpsys package):Requests received by
AppInstallActivityvs. completion (Aurora 4.8.4, app names replaced):Full logs (filtered, app package names replaced):
aurora-4.8.3-microg-installer.log
aurora-4.8.4-microg-installer.log