MainlineModule

问题描述

GtsOsTestCases
com.google.android.os.gts.MainlineModulePreloadTest
com.google.android.os.gts com.google.android.os.gts.MainlineConfigurationTest#testMainlineApprovedTrain

解决方案

Q1: Mainline release 是什麼? What is Mainline release?Ans: Google 列進 Mainline scope 的 module 會由 Google 出 prebuilt binary 並 release 給有 GMS license 的廠商, Android 10 要過 Google GMS 認證需要 preload Mainline release, 也就是要用 Google build 的 binary, 不能用客戶修改過、客戶自己用 AOSP build 出的 binary。

From Android 10, we need to preload Mainline release into our SW load to pass xTS to obtain GMS certification. It means Google will release prebuilt binary for modules in Mainline scope to Android partners who have GMS lincense and Android partners must use Google Mainline release and cannot use binaries built by Android partners.

 

Q2: 如何整合 Mainline module? How do customers integrate Mainline release?

Ans: 客戶可參考 DCC 上的文件 "MTK_Android_Q_Mainline_W1937"。

Google 有提供 Mainline integration guide https://support.google.com/androidpartners_gms/answer/9358977?hl=en&ref_topic=9353615, MTK 為了方便客戶集成, 已將 project makefile 都設定好, 但需客戶與 Google 取得 Mainline release 後放入 source tree (codebase) 去 build, 關於 project makefile 的設定與說明, MTK 文件上有 filepath 與截圖說明, 看文件較清楚。

Customers can download our integration document "MTK_Android_Q_Mainline_W1937" from DCC.

Google has one Mainline integration guide https://support.google.com/androidpartners_gms/answer/9358977?hl=en&ref_topic=9353615. To let customers can integrate Mainline release easily, MTK already configured project makefile. Customers only need to get Mainline release from Google and then put to source tree (codebase) and build. Please refer to our integration document to know about project makefile setting.

Q3: 客戶來跟 MTK 要 Mainline release, 如何處理? What can we do when customers ask MTK to provide Mainline release?

Ans: MTK 與 Google 簽的 GMS Express 合約未包含 Mainline release, 且 Google 之前說 "MTK 不能釋放 Mainline release 給 MTK 客戶, MTK 客戶需要找 Google 取得 Mainline release", 因此需請客戶聯繫客戶的 Google TAM 取得 Mainline release。

The GMS Express contract signed by MTK and Google does not include Mainline release. MTK cannot provide Mainline release to MTK customers. Please customers contact their Google TAM to get Mainline release.

Q4:遇到 xTS fail 看起來與 Mainline 有關, 如何处理?

Ans: 請先確認是否已跟 Google 取得 Mainline release, GMS device 從 Android Q 開始需整合 Mainline release, 客戶可參考 DMS 上的文件 "MTK_Android_Q_Mainline_W1937"。

Q5: Settings -> Security 中未出現 "Google Play system update" 這 menu item 的原因是什麼? What is the reason that we don't see "Google Play system update" menu item in Settings -> Security?

Ans: 用戶需先登入 Google Play 後, 該 menu item 會由 Google GMS apk (Phonesky) 插入, Google 提供的測試步驟如下:

  • Add at least one account, especially for Play Store
  • Check Settings -> Security if you see 3 or 4 menus under "Security Status"
  • If you have 3 menus, i.e., you don't see "Google Play system update", go to Settings -> App and force stop Play Store and relaunch Play Store (important as it triggers resyncing the flags pushed from server) and go check Settings -> Security again

User must login Google Play first and then "Google Play system update" menu item will be inserted by Google GMS apk (Phonesky). The test steps provided by Google are as following.

  • Add at least one account, especially for Play Store
  • Check Settings -> Security if you see 3 or 4 menus under "Security Status"
  • If you have 3 menus, i.e., you don't see "Google Play system update", go to Settings -> App and force stop Play Store and relaunch Play Store (important as it triggers resyncing the flags pushed from server) and go check Settings -> Security again

 

Q6: 為什麼點進 Settings -> Security -> Google Play system update 後 update fail? Why update fail after click "Google Play system update" in Settings -> Security menu?

Ans: This menu item is inserted by Google GMS apk directly and all mechanism are implemented by Google. We don't know the interaction between a device and Google server. Please contact your Google TAM to get help.

 

Q7: Google 多久 release 一次 Mainline module? 客戶該用什麼版本? How often does Google release Mainline modules? Which version should customer use?

Ans: Google 每個月會更新一次 Mainline module, 跟著 security patch 一起更新, 客戶 codebase 更新到哪一個月份的 security patch 就需將 Mainline module 更新到該月份的版本。

Google releases Mainline modules monthly with security patch. Customer should use Mainline release aligned with security patch level. For example, when customer merge security patch to 2012/01, they need to merge 2012/01 Mainline release.

 

Q8: 客戶從 Google 那拿到 Mainline release 放進 codebase 遇到 build error 或 runtime error, 經查 Google 只給了 apk、apex 檔, 未給相應的 Android.mk、Android.bp 編譯腳本, 該如何處理?

Customer reported they met build error issue or runtime error issue after they put Mainline release to their codebase. Build error is because Google only gave apk and apex to customer and didn't provide corresponding Android.mk and Android.bp. How to support customer?

