1、下载并添加到源码中,如:alps/vendor/google_r6:
2、修改项目配置,device/maisui/projectname/ProjectConfig.mk:
MTK_GAUGE_VERSION = 30
MTK_SWIP_WMAPRO = no
BUILD_AGO_GMS = no
+# add for gms start
+BUILD_GMS = yes
+# add for gms end
MTK_RCS_UA_SUPPORT = no
MTK_GPU_VERSION = mali bifrost r20p0
MTK_GPU_COMMON_DVFS_SUPPORT = yes
3、把gms.mk加入到项目编译中
+# add for gms start
+# GMS interface
+ifdef BUILD_GMS
+ifeq ($(strip $(BUILD_GMS)), yes)
+ ifeq ($(strip $(BUILD_AGO_GMS)), yes)
+ $(call inherit-product-if-exists, vendor/google_r6/products/gms_go.mk)
+ else
+$(call inherit-product-if-exists, vendor/google_r6/products/gms.mk)
+ endif
+
+endif
+endif
+# add for gms end
4、修改device/mediatek/common/device.mk
@@ -4851,33 +4851,33 @@ endif
# From Android Q, GMS devices must preload Google signed Mainline module release
ifeq ($(BUILD_GMS), yes)
# Mainline module overlay
- PRODUCT_PACKAGES += \
+ #PRODUCT_PACKAGES += \
GoogleExtServicesConfigOverlay \
GooglePermissionControllerOverlay \
GooglePermissionControllerFrameworkOverlay
- PRODUCT_PACKAGE_OVERLAYS +