cts报告带bugreport的话需要加上 --bugreport-on-failure
【问题原因】
【解决办法】
【验证版本】
【验证结果】
【gerrit id】
【测试建议】
GTS 测试是什么
Google Mobile Services Test Suite,所谓的Google Mobile Services即谷歌移动服务
是谷歌开发并推动Android的动力,也是Android系统的灵魂所在
STS 是什么?
主要是测试 Android Security Patch 是否生效,Goolge最新通告,2019年03月开始STS要全部pass
GSI 是什么
Generic system image)— Reference AOSP system image通用系统映像上的兼容性测试套件
这个文件包也是签约获取授权后才能获取,Google也会定期更新GSI包Android O要求测试VTS和CTS on GSI,此时对应版本必须是GSI版本,测试包都为VTS。
VTS的全称是 Vendor Test Suite(供应商测试套件)
CTS跑多项:
1.新建文件,例如:CtsStatsdHostTestCases.xml armeabi-v7a根据html报告来
<?xml version='1.0' encoding='UTF-8' standalone='no' ?>
<SubPlan version="2.0">
<Entry include="armeabi-v7a CtsStatsdHostTestCases android.cts.statsd.alert.AnomalyDetectionTests#testPerfetto" />
<Entry include="armeabi-v7a CtsStatsdHostTestCases android.cts.statsd.atom.UidAtomTests#testPackageInstallerV2MetricsReported" />
<Entry include="armeabi-v7a CtsStatsdHostTestCases android.cts.statsd.atom.UidAtomTests#testPackageInstallerV2MetricsReportedForSplits" />
</SubPlan>
2.android-cts目录新建subplans目录将步骤1的文件放在下面
3.run cts --subplan CtsStatsdHostTestCases -s +手机sn号
外网远程访问cts那台电脑
命令行访问:ssh huangrongrui@192.168.46.236
ftp方式访问:ftp://192.168.46.236/ (账号:huangrongrui 密码:111111)
cts处理流程
0.用daybuild tool测是否pass
1.在MTK上 https://online.mediatek.com/FAQ 搜索错误项(参考已有case)
2.在MTK上 https://online.mediatek.com/FAQ 搜CTS查看最新错误项是否是已说明的(是否已豁免或新工具修复)
3.看报告属于哪个模块,转对应模块
4.用daybuild版本;问测试是否有最新工具测试
5.看bugreport
6.问cts测试,上个版本是否有报错,判断是否是修改引起
7.提平台case
8.cts fail需要看TestRunner: started:和 TestRunner: failed:之间的log是否有异常的现象,
结合测试过程设备的现象(是否有黑屏,无响应等),对比pass和fail的log之间的异常点是否共同存在,非共同存在的需要重点关注
9.看代码测试内容,在代码添加log编译apk,替换掉工具里面的apk后测试,就是用的编译的apk,会打处log
10.对于很多报错和后面测试项done状态是false的,说明有一项fail导致设备处于异常状态,导致后面的测试项无法完成
如何找出哪一项导致异常:
10.1 查看test_result.xml文件,搜索result="fail",找到这个fail所在的TestCase如下案例,
TestCase是android.server.wm.FreeformWindowingModeTests,模块是CtsWindowManagerDeviceTestCases,后续单测这就可以
<TestCase name="android.server.wm.FreeformWindowingModeTests">
<Test result="IGNORED" name="testNonResizeableActivityHasFullDisplayBounds" skipped="true" />
<Test result="ASSUMPTION_FAILURE" name="testMultiWindowFullscreenRequestRejection">
<Failure message="org.junit.AssumptionViolatedException: Only test on device guaranteed with a freeform display ">
<StackTrace>org.junit.AssumptionViolatedException: Only test on device guaranteed with a freeform display
at org.junit.Assume.assumeTrue(Assume.java:68)
at android.server.wm.FreeformWindowingModeTests.testMultiWindowFullscreenRequestRejection(FreeformWindowingModeTests.java:193)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:148)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:142)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.lang.Thread.run(Thread.java:1012)
</StackTrace>
</Failure>
</Test>
<Test result="pass" name="testFreeformWindowManagementSupport" />
<Test result="fail" name="testMultiWindowFullscreenOnNonPcDevice">
开始时间
06-29 13:59:53.836 10385 29243 29259 I TestRunner: started: testNoKeyguardDialogOnPrivateDisplay(android.server.wm.MultiDisplayKeyguardTests)
测试过程中异常点
06-29 13:59:57.212 10054 3346 3346 E CTS : isCTSGTSTest flag====true
06-29 13:59:57.212 10054 3346 3346 D AndroidRuntime: Shutting down VM
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: FATAL EXCEPTION: main
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: Process: com.android.systemui, PID: 3346
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/motorola/internal/app/MotoDesktopManager;
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at com.android.systemui.statusbar.workmode.PcModeManager.canAddNavBar(PcModeManager.java:1340)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at com.android.systemui.navigationbar.NavigationBarController.onDisplayReady(NavigationBarController.java:266)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at com.android.systemui.statusbar.CommandQueue$H.handleMessage(CommandQueue.java:1594)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8163)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:946)
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: com.motorola.internal.app.MotoDesktopManager
06-29 13:59:57.213 10054 3346 3346 E AndroidRuntime: ... 10 more
fail时间
06-29 14:00:14.100 10385 29243 29259 E TestRunner: failed: testNoKeyguardDialogOnPrivateDisplay(android.server.wm.MultiDisplayKeyguardTests)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: ----- begin exception -----
06-29 14:00:14.100 10385 29243 29259 E TestRunner: java.lang.AssertionError: Activity=android.server.wm.app/.VirtualDisplayActivity must be visible. expected:<true> but was:<false>
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.Assert.fail(Assert.java:89)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.Assert.failNotEquals(Assert.java:835)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.Assert.assertEquals(Assert.java:120)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at android.server.wm.WindowManagerStateHelper.assertVisibility(WindowManagerStateHelper.java:659)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at android.server.wm.MultiDisplayTestBase$VirtualDisplaySession.createVirtualDisplays(MultiDisplayTestBase.java:468)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at android.server.wm.MultiDisplayTestBase$VirtualDisplaySession.createDisplays(MultiDisplayTestBase.java:394)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at android.server.wm.MultiDisplayTestBase$VirtualDisplaySession.createDisplay(MultiDisplayTestBase.java:377)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at android.server.wm.MultiDisplayTestBase$VirtualDisplaySession.createDisplay(MultiDisplayTestBase.java:386)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at android.server.wm.MultiDisplayKeyguardTests.testNoKeyguardDialogOnPrivateDisplay(MultiDisplayKeyguardTests.java:157)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at java.lang.reflect.Method.invoke(Native Method)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:148)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:142)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at java.util.concurrent.FutureTask.run(FutureTask.java:264)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: at java.lang.Thread.run(Thread.java:1012)
06-29 14:00:14.100 10385 29243 29259 E TestRunner: ----- end exception -----
06-29 14:00:14.100 10385 29243 29259 I TestRunner: finished: testNoKeyguardDialogOnPrivateDisplay(android.server.wm.MultiDisplayKeyguardTests)
结合现象和log,此测试过程中有黑屏后显示锁屏,都是和systemui有关
CTS和GTS直接用USER版本测试
GSI只要刷google的system文件
Vts要刷system和boot文件
STS必须用 userdebug 版本,必须用最新工具
BTS扫描用user版本
-------------------------------------------------------
前置条件:开启开发者选项-打开OEM开关
VTS
打开OEM开关
adb reboot bootloader
fastboot flashing unlock
出现提示界面按 音量上
fastboot reboot fastboot
fastboot flash system system.img
fastboot flash boot_a boot-debug.img看刷机工具boot是在哪个分区,如果是boot_a就用这个命令,如果是boot就是不区分ab分区,用fastboot flash boot boot-debug.img命令
//fastboot flash boot boot-debug.img
fastboot -w
fastboot reboot
------------------------------------------------------
log搜 TestRunner
STS测试项fail需要在工具对应的测试包反编译搜索查找fail项
cts Rollback问题:报告的bugreport搜 rollbackReason
例子:CtsRollbackManagerHostTestCases -t com.android.cts.rollback.host.RollbackManagerHostTest#testRollbackFailsOtherSessions
rollbackReason: REASON_NATIVE_CRASH failedPackageName: thh-2-0 和thh-2-0修改相关导致
CtsViewTestCases --android.view.cts.KeyEventTest#testIsMediaSessionKey
FAILKeyEvent.java中的isMediaSessionKey方法里面的case KeyEvent.KEYCODE_MUTE被删掉导致
CtsAppSecurityHostTestCases--android.appsecurity.cts.AdoptableHostTest#testPrimaryStorage FAIL
问题分析:该测试项主要是测试SD卡存储相关,测试过程中会反复读取SD卡
测试建议:测试前请插入高速大容量SD卡,本地自测使用16GB的卡
BTS 提示单个apk
问题分析: apk是在patch合入之前编的的,在合入patch后重新编译就好了
------------------------------------------------------------------------cts问题分组
OOAKT-3061【BTS】Possible warnings:MBA policy violation in /_by_plabel_/system_ext/app/ImsDataChannelService/ImsDataChan nelService.apk(2023-05-17) 通讯肖文友 高通case id:06521185
OOAKT-3275【STS】CtsPermission4TestCases--android.permission4.cts.CameraMicIndicatorsPermissionTest#testMicIndicatorWithManualFinishOpStillShows 缺少CVE-2023-2094
OOAKT-1736 GtsGmscoreHostTestCases FAIL wifi版本缺少DIAL TestRunner: java.lang.AssertionError: Should have at least one packages to handle Intent { act=android.intent.action.DIAL }, found [] 缺少应用,通讯组处理
OAK-14190【CTS】CtsAppSecurityHostTestCases--android.appsecurity.cts.AdoptableHostTest#testPrimaryStorage FAIL 1.回退防互刷提交后pass 2.性能组最大进程数16改32后可以pass
OMAPLET-4887 【CTS】CtsContentTestCases--android.content.cts.AvailableIntentsTest#testCalendarAddAppointment FAIL 日历相关模块
OOAKT-5106【CTS】CtsAppTestCases--android.app.cts.NotificationTemplateTest#testBigPictureStyle_bigPictureUriIcon FAIL 横屏fail,竖屏pass,原生机也有此问题
OOAKT-5679 com.android.tradefed.device.DeviceNotAvailableException[DEVICE_UNAVAILABLE|520750|LOST_SYSTEM_UNDER_TEST]: Could not find device 找不到设备,查看是否进dump了,是的话转底层稳定性
OOAKT-5683 CtsPermissionTestCases--android.permission.cts.DebuggableTest#testNoDebuggable FAIL 报错提示的包名的apk的manifest.xml里面android:debuggable="true"导致,需要去掉
OMAPDKI-54 CtsUsesNativeLibraryTest FAIL,so库的问题 libnativeloader.so
Expected: is <[]> but: was <[dlopen failed: library "/system/lib64/libtun2http.so" needed or dlopened by "/apex/com.android.art/lib64/libnativeloader.so" is not accessible for the namespace
"classloader-namespace"]> at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18) at org.junit.Assert.assertThat(Assert.java:964)
at com.android.test.usesnativesharedlibrary.LoadTest.testAvailableLibrariesAreLoaded(LoadTest.java:110)
S88528AA1-8191 GtsGmscoreHostTestCases 需要插卡测试
com.google.android.gts.security.AttestationRootHostTest#testEcAttestationChainRemProvLengthTee
java.lang.AssertionError: on-device tests failed:
com.google.android.gts.security.AttestationRootTest#testEcAttestationChainRemProvLengthTee:
Device did not receive remotely provisioned keys/certificates. Please verify the device was registered following the instructions at https://docs.partner.android.com/gms/building/integrating/att-keys/rkp#factory-upload
To quickly check registration status, run the RemoteProvisionerRegistrationTest under packages/apps/RemoteProvisioner
This can be done by executing 'atest RemoteProvisionerRegistrationTest'.
S88528AA1-8212 【Google认证】【S88823BA1】【CTS】CtsPermissionPolicyTestCases--android.permissionpolicy.cts.PermissionPolicyTest#platformPermissionPolicyIsUnaltered
list of offending permissions
expected to be empty
but was: [Permission android.permission.CALL_AUDIO_INTERCEPTION invalid enforced protection 4000000, expected 4000010]
at android.permissionpolicy.cts.PermissionPolicyTest.platformPermissionPolicyIsUnaltered(PermissionPolicyTest.java:295)
修改framework/base/core/res/AndroidMainfest.xml 中的Permission android.permission.CALL_AUDIO_INTERCEPTION的
protectionLevel="signature|privileged|role"被改为protectionLevel="signature|role"引起
PERIDOT-1049 CtsViewTestCases--android.view.cts.KeyEventTest#testKeyCodeFromString FAIL
KeyEvent.java中的LAST_KEYCODE被修改导致
OMAPDKI-61【STS】StsHostTestCases--android.security.sts.Bug_258188673#testPocBug_258188673 FAIL
Android STS 排查方法
常见的fail项 分为如下2种:
测试项中 不包含CVE 的 和 包含CVE 的
1、android.security.sts.Bug_258188673#testPocBug_258188673
这就是不包含CVE的,直接显示为 testPocBug_258188673
如果测试用例名称不包含CVE-ID,谷歌搜索“Android A-[Bug ID]”
2、android.security.cts.CVE_2021_0487#testPocCVE_2021_0487
这就是包含CVE的,直接显示为 testPocCVE_2021_0487
OOAKT-5857【MOTO】【CTS】CtsGraphicsTestCases--android.graphics.drawable.cts.AdaptiveIconMaskTest#testDeviceConfig_iconMask_useRoundIcon FAIL 桌面圆角应该把config_useRoundIcon参数配置成true
3. java.io.FileNotFoundException: Compatibility test file libsepolwrap.so
测试工具里无 libsepolwrap.so文件
工具问题,需要查看android-cts\testcases\CtsSecurityHostTestCases\lib64下是否有libsepolwrap.so文件,没有的话重新解压工具
14_r1 / 10818077 测试pass
4.正式工具fail,db工具无此测试项的,向google申请豁免
STS用userdebug版本
BTS扫描用user版本
google源码地址(可查询google提交记录):https://android.googlesource.com/platform
google patch地址:https://source.android.com/security/bulletin
查询google某个patch:https://nvd.nist.gov/vuln/detail/CVE-2022-22822
goole源码无需外网(非最新代码)Google Play 上的过滤器 | Android 开发者 | Android Developers
一、电脑环境
1.请下载适用于您的操作系统的 Android SDK 工具包,然后按照附带的 README 文件中的说明进行操作。
安装最新版本的 Android 调试桥 (adb) 和 Android 资源打包工具 (AAPT),并将这两个工具的位置添加到计算机的系统路径中。
2.adb/fastboot更新到30以上
下载地址: https://developer.android.com/studio/releases/platform-tools
3.升级Python(Python 2.7将于2020年1月1日之后不再维护,pip的未来版本将不再支持Python 2.7),请升级python版本到3.5以上
下载地址: Download Python | Python.org
4.Ubuntu版本需要18.04版本以上
5.从GTS8.0开始,Linux需要JDK9的环境,否则跑不起来,具体参考FAQ23477
二、网络环境
1.IPV6(Internet Protocol Version 6)
手机可访问:Ipv6.google.com
2.IPV4(Internet Protocol Version 4)
手机可访问:www.google.com
3.室内安装GPS信号放大器
三、工具下载地址
1.CTS tool:
https://source.android.com/compatibility/cts/downloads
2.VTS and GSI:
https://support.google.com/androidpartners_gms/answer/9124917?hl=en
3.GTS tool:
https://support.google.com/androidpartners_gms/answer/9124364?hl=en
4.Daily build tool下载地址:
https://partnerdash.google.com/partnerdash/d/partnerandroidbuild#p:id=home&a=543365459
S-EAP:
https://partner.android.com/build/builds;branch=git_sc-release;product=test_suites_arm64?a=180356357
5.Partner Android Build (PAB)
PAB is Android daily build package for xTS test suite
You can use the latest version of PAB to verify your issue was fixed or not
说明:从R开始,CTS-ON-GSI 需要用CTS工具测试
四、手机设置
1.手机写入SN number/IMEI number/BT/wifi mac地址
2.连接VPN wifi (高速稳定翻墙网络)
3.将手机的时间与PC时间调整一致
4.关闭工模下的MoMs(EngineerMode-->other-->MoMs-->Disable MoMs for CTS Test)
5.Setting language “English (United States)
6.Settings/display/font size,系统字体大小设置成normal
7.Settings/about phone/build number 点击多次,开启“开发者模式”
8.Settings/developer options/stay awake “on”
9.Settings/developer options/USB debugging “on”
10.Settings/developer options/Verify apps over USB “off”
11.Settings/security/screen lock “None”
12.测试CTS/CTS-ON-GSI 需要拷贝android-cts-media1.5文件
五、Q版自动测试命令集合
注意:STS retry时,下发retry指令时不能加-o这个参数;
六、刷GSI image
Q版本在刷GSI时,请务必严格参考FAQ:
FAQ22274,FAQ22665
R版本在刷GSI时,请务必严格参考FAQ:
说明:R上面不支持GKI
七、Case注意事项
Module | 方法 |
CtsTelephonySdk28TestCases | 插入有效SIM卡(确保SIM卡有写入本机号码,能正常发送短信/打电话,确保手机有写入正确的IMEI号) 运营商:中国联通/中国移动/中国电信 |
CtsTelephonyTestCases | |
GtsTelephonyTestCases | |
GtsDialerDeviceTestCases | |
CtsUsageStatsTestCases | |
GtsGmsCoreHostTestCases | |
GtsNmgiarcTestCases | |
VtsHalRadioV1_0Target | |
VtsHalRadioV1_1Target | |
VtsHalRadioV1_2Target | |
VtsHalRadioV1_3Target | |
VtsHalRadioV1_4Target | |
CtsOmapiTestCases | 白卡测试项:插入有效UICC卡(白卡) 必須插入Google 定義的UICC SIM卡才可以pass.(插入卡后,一定要重启手机) (双模需要插入双SIM卡,并设一张为默认SIM卡) 相關資料可以參考 https://source.android.com/compatibility/cts/secure-element 购买渠道: 大陆这边可以联系金雅拓或者蓝源: 金雅拓: https://docs.partner.android.com/gms/testing/cts/cts-faq?hl=en&authuser=2 Where can I get the SIM cards for CTS for Secure Element? Email the following contacts to obtain SIM cards for test purpose:
蓝源: yangbinbin@cn-lanyuan.com Q版测试对应Q版的白卡 R版测试对应R版的白卡 |
GtsSimAppDialogTestCases | |
CtsSecureElementAccessControlTestCases | |
CtsCarrierApiTestCases | |
VtsHalSecureElementV1_0Target | |
CtsNetTestCases | 连接IPV6网络 |
CtsLibcoreTestCases | |
CtsNetTestCases android.net.cts.ConnectivityManagerTest#testOpenConnection | 插入有效香港SIM卡 (打开mobile data和roaming) |
CtsTelephonyTestCases android.telephony.cts.SmsUsageMonitorShortCodeTest#testSmsShortCodeDestination | 1.恢复出厂 2.开机引导不联网 3.直接连自己的热点设置手机 然后开始测试 |
CtsHostsideNetworkTests | 请连接VPN wifi,插入有效SIM卡(能正常打电话、发送短信)并打开数据连接 运营商:中国联通/中国移动/中国电信 |
CtsNetTestCasesLegacyApi22 | |
CTSV unlockedDeviceRequired | 这一项不需要设置指纹 请按以下步骤测试: 1.setting/security/screen lock/pattern 、PIN or password (设置一个屏幕锁) 2.Unlocked Device Required /start test/灭屏5秒 3.然后打开屏幕,解锁后即可pass |
CtsAppSecurityHostTestCases | 需要插入高速SD/TF卡 |
CtsJobSchedulerTestCases | 此模块必须插入有效SIM卡并打开数据连接 (双模需要插入双SIM卡,并设一张为默认SIM卡) |
CtsStatsdHostTestCases | |
CtsVcnTestCases | |
CtsUsageStatsTestCases | 此模块必须插入有效SIM卡并打开数据连接 P版:插入有效香港SIM卡 |
GtsLocationTestCases | 1.确保VPN wifi网络高速稳定(adb shell ping supl.google.com 可以ping通) 2.确保clock有校准 |
CtsLocationTestCases | |
VtsHalGnssV2_0Target | |
GtsExoPlayerTestCases GtsYouTubeTestCases GtsMediaTestCases | 这几个模块对网速要求很高(高速稳定的VPN网络) 当遇到测试fail的情况下,可以把media文件push到手机SD上(本地播放),然后再测看是否能pass(排除是网络问题) 1.文件下载地址: Downloads
https://docs.partner.android.com/gms/testing/gts/running-gts?hl=en 2.将下载的文件push到 SD 卡上,请使用以下命令: adb push gts test wvmedia /sdcard/ 3.对应命令: run gts -m GtsExoPlayerTestCases --module-arg GtsExoPlayerTestCases:config-url:https://storage.googleapis.com/exoplayer-test-media-1 gen-4 dynamic-config-sdcard-1.0.json run gts -m GtsYouTubeTestCases --module-arg "GtsYouTubeTestCases:skip-media-download:true" --module-arg "GtsYouTubeTestCases:instrumentation-arg:media-path:=/sdcard/test" run gts -m GtsMediaTestCases --module-arg "GtsMediaTestCases:instrumentation-arg:media-path:=file:///sdcard/wvmedia" |
GtsRegulationComplianceTestCases com.google.android.regulationcompliance.gts.EEAComplianceTest#testEEAv2Compliance | 1.确保翻墙网络高速稳定 2.测试之前将手机恢复出厂设置后,手机开机进入向导,连接VPN wifi登录已注册的白名单 Gmail 账号 (注册gmail帐户之后,需要请3PL实验室帮忙添加白名单)后再去测试 3.特别注意搜索引擎务必在开机向导中选择,不能进入系统之后在下拉通知栏的deferred setup中再选. |
GtsDialerDeviceTestCases com.google.android.dialer.gts.GtsDialerDeviceTest#makeCall_verifyDialerWorking | 测试使用可以进行国际拨号的有效SIM卡 (必须开通国际通话服务) |
[CTSV]DeviceSuspendTestActivity com.android.cts.verifier.sensors.DeviceSuspendTestActivity | 1.进工厂模式校准Gsensor到high 2.灭屏待机10分钟以上再去测试此项 (目的就是让后台的活跃应用suspend) |
GtsSettingsTestCases com.google.android.settings.gts.MADAComplianceTest#testMADACompliance | 1.MADACompliance这个测项单纯是用UIAutomator去寻找相应的UI和text,首先要确保系统语言设置的是美式英语 2.在测试之前手动去刷新一下Google Play protect (在system setting里可以找到这个菜单) 3.确保连接高速稳定翻墙网络(测此条case网速必须要快&稳) |
CtsPermission2TestCases android.permission2.cts.NoReceiveSmsPermissionTest#testReceiveTextMessage android.permission2.cts.NoReceiveSmsPermissionTest#testAppSpecificSmsToken android.permission2.cts.RestrictedPermissionsTest#shareUidBetweenRestrictedAndNotRestrictedApp | 确保SIM卡写入带+86的本机号码 确保SIM卡能正常发送信息/接收长短信 检查setting里关于SIM卡的设置项里,SMS这一项设定default SMS card(固定到某一张卡) |
[R版]【EEA项目-导航栏花瓣效果】Opa home button animation patch | alps-mp-r0.mssi1 申请patch:ALPS05511712 |
GtsRegulationComplianceTestCases com.google.android.regulationcompliance.gts.RUComplianceTest#testRUCompliance | 俄罗斯项目,跑此case的时候会启动chrom 浏览器,在这个界面点击next 按照官方的GTS测试前手机设置,是需要手动去点掉这些画面的 https://support.google.com/androidpartners_gms/answer/9382926?hl=en&ref_topic=9382925 Launch the browser and dismiss any startup/setup screen. |
CTS Verifer Condition Provider test | 从R版开始: 1.CTS Verifer 11初次启动时和10不一样,不会主动弹出权限弹框给客户点击,需要自己去settings中赋予所有权限,这样后面的测项才能正常执行 adb shell appops set com.android.cts.verifier MANAGE_EXTERNAL_STORAGE 0 3.安装CTSVerifier apk之前要先执行如下命令 从S版开始: 测试Notification Listener Test之前必须设置Lock screen 1.setting/security/screen lock(Pattern&PIN&Password)任意设置一种 2.选择Show all notification content. |
Camera CTS issue | metadata相关的配置问题 参考: MTK DCC: Smartphone/HW/Common Design Notes/Camera/Common/Camera Basic Guide/04_Camera _MiddleWare MTK online HAL3:http://online.mediatek.com/QuickStart/QS00137 MTK online FAQ:http://online.mediatek.com/FAQ |
CTSV MIDI Test | 1.需要购买专用设备 五针五芯MIDI连接线 https://detail.tmall.com/item.htm?id=563300901607&spm=a1z09.2.0.0.792a2e8d5THfFm&_u=adnum7c7290 无线 MIDI 适配器MDBT01 MD-BT01 https://source.android.com/compatibility/cts/cts-midi 2.需要安装专用apk com.mobileer.example.midibtlepairing_com.mobileer.example.midibtlepairing.apk google play里面也可以安装 MD-BT01购买链接: MD-BT01 - Overview - Accessories - Synthesizers & Music Production Tools - Products - Yamaha USAGoogle官网 https://source.android.com/compatibility/cts/cts-midi |
CtsSkQPTestCases org.skia.skqp.SkQPRunner#unitTest_WritePixelsPendingIO | 此模块(CtsSkQPTestCases)必须单跑(不能单测) |
CtsOsTestCases android.os.cts.CompanionDeviceManagerTest#testRequestNotifications | 测试时旁边多放一台打开蓝牙的手机(测试机和辅助机都要打开蓝牙) |
CTSV Companion Device Service Test | 请用蓝牙耳机(支持BLE,BR/EDR) 1. Android CtsVerifier.apk(adb install -r -g CtsVerifier.apk) 2. DUT turns on bt, there needs to be a BT device around during the test (I use airpods for testing (please make sure your test device can send BLE broadcast and br/edr broadcast at the same time)) 3. Click "Companion Device Service Test" 4. Click "GO", then click "airpods" in the pop-up window 5. A few seconds later, a pop-up box will pop up "Device appeared xx:xx:xx:xx:xx:xx", and then power off airpods (close the earphone box and leave the airpods in the off state) 6. A few seconds later, a pop-up box will pop up "Device disappeared xx:xx:xx:xx:xx:xx" and then click "DEVICE GONE" 7.power on airpods (open the earphone box so that the airpods can be scanned) 8. A few seconds later, a pop-up box will pop up "Device appeared xx:xx:xx:xx:xx:xx", then click "DEVICE PRESENT" 9. Finally click on the "green tick", and test pass |
VTS: VtsHalSecureElementV1_0Target CTS: CtsSecureElementAccessControlTestCases1 CtsSecureElementAccessControlTestCases2 CtsSecureElementAccessControlTestCases3 signed-CtsSecureElementAccessControlTestCases1 signed-CtsSecureElementAccessControlTestCases2 signed-CtsSecureElementAccessControlTestCases3 CtsOmapiTestCases | 遇到CtsOmapiTestCases /VtsHalSecureElementV1_0Target fail case解决方法: 确认MTK_OMAPI_SUPPORT 是否设定为Yes, 以及sim 卡是否符合Google 的規定 https://source.android.com/compatibility/cts/secure-element 确认是否客制化将 packages/apps/SecureElement 移除或沒有安裝 SecureElement.apk ? 从Android P Google 开始实作 OMAPI https://android-developers.googleblog.com/2018/03/previewing-android-p.html https://developer.android.com/reference/android/se/omapi/package-summary 为了支持 Android P/Q OMAPI MTK_OMAPI_SUPPORT 是开启 MTK 对于 UICC 的 HIDL 实作 若沒开启, 预期也要能找到 SecureElementService 才能 pass |
Camera ITS | ITS测试分为两个部分,PartI和PartII 具体烦请参考FAQ: FAQ21801[ITS]its 文档/工具全集 |
八.报告说明:
Ignored: means that the test did not run at all and was completely skipped.
Assumption Failure:means that some precondition of the test isn't met and the test was aborted.
Both Ignored and Assumption Failure are treated as Pass
https://docs.partner.android.com/gms/testing/gts/running-gts?hl=en
九、Google官方相关地址
GMS下载:
https://docs.partner.android.com/gms/building/integrating/gms-download?hl=en
Mainline:
https://docs.partner.android.com/gms/building/mainline?hl=en
Google CDD check:
https://source.android.com/compatibility/10/android-10-cdd
GMS Help:
https://docs.partner.android.com/gms?visit_id=637326386359118551-1663118478&rd=1#topic=6167664
Enterprise:
https://support.google.com/androidpartners_gms/answer/7653174?hl=en&ref_topic=7651436#
https://docs.partner.android.com/aer/oem/test
EAP:
https://docs.partner.android.com/gms/resources/eap/upcoming?hl=en
GMS Requirements
https://docs.partner.android.com/gms/resources/reqs?hl=en
Policies:
https://docs.partner.android.com/gms/policies/overview/gms-requirements?hl=en