gms Package integration steps :

(1) Need to download the corresponding gms, Domestic needs to pass VPN download . Download and unzip , File directory :partner_gms. When downloading , You'd better check the match android edition .

(2) Open by path gms.mk/gms_go.mk, as :partner_gms\products\gms.mk. Confirm the need to GMS Integrated code location , for example :

         # GMS home folder location
         # Note: we cannot use $(my-dir) in this makefile
         ANDROID_PARTNER_GMS_HOME := vendor/partner_gms

         notes : That is, the integration path is in the vendor below , Of course, the path and path naming can also be modified .

(3) Compile environment add gms method :  stay

device/mediatek/common/device.mk And

device/mediatek/system/common/device.mk ( Because I am android 10.0 Version, so you have to use this file ) Add in ,

# GMS interface
ifdef BUILD_GMS
ifeq ($(strip $(BUILD_GMS)), yes)
 ifeq ($(strip $(BUILD_AGO_GMS)), yes)
 $(call inherit-product-if-exists, vendor/partner_gms/products/gms_go.mk)
 else
$(call inherit-product-if-exists, vendor/partner_gms/products/gms.mk)
 endif

endif
endif

(4) Added GMS After compilation , You have to define it BUILD_GMS attribute , It can be defined in the following two files

device/mediateksample/xxxx/ProjectConfig.mk Add in file  BUILD_GMS = yes,

Because the version is android10.0 I still have to open it device/mediateksample/xxxx/ Folder full_xxxx .mk file Look at the properties of this file

SYS_TARGET_PROJECT := mssi_t_32_cn  

Then open it again device/mediatek/system/mssi_t_32_cn/SystemConfig.mk File addition  BUILD_GMS = yes attribute

(5)android 10.0  Version addition GMS Packages need to be added at the same time mainline code

If you don't join this folder The following exception occurs during compilation :

This folder can go to google Download from official website ,

(6) Because the system originally brought all kinds of software APP, And join GMS After the package, it caused a lot of damage APP repeat , The same name in the system APP, and packageinstaller
this APP Only one is allowed in the system , If there are multiple packageinstaller It will cause failure to start , Stuck at boot all the time Android Interface , So you need to turn it off vendor\partner_gms\apps\GooglePackageInstaller\Android.mk file

Add in property : LOCAL_OVERRIDES_PACKAGES := PackageInstaller
MtkPackageInstaller   To avoid two of the same problems apk,

Other names APP It's the same , Open corresponding APP Of Android.mk Add this property to the file

Technology