admin管理员组

文章数量:1650766

最早是要在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当依赖

  1. 在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>
  1. 在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)

二、较普遍的方式

  1. 在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>
  1. 在gms.mk中添加类似如下:
PRODUCT_COPY_FILES += \
    vendor/google/etc/sysconfig/eea_search_chrome.xml:system/etc/sysconfig/eea_search_chrome.xml

本文标签: 如何在GMSfeature