opengapps/aosp_build

Multiple PackageInstaller with Android 9.0

ujwal-setlur opened this issue · 4 comments

I am using the pico variant because I just need Play services, but it seems the GooglePackageInstaller that is installed conflicts with the one that comes with Android 9.0. The error in logcat is:

There must be only one installer

I then tried excluding the GoogleInstaller with:

GAPPS_EXCLUDED_PACKAGES := GooglePackageInstaller

That did not work either. Then I edited opengapps-packages.mk and commented out the following line:

# ifneq ($(filter 23,$(call get-allowed-api-levels)),)
# GAPPS_PRODUCT_PACKAGES += \
#     GoogleTTS \
#     GooglePackageInstaller
# TVGAPPS_PRODUCT_PACKAGES += \
#     GooglePackageInstaller
# endif

This ended up fixing the issue. Is there a more correct way to avoid this conflict?

GooglePackageInstaller is configured to supersede PackageInstaller. Android 9 can't yet figure out what files need to end up in the image and likely uses a PackageInstaller from an earlier build remaining in out/target/product/<your-device>/....

Running m installclean before rebuilding should resolve that - though it is curious that omitting GooglePackageInstaller solves the issue, as it should also inadvertently remain in the build.

I'll try that but I started from a fresh repo, I believe...

Check and paste the exact error: this includes the paths/package names to both PackageInstallers.

@MarijnS95 I can't seem to reproduce this anymore. Maybe I hadn't cleaned my tree after all. Now it works with me not having to disable or exclude GooglePackageInstaller at all. Just specifying GAPPS_VARIANT := pico works now.

Sorry for the noise. I think this can be closed now.