Skip to content

[com.android.vending] EMUI InstallDistActivity confirmation dialog appears for every PackageInstaller session; splitDeferred() not implemented causes repeated DFM install prompts #3541

Open

Description

@grenadin

Affected app
Name: microG Companion (vending-app) — affects all apps installed through it, notably those with Dynamic Feature Modules (e.g. Facebook, TikTok)
Package id: com.android.vending


Describe the bug

Two related issues in vending-app cause Huawei EMUI devices to show a mandatory confirmation dialog (InstallDistActivity) for every Dynamic Feature Module (DFM) installation, resulting in repeated popups that cannot be dismissed automatically.

Issue 1 — Missing USER_ACTION_NOT_REQUIRED flag

GmsPackageInstaller (via installPackagesInternal() in Install.kt) creates every PackageInstaller.SessionParams without setting USER_ACTION_NOT_REQUIRED. On Huawei EMUI (EMUI 12+, Android 12+), the system intercepts each PackageInstaller session commit and routes it through InstallDistActivity (com.huawei.appmarket/…riskcheck.ui.activity.InstallDistActivity), which shows a full-screen user confirmation dialog — even for background DFM installs.

This is confirmed by logcat evidence (see below): InstallDistActivity appears as the topActivity before every session commit.

The correct fix, as already implemented by Aurora Store's SessionInstaller.kt, is:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
    params.setRequireUserAction(SessionParams.USER_ACTION_NOT_REQUIRED)
}

Issue 2 — splitDeferred() is a no-op stub

SplitInstallService.splitDeferred() currently only logs a warning and immediately ACKs with onDeferredInstall(Bundle()) without performing any actual installation. Apps such as Facebook (com.facebook.katana) call splitDeferred() once per DFM module to request background pre-installation (e.g. pytorch, papaya,executorch, and potentially more modules over time). Because the deferred install never happens, the app falls back to calling startInstall() for the same modules later — triggering a new PackageInstaller session per module and, on EMUI, a new InstallDistActivity dialog per module.


Combined effect on EMUI:

Base APK commit -> InstallDistActivity dialog appears (Issue 1)
splitDeferred() called repeatedly for DFM modules (once per module) → all no-op (Issue 2)
App falls back to startInstall() for the same modules
Additional InstallDistActivity dialog for each DFM module commit (Issue 1 + 2 combined)


To Reproduce

Install microG Services (com.google.android.gms) and microG Companion (com.android.vending) on a Huawei EMUI device (Android 12+).
Enable "App Installer" in microG settings.
Install Aurora Store 4.8.2-hw or 4.8.3-hw; select microG as the installer method.
Install or update Facebook (com.facebook.katana) via Aurora Store.
Observe: InstallDistActivity confirmation dialog appears for the base APK, then additional dialogs appear for DFM module installs (pytorch, papaya, etc.).
Logcat collection command (Windows PowerShell):

adb logcat -c ; adb logcat 2>$null | Select-String -Pattern "SplitInstall|GmsPackage|InstallDist|com.facebook|df_" -CaseSensitive:$false | Tee-Object -FilePath "C:\facebook_log.txt"

Expected behavior

  • PackageInstaller sessions created by microG Companion should not trigger the Huawei EMUI InstallDistActivity confirmation dialog.
  • splitDeferred() should schedule and perform the actual deferred DFM installation in the background, so that apps do not need to fall back to startInstall() for the same modules.
  • The overall behavior should match the real Play Store: DFM installs happen silently in the background without any user interaction required.

Evidence from logcat

# InstallDistActivity intercepting the base APK session commit:
06-08 00:11:40 topActivity=com.huawei.appmarket/…InstallDistActivity taskId=28089

# Base APK installed successfully after user confirmation:
06-08 00:11:55 D GmsPackageInstaller: onReceive status: 0 sessionId: 682541505
06-08 00:11:55 D GmsPackageInstaller: SessionResultReceiver received a successful transaction

# Facebook calls splitDeferred() for DFM modules — all no-op:
06-08 00:12:09 W SplitInstallService: splitDeferred(Bundle[mParcelledData.dataSize=64]) called for com.facebook.katana, but is not implemented
06-08 00:12:09 W SplitInstallService: splitDeferred(Bundle[mParcelledData.dataSize=60]) called for com.facebook.katana, but is not implemented
06-08 00:12:09 W SplitInstallService: splitDeferred(Bundle[mParcelledData.dataSize=68]) called for com.facebook.katana, but is not implemented

