admin管理员组文章数量:1650763
最早是要在Android P原生机型上预置Turbo和DigitalWellbeing文档中有如下要求:
Play Store updates
To receive Play Store updates for DHS, devices must include the
com.google.android.feature.TURBO_PRELOAD feature in their device specific sysconfig file.
如下介绍两种方式:
一、把feature当依赖
- 在apps/Turbo目录下新建文件turbo-sysconfig.xml,在文件中添加如下:
<config>
<!-- This system feature is required for getting play store updates
for Turbo app. -->
<feature name="com.google.android.feature.TURBO_PRELOAD" />
</config>
- 在Turbo的Android.mk中配置如下:
在Turbo Module中添加一行:
LOCAL_REQUIRED_MODULES := turbo-sysconfig.xml
并新建turbo-sysconfig.xml 的module:
include $(CLEAR_VARS)
LOCAL_MODULE := turbo-sysconfig.xml
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/sysconfig/
LOCAL_SRC_FILES := $(LOCAL_MODULE)
include $(BUILD_PREBUILT)
二、较普遍的方式
- 在vendor/google/etc/sysconfig目录下新建配置文件,写入对应feature,类似:
<?xml version="1.0" encoding="utf-8"?>
<config>
<feature name="com.google.android.feature.EEA_DEVICE" />
<feature name="com.google.android.paid.search" />
<feature name="com.google.android.paid.chrome" />
</config>
- 在gms.mk中添加类似如下:
PRODUCT_COPY_FILES += \
vendor/google/etc/sysconfig/eea_search_chrome.xml:system/etc/sysconfig/eea_search_chrome.xml
版权声明:本文标题:如何在GMS中添加相关feature 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1729534625a1205257.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论