1比吭、GtsGmscoreHostTestCases com.google.android.gts.devicepolicy.ManagedProfileTest#testPendingSystemUpdate fial
分析:首先昆婿,這個(gè)失敗項(xiàng)是我們自己添加功能導(dǎo)致的,原始版本是好的。
失敗的log:
TestRunner: failed: testNotifyPendingSystemUpdate(com.google.android.gts.managedprofile.NotifyPendingSystemUpdateTest)
TestRunner: ----- begin exception -----
TestRunner: junit.framework.AssertionFailedError: Profile owner didn't indicate receipt of update notification
TestRunner: at junit.framework.Assert.fail(Assert.java:50)
TestRunner: at junit.framework.Assert.assertTrue(Assert.java:20)
TestRunner: at com.google.android.gts.managedprofile.NotifyPendingSystemUpdateTest.testNotifyPendingSystemUpdate(NotifyPendingSystemUpdateTest.java:115)
TestRunner: at java.lang.reflect.Method.invoke(Native Method)
比較關(guān)鍵的log是 Profile owner didn't indicate receipt of update notification
繼續(xù)分析log闲礼,發(fā)現(xiàn)下面的log:
Logger: AutoStartupDataMgr:isUnderControll third party not in whitelist: com.google.android.gts.managedprofile
Logger: AutoStartupDataMgr:retrieveStartupSettings type 0 of com.google.android.gts.managedprofile is 0
Logger: AppAutoStartupPolicy:sendStartupRecordMsg, pkg=com.google.android.gts.managedprofile,caller=r,resultfalse,pid=-1,uid=-1
Logger: AppAutoStartupPolicy:prevent start receiver of package com.google.android.gts.managedprofile for action android.app.action.NOTIFY_PENDING_SYSTEM_UPDATE
可以看到 prevent start receiver of package com.google.android.gts.managedprofile闯冷,是因?yàn)橄拗屏藃eceiver的啟動(dòng),導(dǎo)致的失敵垢选楔绞;將限制去掉之后就可以通過測(cè)試。
2唇兑、GtsPackageManagerHostTestCases com.google.android.pm.gts.PackageManagerHostTest#testSettingsReadable fail
解決方法:
修改/frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java
if (DEBUG_BROADCAST_LIGHT) Slog.v(TAG_BROADCAST,
(sticky ? "Broadcast sticky: ": "Broadcast: ") + intent
+ " ordered=" + ordered + " userid=" + userId);
//*/add code
if (intent.getAction() != null &&
intent.getAction().equals("android.app.action.DEVICE_ADMIN_DISABLED") ) {
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
}
//*/
3酒朵、GtsBackupHostTestCases com.google.android.gts.backup.SettingsProviderBackupHostTest#testSoftApE2EBR fail
分析:
- 請(qǐng)確認(rèn)在設(shè)置中打開backup后進(jìn)行測(cè)試。
- 此為google o版本原生行為扎附,對(duì)比機(jī)nexus 6p也是如此蔫耽。
4、GtsGmscoreHostTestCases
com.google.android.gts.security.AttestationRootHostTest#testEcAttestationChain
com.google.android.gts.security.AttestationRootHostTest#testRsaAttestationChain
- 分析: google key沒有正確寫入
5留夜、GtsSearchHostTestCases com.google.android.search.gts.GoogleSearchWidgetTest#testWidgetPresence fail
- 分析:桌面需包含google search widget
6匙铡、GtsPackageManagerHostTestCases com.google.android.pm.gts.PackageManagerHostTest#testStartForegroundService fail
- 分析:可申請(qǐng)豁免, bug id:70933248