[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
gms包集成步骤:
(1) 需要下载对应gms,国内需要通过VPN下载。下载后解压,文件目录:partner_gms。下载时,最好核对一下匹配的android版本。
(2)依照路径打开gms.mk/gms_go.mk,如:partner_gms\products\gms.mk。确认需要将GMS集成的代码位置,例如:
# GMS home folder location
# Note: we cannot use $(my-dir) in this makefile
ANDROID_PARTNER_GMS_HOME := vendor/partner_gms
注:也就是集成路径默认在vendor下面,当然路径与路径命名也可以做修改。
(3)编译环境添加gms方法: 在
device/mediatek/common/device.mk 与
device/mediatek/system/common/device.mk (因我这是android 10.0版本所以还得在此文件)内添加,
# 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)添加了GMS编译后,就得定义BUILD_GMS属性,在以下两文件可定义
device/mediateksample/xxxx/ProjectConfig.mk 文件内添加 BUILD_GMS = yes,
因版本是android10.0所在还得打开device/mediateksample/xxxx/ 文件夹下的full_xxxx .mk文件 看此文件的属性
SYS_TARGET_PROJECT := mssi_t_32_cn
然后再打开device/mediatek/system/mssi_t_32_cn/SystemConfig.mk文件添加 BUILD_GMS = yes属性
(5)android 10.0 版本添加GMS包需要同时加入mainline代码
如未加入此文件夹 编译会出现如下异常:
此文件夹可以去google官网下载,
(6)因为系统内原本是自带了各类APP,而加入GMS包后就造成了很多APP重复,系统内同名APP,而packageinstaller
此APP系统内是只允许有一个的,如果系统内同时存在多个packageinstaller则会造成无法开机,一直卡在开机时Android界面,所以需要把开vendor\partner_gms\apps\GooglePackageInstaller\Android.mk文件
添加入属性: LOCAL_OVERRIDES_PACKAGES := PackageInstaller
MtkPackageInstaller 来避免出现两个一样的apk,
其它同名APP也是一样,打开对应APP的Android.mk文件添加此属性