CTSrun cts --shard-count2-ssn1-ssn2sn1 sn2 两台设备运行 cts cts 的测试环境需要连接外网和写入谷歌keyrun cts --exclude-filter CtsMediaTestCases --shard-count2-ssn1-ssn2sn1 sn2 两台设备运行 cts 并跳过CtsMediaTestCases 模块GTSrun gts-ssn1运行gts 整个模块 需要注意的GTS 的运行需要依靠实验的白名单申请环境#export APE_API_KEY/home/rkgms001/GMSWORK/jdk_sdk_gtskey-V1/gts_key/gts-windriver_public.json#export APE_API_KEY/home/rkgms001/GMSWORK/jdk_sdk_gtskey-V1/gts_key/gts-fih-public.json配置APE_API_KEY 来保证测试环境正常STSrun sts-dynamic-full --shard-count2-ssn1 sn2STS 的测试需要同指纹的debug 版本来测试在测试的过程中 会将指纹替换成userVTSrun vts --shard-count2-ssn1-ssn2需要使用GSI 的工具包将设备刷入VTS 镜像就可以开始测试VTS 脚本echoreboot bootloader for vtsadbrebootbootloaderechounloce vbootfastboot devices fastboot oem at-unlock-vbootechounloce vbootfastboot devices fastboot oem at-unlock-vbootechoreboot fastbootfastbootrebootfastboot fastboot devicesechodelete product for GSIfastboot delete-logical-partition product fastboot delete-logical-partition product_a fastboot delete-logical-partition product_bechoflash misc.imgfastboot flash misc GSI/misc.imgechoflash misc.imgfastboot flash misc GSI/misc.img fastboot flash boot_a GSI/boot-6.1.img fastboot flash boot_b GSI/boot-6.1.img fastboot flash vendor_boot_a GSI/vendor_boot-debug.img fastboot flash vendor_boot_b GSI/vendor_boot-debug.img fastboot flash init_boot_a GSI/init_boot.img fastboot flash init_boot_b GSI/init_boot.imgechoflash GSIfastboot flash system GSI/system.imgechoreboot devicefastbootrebootGSIrun cts-on-gsi --shard-count2-ssn1-ssn2需要使用GSI 的工具包将设备刷入GSI 镜像就可以开始测试GSI 脚本echoreboot bootloader for GSIadbrebootbootloaderechounloce vbootfastboot devices fastboot oem at-unlock-vbootechounloce vbootfastboot devices fastboot oem at-unlock-vbootechoreboot fastbootfastbootrebootfastboot fastboot devicesechodelete product for GSIfastboot delete-logical-partition product fastboot delete-logical-partition product_a fastboot delete-logical-partition product_bechoflash misc.imgfastboot flash misc GSI/misc.imgechoflash misc.imgfastboot flash misc GSI/misc.imgechoflash GSIfastboot flash system GSI/system.imgechoreboot devicefastbootrebootGSI 镜像的组成部分system.img 和 vbmata.img 是由谷歌提供boot-6.1.img 在 mkcombinedroot/prebuilts/boot-6.1.img 位置其他的固件都有编译生成的固件进行覆盖上面介绍了vts 和gsi 烧录镜像 可以看到在开始之前都会将机器解锁讲完了基本的测试命令 搞一搞 签名报告的申请CTSrun cts-mCtsCurrentApiSignatureTestCases-tandroid.signature.cts.api.SignatureTest#testSignatureGTSrun gts-mGtsEdiHostTestCases上面需要将签名报告发送给实验室 还需要一个device ID 该文件用来申请 key 文件1#!/bin/bash23DEVICENAMETEMPgoogelkey0045foriin{1..50000};6doecho$i7if(($i10))8then9echo${DEVICENAMETEMP}0000$ideive_id10elif(($i100$i10))11then12echo${DEVICENAMETEMP}000$ideive_id13elif(($i1000$i100))14then15echo${DEVICENAMETEMP}00$ideive_id16elif(($i10000$i1000))17then18echo${DEVICENAMETEMP}0$ideive_id19elif(($i100000$i10000))20then21echo${DEVICENAMETEMP}$ideive_id22fi23echo-------------24done上面是我的device_id 的文件生成的代码SMR 的测试流程CTS: run cts-mCtsSecurityTestCases-s//user GTS: run gts-smr-s//user STS: run sts-dynamic-incremental-s//userdebugBTS 打包所用的固件boot.img dtbo.img init_boot.img misc.img super.img vbmeta.img vendor_boot-debug.img vendor_boot.img