I *Export*ed from Aurora Store Firefox Android `{config.{arm64_v8a,xxhdpi},base}.apk`. I decompressed `config.arm64_v8a.apk` with `apktool d`, modified a file, recompressed with `apktool b` and signed it with `apksigner` with my own key (not initial Firefox Android one). When I try to install on Fairphone 4 LineageOS 23.2 my modified `config.arm64_v8a.apk` I face:

```bash
adb install-multi-package config.arm64_v8a.apk config.xxhdpi.apk base.apk
```
```
Created parent session ID 987220396.
Created child session ID 476751347.
Created child session ID 969327081.
Created child session ID 618232474.
adb: failed to finalize session
Failure [INSTALL_FAILED_INVALID_APK: Full install must include a base package]
Attempting to abandon session ID 476751347
Attempting to abandon session ID 969327081
Attempting to abandon session ID 618232474
Attempting to abandon session ID 987220396
```

How to solve this error?
Jun 7, 1:59pm

The error INSTALL_FAILED_INVALID_APK: Full install must include a base package occurs because Android's split APK installation requires all split APKs (config.*.apk) to be signed with the same certificate as the base APK. Since you signed only config.arm64_v8a.apk with your own key, the signatures no longer match between the base and split APKs.


Solution: Re-sign All APKs with the Same Key

Steps to Fix

  1. Re-sign all APKs (base.apk, config.arm64_v8a.apk, config.xxhdpi.apk) with your own key.

    • Use the same keystore and key for all APKs.
    • Example command:
      bash
      apksigner sign --ks mykey.jks --ks-key-alias myalias --ks-pass pass:yourpassword --key-pass pass:yourpassword base.apk
      apksigner sign --ks mykey.jks --ks-key-alias myalias --ks-pass pass:yourpassword --key-pass pass:yourpassword config.arm64_v8a.apk
      apksigner sign --ks mykey.jks --ks-key-alias myalias --ks-pass pass:yourpassword --key-pass pass:yourpassword config.xxhdpi.apk
  2. Reinstall all APKs together:

    bash
    adb install-multi-package base.apk config.arm64_v8a.apk config.xxhdpi.apk

Why This Works

  • Android enforces that all split APKs must share the same signing certificate as the base APK.
  • If you modify and re-sign only one split APK, the signatures mismatch, causing the error.
  • Re-signing all APKs with the same key ensures consistency.

Alternative: Extract, Modify, and Rebuild All APKs

If you want to ensure full compatibility:

  1. Decompile all APKs (base.apk, config.arm64_v8a.apk, config.xxhdpi.apk) with apktool d.
  2. Make your modifications (only in the relevant split APK).
  3. Rebuild all APKs with apktool b.
  4. Sign all APKs with the same key.
  5. Install with adb install-multi-package.

Note on Aurora Store APKs

  • Aurora Store APKs are already signed by their maintainers. If you modify and re-sign them, you must re-sign all splits with the same key.
  • If you want to avoid this, consider modifying the base APK instead (if possible), as it is the only mandatory package for installation. However, some apps (like Firefox) require split APKs for architecture/screen density support.
Jun 7, 1:59pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more