谷歌安全patch集成指导

Integrating Modules

This article describes how to obtain and integrate a Mainline module release package with an Android device build and provides technical guidance on implementing GPSU UX requirements in the Settings application.

Integrating Mainline module release packages

To integrate a module release package into your device build:

  1. In your Android implementation repository:

    1. Delete all files in the vendor/partner_modules.

    2. Get the module release package using one of the following options:

      • From the shared Drive, extract package contents to the root of your Android implementation repository.

      • From the partner gerrit, using the following command:

        repo init -u persistent-https://partner-android.googlesource.com/platform/manifest -b q-aml-prebuilt-release

    3. Confirm the directory structure contains vendor/partner_modules.

      Example directory structure (tentative)

  2. In the device product.mk file, add the following lines:

    # GPSU modules

    PRODUCT_PACKAGES += \

       GoogleDocumentsUIPrebuilt \

       GoogleExtServicesPrebuilt \

       ModuleMetadataGooglePrebuilt \

       GooglePermissionControllerPrebuilt

     

    # GPSU module overlay

    PRODUCT_PACKAGES += \

       GoogleExtServicesConfigOverlay \

       GooglePermissionControllerOverlay \

       GooglePermissionControllerFrameworkOverlay

  3. Determine if the device supports updatable APEX files and configure the appropriate properties:

    Device supports updatable
    APEX

    Devices launching with Android 10 must support updatable APEX files, while devices upgrading to Android 10 can support updatable APEX with a properly configured kernel.

    To ensure APEX files are updatable, add the following to your product.mk file:

    # Enable updating of APEXes
    $(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)

    This also adds the com.android.apex.cts.shim.*.apex file required for passing CTS when supporting updatable APEX.

    Device does not support
    updatable
    APEX

    Devices upgrading to Android 10 that do not use a properly configured kernel can't support updatable APEX. These devices must use flattened APEX files that are not updatable. 

    First, set the following property in your product.mk file to ensure APEX files aren't updatable:

    PRODUCT_PROPERTY_OVERRIDES += ro.apex.updatable=false

    Then, in BoardConfig.mk, add the following property to flatten the APEX files:

    TARGET_FLATTEN_APEX := true

    ALERT: It is invalid to include both flattened and updatable apex files (including com.android.runtime.[release|debug].apex) in the /system/apex or /product/apex directories. Doing so may cause installation and rollback issues with APEX modules; expect future versions of CTS to verify correct directory contents.

  4. Determine which modules must be pre-loaded and remove modules that do not need to be pre-loaded.

    1. Review the Android 10 GMS Requirements for Google-signed module pre-load requirements. The number of modules that need to be pre-loaded vary depending on the type of device build (upgrades, new launches, or Android Go).

    2. For any module that is not required to be pre-loaded, you can (optionally) remove the module

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值