Skip to content

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

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

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