Android10(Q) GMS 全家桶移植

GG301S.md.png
GG3B6g.md.png

1、將平臺廠商提供的 GMS 包解壓後所有文件扔到 vendor/google/ 目錄下,沒有 google文件夾自己創建下

GG8GgU.png

2、修改如下文件,編譯燒寫

device/mediatek/common/BoardConfig.mk

@@ -201,7 +201,8 @@ ifeq ($(BUILD_GMS),yes)
   ifeq ($(strip $(MTK_AB_OTA_UPDATER)), yes)
     DONT_DEXPREOPT_PREBUILTS := false
   else
-    DONT_DEXPREOPT_PREBUILTS := true
+    # DONT_DEXPREOPT_PREBUILTS := true
+    DONT_DEXPREOPT_PREBUILTS := false
   endif
 else
   ifeq ($(TARGET_BUILD_VARIANT),userdebug)

device/mediatek/common/device.mk

@@ -927,7 +927,8 @@ ifeq ($(strip $(BUILD_GMS)), yes)
 # ifeq ($(strip $(BUILD_AGO_GMS)), yes)
 # $(call inherit-product-if-exists, vendor/go-gms/products/gms.mk)
 # else
-$(call inherit-product-if-exists, vendor/google/gms.mk)
+# $(call inherit-product-if-exists, vendor/google/gms.mk)
+$(call inherit-product-if-exists, vendor/google/products/gms.mk)
 # endif

device/mediatek/common/device.mk
device/mediatek/system/common/device.mk
兩個地方都一樣,直接註釋

@@ -3875,33 +3875,35 @@ endif
 # From Android Q, GMS devices must preload Google signed Mainline module release
 ifeq ($(BUILD_GMS), yes)
     # Mainline module overlay
+    # PRODUCT_PACKAGES += \
+    #     GoogleExtServicesConfigOverlay \
+    #     GooglePermissionControllerOverlay \
+    #     GooglePermissionControllerFrameworkOverlay
+
+    # PRODUCT_PACKAGE_OVERLAYS += device/mediatek/common/overlay/mainline
+
+    # # Mainline common and must APK
+    # PRODUCT_PACKAGES += \
+    #     GoogleExtServicesPrebuilt \
+    #     ModuleMetadataGooglePrebuilt \
+    #     GooglePermissionControllerPrebuilt
+
+    # # Mainline other APK dependent on A-Go configuration
+    # ifneq ($(strip $(MTK_GMO_RAM_OPTIMIZE)), yes)
+    #     PRODUCT_PACKAGES += \
+    #         GoogleDocumentsUIPrebuilt\
+    #         GoogleCaptivePortalLogin\
+    #         GoogleNetworkStack\
+    #         GoogleNetworkPermissionConfig
+    #     PRODUCT_MAINLINE_SEPOLICY_DEV_CERTIFICATES := vendor/partner_modules/NetworkStackPrebuilt
+    # else
+    #     PRODUCT_PACKAGES += \
+    #         InProcessNetworkStack \
+    #         PlatformCaptivePortalLogin \
+    #         PlatformNetworkPermissionConfig
+    # endif
 
     ifneq ($(call math_gt_or_eq,$(PRODUCT_SHIPPING_API_LEVEL),29),)
         # FBE device can support updatable APEX

device/mediateksample/編譯項目名字/ProjectConfig.mk

@@ -88,6 +88,9 @@ MTK_AAL_SUPPORT = no
 MTK_AB_OTA_UPDATER = no
 MTK_AEE_SUPPORT = yes
 MTK_AGPS_APP = yes
+#for GMS interface
+BUILD_GMS=yes
+BUILD_GMS_WITH_FASTPASS=yes
 MTK_AIV_SUPPORT = no

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章