Ans: 客戶拿到的應該是 Google 放到 Google drive 的那一包 release, Google 只給了 apk, 沒給 makefile 和 overlay。因 Mainline module 的 makefile 和 overlay 都是 Google 給的, 我們無法提供給客戶。請客戶看是否有 Google partner gerrit 上 q-aml-prebuilt-release 這條 branch 的權限, 若沒有, 建議客戶跟 Google 申請, 直接拉那一條 branch 的所有 repo 下來。Mainline release note 提到的 get module 的作法如下:

Using partner gerrit
You can get the modules using partner gerrit by the following command:
$ repo init -u persistent-https://partner-android.googlesource.com/platform/manifest -b q-aml-prebuilt-release
$ repo sync -c -j8

Google releases Mainline modules via Google drive and Google partner gerrit. Google drive only has apk and apex. Since Android.mk, Android.bp and overlay files should be released by Google, customer needs to get Mainline release via Google partner gerrit. The steps provided by Google in Mainline release note are as following.

Using partner gerrit
You can get the modules using partner gerrit by the following command:
$ repo init -u persistent-https://partner-android.googlesource.com/platform/manifest -b q-aml-prebuilt-release
$ repo sync -c -j8

 

Q9: Google 給的 Mainline release 未包含 device/mediatek/system/common/device.mk 裡有寫到的 A-Go 需要的 InProcessNetworkStack、PlatformCaptivePortalLogin、PlatformNetworkPermissionConfig 這三個 module

Ans: 這三個 module 是直接用 AOSP source build 出, 以下是各 package 對應的 source path

  • InProcessNetworkStack: packages/modules/NetworkStack
  • PlatformCaptivePortalLogin: packages/modules/CaptivePortalLogin
  • PlatformNetworkPermissionConfig: packages/modules/NetworkPermissionConfig

 

Q10: GTS 7.0 R3 GtsStagedInstallHostTestCases-com.google.android.stagedinstall.gts.host.StagedInstallTest#testSamegradeSystemTzdataApex fail

Ans: Google 12 月份 release 了一份 mandatory functional patches, 其中 https://android.googlesource.com/platform/system/apex/+/ff34b18d49a0966d60181aa728ff0ffc961932ee 這筆客戶若沒有 merge 會導致測項 fail

MTK q0.mp1 check-in CL: http://gerrit.mediatek.inc:8080/plugins/gitiles/platform/system/apex/+/ae4c22f011a9c1ad84a4421d4e6f58d049e9af7c

 

Q11: GTS 7.0 R4 GtsOsTestCases-com.google.android.os.gts com.google.android.os.gts.MainlineConfigurationTest#testMainlineApprovedTrain fai

Ans: Google added a new test case "testMainlineApprovedTrain" to GTS 7.0 R4 to test if the device preloads approved Mainline release. When this case fails, customer needs to check which version they preloads. Customer must preload the version which Google approved to preload. In case of any question, please customer contact their Google TAM.

GTS 7.0 R4 release note: https://support.google.com/androidpartners_gms/answer/9743965
Added testMainlineApprovedTrain test based on business logic to get the list of approved mainline trains and modules updated monthly and crosschecks with the list of modules installed on a device for build certification.

Customer can check Google GMS webite for approved Mainline train.
https://support.google.com/androidpartners_gms/answer/9681547?hl=en&ref_topic=9353615

For example, we checked on 2020/3/9 and found February 2020 release is available for preloading. The release is in https://drive.google.com/drive/folders/1HbbHeS3JLal8TAUq5AQkSDem9d2O7v8o from above webpage. And from the release note (https://drive.google.com/drive/folders/1HbbHeS3JLal8TAUq5AQkSDem9d2O7v8o), customer can check the version from "Module-specific Information" section.

 

com.google.android.os.gts.MainlineConfigurationTest#testMainlineApprovedTrain
Fail:
java.lang.AssertionError: Module(s) not approved for preloading found.: com.google.android.media: 291900700, com.google.android.conscrypt: 291900700, com.google.android.networkstack.permissionconfig: 291900700, com.google.android.networkstack: 291900700, com.google.android.modulemetadata: 291900201, com.google.android.ext.services: 291900700, com.google.android.documentsui: 291900700, com.google.android.resolv: 291900700, com.google.android.captiveportallogin: 291900700, com.google.android.media.swcodec: 291900700, com.google.android.permissioncontroller: 291900700,  Try factory reset or preload Mainline modules approved for preloading only.
From Google 2020/1 release note, the version of Mainline modules is as following.
networkstack.permissionconfig: 291900801
networkstack: 292000301
modulemetadata: 292003400
ext.services: 291900801
documentsui: 291602100 (文件上有個註解說 Changed from 291600201)
captiveportallogin: 291900801
permissioncontroller: 291900801
But from your GTS failed log, the version of preloading Mainline modules is as following.
com.google.android.networkstack.permissionconfig: 291900700,
com.google.android.networkstack: 291900700,
com.google.android.modulemetadata: 291900201,
com.google.android.ext.services: 291900700,
com.google.android.documentsui: 291602100,
com.google.android.captiveportallogin: 291900700,
com.google.android.permissioncontroller: 291900700,
The version is not identical. Google might update the release recently. Or when you build the load, do you clean build it?

微信扫码打赏

作者: RESSRC

个人资源站

《MainlineModule》有一个想法

  1. 兄弟 ,这个testVendorPropertyNamespace fail的,是改报错的器件命名吧。
    test/vts-testcase/security/system_property/VtsTrebleSysPropTest.py这个里面是规范命名前缀吧

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据