# Facebook gives up on deferred path and falls back to startInstall():
06-08 00:12:09 W SplitInstallService: splitDeferred(Bundle[mParcelledData.dataSize=56]) called for com.facebook.katana, but is not implemented
06-08 00:12:09 W SplitInstallService: getSessionStates() called for com.facebook.katana, but is not implemented
06-08 00:12:09 D SplitInstallService: startInstall(Bundle[mParcelledData.dataSize=56]) called for com.facebook.katana
06-08 00:12:09 V SplitInstallManager: splitInstallFlow will query for these packages: [pytorch]

# New GmsPackageInstaller session for pytorch DFM — triggers InstallDistActivity again:
06-08 00:12:10 V GmsPackageInstaller: installPackages start com.facebook.katana

System

  • Android Version: 12 (EMUI 12 / HarmonyOS 2.x)
  • Device: Huawei (EMUI)
  • Custom ROM: Stock EMUI / HarmonyOS (no root)
    microG
  • microG Core version: 0.3.15.250932-hw (versionCode: 250932030)
  • microG Companion version: 0.3.15.40226-hw (versionCode: 84022630)
  • microG Self-Check: All items ticked; App Installer enabled
  • Installer resolved: com.android.vending/org.microg.vending.installer.AppInstallActivity ✅

Additional context

This issue affects any app that uses Dynamic Feature Modules (DFM), including Facebook and TikTok.

This issue began appearing after the introduction of microG PR #3074 (App Installer Proxy / AppInstallActivity), adopted in Aurora Store starting from version 4.8.0-hw. A fix for both issues is being prepared as a separate PR.

Related: microG PR #3074 (App Installer Proxy).
Full Log that capture around the DFM call 3-4 times facebook_log_redacted.txt

Activity

  1. Rayan56767 commented on Jun 16, 2026

    @Rayan56767

    @DaVinci9196

    Sorry for pinging, do you know if the fix provided here can be applied for 0.3.16? This issue is going on ever since Aurora Store allowed MicroG Companion to be selected as installer.

  2. Rayan56767 commented on Jun 30, 2026

    @Rayan56767

    Hey, @grenadin
    Do you know if the fix that you have written down here will be implemented in the new, upcoming version?

  3. grenadin commented on Jul 2, 2026

    @grenadin
    ContributorAuthor

    Hey, @grenadin Do you know if the fix that you have written down here will be implemented in the new, upcoming version?

    Hi!!! The fix is in PR #3543, awaiting maintainer review. Whether it lands in 0.3.16 or later is up to them. That's just how open source works.You can build from the branch yourself, but note that on Huawei EMUI, Signature Spoofing requires Differentiated Signature Capability approved by Huawei, which only the official microG build has. Without it, apps like YouTube, Gmail, and Aurora Store won't work.

    More details in #2037. If you want this capability for your own build, Huawei has an official channel:
    https://forums.developer.huawei.com/forumPortal/en/topic/0202128603315033024

    For context, I'm fairly new here. I noticed splitDeferred() had been left as a stub since #2553, ran into this issue myself, and gave it a try. Hopefully the more experienced contributors can verify whether the approach is sound.

  4. grenadin commented on Oct 21, 2026

    @grenadin
    ContributorAuthor

    Update after more testing on Huawei (HarmonyOS 4.3, EMUI 15 / Android 12).

    Cause confirmed. With microG 0.3.17, "On-demand component installation" enabled and apps installed through the microG installer, every on-demand module is installed through its own PackageInstaller session. On EMUI every session from Companion is checked by SilentUpdatePolicy, which answers allowed: false, so each module shows the Huawei install dialog:

    • Facebook (Mate X6, official 0.3.17): 4 dialogs in about an hour — base APK, maplibre, papaya, pytorch (log).
    • TikTok (MatePad Mini): 14 dialogs in 7 minutes — base APK and 13 on-demand modules (df_search_biz, df_camera_biz, df_im_bootfinish, …). TikTok asks for the next module about 2 seconds after the previous one is confirmed.

    If the dialog is hidden behind the app, the session stays pending, the module is never installed, and the app stops asking for more.

    Fix in progress. The main fix is now #3903 by @DaVinci9196, not #3543. It delivers modules through SplitCompat instead of a PackageInstaller session. With its latest commit (f4768736), Facebook, Netflix and TikTok got their modules without any dialog when the app requested them while open. A few cases still use sessions; details and logs are in my comment on #3903.

    Workaround until then (Facebook only). Install Facebook with Aurora's Session installer instead of the microG installer. Facebook then downloads its modules itself and never asks Companion. This does not help TikTok, which always asks Companion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions