Android S GTS 常见的 fail 项

此文章只是一篇总结,针对 MTK 平台近期的 GTS 做个简单的整理回顾,后期不断扩展

GTS

GtsJniUncompressHostTestCases
com.google.android.gts.jniuncompress.GtsJniUncompressHostTest#testJniLibsUncompressed

java.lang.RuntimeException: [GMS-13.3.5-001] For PRODUCTs that launch with or upgrade to Android11 or higher, if a preloaded APK file targets API level 30 or higher, it MUST be signed and verifiable with the APK Signature scheme v2 or higher. Any native libraries embedded in it MUST be uncompressed and page aligned before signing.
[com.xxx.xxx] V2+ verification failure [/system/priv-app/xxx/xxxx.apk]. targetSdkVer: 30
at org.junit.Assert.fail(Assert.java:89)

原因是预制的应用签名存在问题,一般是需要此应用的开发人员进行修改

==================================================================================

GtsSettingsTestCases
com.google.android.settings.gts.MADAComplianceTest#testMADACompliance

java.lang.RuntimeException: Test failed for cases: [1, 2]
Reasons include:
Message [1]: Android 5.0 and newer GMS Devices MUST expose the Android security patch level in the Settings UI. It MUST be displayed below the Android version item in the ‘About …’ section. The displayed text MUST match the value of the system property ro.build.version.security_patch, which MUST be in the format ‘YYYY-MM-DD’ according to the CDD section 3.2.2. Build Parameters.Please see the following for details: https://support.google.com/androidpartners_gms/answer/7351400?hl=en&ref_topic=9252245
Stack Trace: java.lang.RuntimeException: Android 5.0 and newer GMS Devices MUST expose the Android security patch level in the Settings UI. It MUST be displayed below the Android version item in the ‘About …’ section. The displayed text MUST match the value of the system property ro.build.version.security_patch, which MUST be in the format ‘YYYY-MM-DD’ according to the CDD section 3.2.2. Build Parameters.Please see the following for details: https://support.google.com/androidpartners_gms/answer/7351400?hl=en&ref_topic=9252245

这项是检查Settings的界面布局是否符合规范,一般不要大改原生界面的UI。现象是会有个popwindow弹出。
Google feedback
Bug id :234420715
If manually click to make the popwindow disappear, this test case PASS, it can be considered as PASS? Is it the normal operate?
Google reply=>YES, Google just check the finial IR result, the report show pass is pass.

==================================================================================

GtsPermissionTestCases
com.google.android.permission.gts.ManageDocumentsPermissionTest#manageDocuments_theOnlyOneHolder_isDocumentsUi

FAILURE: expected to be at most: 1 but was : 2 at com.google.android.permission.gts.ManageDocumentsPermissionTest.manageDocuments_theOnlyOneHolder_isDocumentsUi(ManageDocumentsPermissionTest.java:83)

MTK 的联系人权限问题
uses-permission android:name="android.permission.MANAGE_DOCUMENTS

==================================================================================

GtsNmgiarcTestCases
com.google.android.comms.RcsCompliantTests#testClient

java.lang.RuntimeException: UP compatible message client is not preloaded
at org.junit.Assert.fail(Assert.java:89)
at com.android.compatibility.common.util.BusinessLogicTestCase.failTest(BusinessLogicTestCase.java:126)
at java.lang.reflect.Method.invoke(Native Method)

删除google message 应用导致的

==================================================================================

GtsLocationTestCases
com.google.android.location.gts.gnss.GnssPseudorangeVerificationTest#testPseudoPosition

1、junit.framework.AssertionFailedError: Latitude & Longitude calculated from pseudoranges should be close to those reported from Location Manager. Offset = 130.8671417236328 meters. Threshold = 124.73928375151829 meters
2、fail junit.framework.AssertionFailedError: Calculated Location Count should be greater than 0.

需要在GPS 信号好的地方或者装有GPS 放大器的地方进行测试。

==================================================================================

GtsUnofficialApisUsageTestCases
com.android.gts.api.UnofficialApisUsageTest#testNonApiReferencesInProduct

junit.framework.AssertionFailedError: There are 151 violation(s)
com.google.android.apps.wallpaper /
Landroid/app/Activity;->registerRemoteAnimations(Landroid/view/RemoteAnimationDefinition;)V
/ BLOCKED / LINKING com.google.android.apps.wallpaper /
Landroid/app/Activity;->unregisterRemoteAnimations()V / BLOCKED /LINKING

Google wallpaper需要预置到system_ext下面

==================================================================================

GtsNmgiarcTestCases
com.google.android.comms.RcsCompliantTests#testClient

Devices shipping ASI must have at least 4gb of RAM
expected to be at least: 3000000000
but was : 2963214336
at com.google.android.features.gts.GoogleFeaturesTestBase.checkAiaiFeature(GoogleFeaturesTestBase.java:580)

Androi 13是强制要求,一般手机都可以pass的,对于低于 4GB RAM 的设备,还是要去掉 ASI 功能的。
删除ASI,Google 在Android T 上有要求,android s 不做要求,删除 gms.mk 中下面内容即可,如果有 EEA  版本,那么 eea_common.mk 也需要删除相关的
1、etc/sysconfig/google.xml  或者 etc/sysconfig/asi_features.xml 中删除  <feature name="com.google.android.feature.ASI" />
2、gms.mk 和 eea_common.mk  删除 AndroidSystemIntelligence_Features
3、gms.mk 和 eea_common.mk 中删除 PRODUCT_PACKAGES += GmsConfigOverlayASI
Note:如果不删除PRODUCT_PACKAGES += GmsConfigOverlayASI,则会报 
GtsIntelligenceTestCases com.google.android.gts.intelligence.IntelligenceRolesTest#testIntelligenceRolesAllowed	
fail log:
java.lang.RuntimeException: expected to be empty
but was: [Package [com.google.android.as] is configured for role [android.app.role.SYSTEM_NOTIFICATION_INTELLIGENCE] but it is not installed., Package [com.google.android.as] is configured for role [android.app.role.SYSTEM_UI_INTELLIGENCE] but it is not installed., Package [com.google.android.as] is configured for role [android.app.role.SYSTEM_TEXT_INTELLIGENCE] but it is not installed., Package [com.google.android.as] is configured for role [android.app.role.SYSTEM_AUDIO_INTELLIGENCE] but it is not installed., Package [com.google.android.as] is configured for role [android.app.role.SYSTEM_VISUAL_INTELLIGENCE] but it is not installed.]

==================================================================================

GtsBackupHostTestCases
com.google.android.gts.backup.WallpaperRestoreHostSideTest#testRestoreDifferentImageToEach

com.google.android.gts.backup.testscontainerapp.WallpaperRestoreTest#assertSystemIsRedAndLockIsGreen:java.lang.NullPointerException: Attempt to invoke virtual method ‘java.io.FileDescriptor android.os.ParcelFileDescriptor.getFileDescriptor()’ on a null object reference

确保手机有默认的壁纸资源与锁屏资源

==================================================================================

GtsPermissionTestCases
com.google.android.permission.gts.PreloadAppsTargetSdkVersionTest#testPreloadedAppsTargetSdkVersion

java.lang.RuntimeException: All apps preloaded on DEVICEs launching with Android 12 or 12L MUST target API level 29 or higher.
All apps preloaded on DEVICEs launching with Android 13 MUST target API level 31 or higher.
com.admtek.diag must target 29 or higher, but targets 28

修改清单文件的sdk

==================================================================================

GtsPermissionTestCases
com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testDefaultGrantsWithRemoteExceptions
com.google.android.permission.gts.DefaultPermissionGrantPolicyTest#testPreGrantsWithRemoteExceptions

packageName: com.xxx.xxxxxx{
priv app: true
targetSDK: 29
uid: 1000
persistent: true
on system image: true
has platform signature: true
message: cannot be granted by default to package {
permission: android.permission.XXX
permission: android.permission.XXXX
}
}

原因权限不能默认授予,一般都是三方应用或者客户应用。

==================================================================================

GtsYouTubeTestCases
com.google.android.youtube.gts.DecodePerformanceTest#testVideoDecodePerformance[126]
com.google.android.youtube.gts.DecodePerformanceTest#testVideoDecodePerformance[127]

junit.framework.AssertionFailedError: The measured frame rate of decoding H264 480x1440 video is 22.90 fps.Test requires at least 30 fps

You can get a waiver
Bug id :201360040

==================================================================================

GtsLocationTestCases
com.google.android.location.gts.gnss.GnssPseudorangeVerificationTest#testPseudoPosition
fail junit.framework.AssertionFailedError: Calculated Location Count should be greater than 0.

Google issue·
上传报告,google自动豁免

==================================================================================
下面三个问题均是在10_R2工具上测试出来的,这三个问题只有在 Android Go 上会出现。由于在 10_R2 工具上 Google 对 Go 版本进行了一些判断,导致测试 fail,请使用最新的 preview build tool (9377101) 进行测试

1、GtsModuleMetadataTestCases
com.google.android.modulemetadata.gts.ModuleMetadataTests#testGetInstalledModules

java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:87)
at org.junit.Assert.assertTrue(Assert.java:42)
at org.junit.Assert.assertTrue(Assert.java:53)
at com.google.android.modulemetadata.gts.ModuleMetadataTests.testGetInstalledModules(ModuleMetadataTests.java:84)

2、GtsOsTestCases
com.google.android.os.gts.MainlineConfigurationTest#testMainlineModuleProviderOverlay

org.junit.ComparisonFailure: Invalid config_defaultModuleMetadataProvider: com.google.android.modulemetadata expected: com.google.mainline.go.primary expected:<com.google.[android.modulemetadata]> but was:<com.google.[mainline.go.primary]>
at org.junit.Assert.assertEquals(Assert.java:117)
at com.google.android.os.gts.MainlineConfigurationTest.testMainlineModuleProviderOverlay(MainlineConfigurationTest.java:120)

3、GtsOsTestCases
com.google.android.os.gts.MainlineConfigurationTest#testMainlineApprovedTrain

java.lang.AssertionError: Module(s) not approved for preloading found.: com.google.android.modulemetadata: 311729004, com.google.android.ext.services: 311713010, com.google.android.permissioncontroller: 311714010, Try factory reset or preload Mainline modules approved for preloading only.
at org.junit.Assert.fail(Assert.java:89)
at org.junit.Assert.assertTrue(Assert.java:42)
at com.google.android.os.gts.MainlineConfigurationTest.testMainlineApprovedTrain(MainlineConfigurationTest.java:231)

==================================================================================

  • 3
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值