如何向google申请白名单:
1.fingerprint
配置好项目的fingerprint,fingerprint的各个组成部分都要确定好,一旦该fingerprint申请白名单之后,如果后续修改导致fingerprint变化,则需要重新向google申请白名单和google key
BUILD_FINGERPRINT := $(PRODUCT_BRAND)/$(TARGET_PRODUCT)/$(TARGET_DEVICE):$(PLATFORM_VERSION)/$(BUILD_ID)/$(BF_BUILD_NUMBER):$(TARGET_BUILD_VARIANT)/$(BUILD_VERSION_TAGS)
属性变量 属性值 说明
PRODUCT_BRAND ro.build.brand 客户名
TARGET_PRODUCT ro.product.name 产品名
TARGET_DEVICE ro.product.device 设备名
PLATFORM_VERSION ro.build.version.release 安卓版本
BUILD_ID ro.build.id 显示版本号
BF_BUILD_NUMBER ro.build.version.incremental 编译版本号
TARGET_BUILD_VARIANT ro.build.type user or userdebug
BUILD_VERSION_TAGS ro.build.tags 正式版本要为 release-keys
PRODUCT_BRAND:客户品牌名
TARGET_PRODUCT:产品名
TARGET_DEVICE:设备名
以上 3 个部分是决定申请白名单的 fingerprint 的最主要的部分,一定要提前和客户确认好,避免后期修改需要重新申请白名单
注意:fingerprint 不允许存在空格,可用字符包括:字母数字下划线和短横线,长度不能超过 91 个字符(为什么是91?因为SystemProperties.java中
public static final int PROP_VALUE_MAX = 91限制)。
从compatibility-tradefed.jar 中可以看出
cts 报告中读取的fingerprint是ro.build.fingerprint,cts-on-gsi 和vts 去读的fingerprint是ro.vendor.build.fingerprint
2.跑测报告
配置好fingerprint及各个组成部分之后,可以跑如下cts单项和GTS module生成对应的报告,之后将报告递交google,跑测工具需要是对应平台的最新版本的正式工具(R项目使用11_Rx, S项目使用12_RX)。
1)run gts -m GtsEdiHostTestCases (GTS 工具)
2)run cts -m CtsCurrentApiSignatureTestCases -t android.signature.cts.api.SignatureTest#testSignature (cts 工具)
注意:不能跳过device info 收集步骤,即所有递交google的报告都不能跳过该步骤
3.递交google
提交google分两种情况:
1)如果公司可以直接递交google,则可以直接在APA网站注册产品信息并递交google gms报告;
2)如果贵司没有该资格,那么可以递交签约的3pl,请3pl帮忙申请,那么之后跑gts的时候,需要该3pl的BL key json文件才能跑起来。
4. 常见白名单及google key问题
如果已经在APA网站注册过该产品,但是仍然GTS 测试fail类型总结:
1)GTS error type 1: "Unable to execute because authorization failed, please
ensure the service account key is properly installed."
请检查在跑测的终端APE_API_KEY 是否设置正确,这个APE_API_KEY 就是3pl的对应key文件,如果设置正确的话,在./gts-tradf之后,终端界面会显示APE_API_KEY
2)GTS error type 2: "Unable to execute because service account is not authorized to access information for this device. Please verify device properties are set correctly and account permissions are configured to the Business Logic Api."
请检查APA上配置的项目信息是否正确
3)GTS error type 3: "Cannot connect to business logic service for suite GTS. If
this problem persists, re-invoking with option '--ignore-business-logic-failure' will cause tests to execute anyways (though tests depending on the remote configuration will fail)."
GTS测试是需要连接google 服务器的,这个报错是连接google service fail,请等待一会重试,如果还存在这个问题,可以联系google对接人确认。
注意:google的requirement一直在变化,本文可能不适用于新平台google要求,请及时关注google最新要求。
2. device和product的区别:
device:由ro.product.brand 和ro.product.device 确定的一组硬件相似的设备
product:由ro.product.name 和隶属的ro.product.device 确定,一个device可以包含多个product
3.
IR: Initial Release
LR: Letter Upgrade Release
MR: Maintenance Release
SMR: Security Maintenance Release
EMR: Emergency Maintenance Release
Mainline 要求: IR/LR :60天之内,MR:一年之内;如果SMR中以下apk和security patch 相关联,则可以更新如下module,而非整个mainline包
Permission Controller - APK
Ext Services - APK
————————————————
版权声明:本文为CSDN博主「奕宝贝」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_60041517/article/details/125653080