问题描述
com.android.server.cts.ErrorsTest#testANR fail:
java.lang.AssertionError
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at com.android.server.cts.errors.ErrorsTests.testANR(ErrorsTests.java:99)
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at com.android.server.cts.errors.ErrorsTests.testANR(ErrorsTests.java:99)
解决方案
需要先做两个实验.
1.请用以下adb命令打开3rd party APP's ANR dump再跑一下CTS#testANR
adb root
adb shell setprop persist.vendor.anr.dumpthr 1
adb shell aee -b 0
adb reboot
2.运行下列adb命令过后再run一下相关CTS。
以下命令是跳过MTK 的ANR dump机制直接走google原生ANR dump flow,如果测试可以pass建议修改code走原生dump flow
adb root
adb shell setprop persist.vendor.anr.enhancement 0
adb shell stop
adb shell start
如果以上实验可以pass,按照以下修改:
请在下面路径的ProcessRecord.java里面将第1465~1468行的if语句注释掉,让ANR dump走google原生的flow.
/frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java
1 2 3 4 |
<span id="scope_id_3b8a43cd_fold" class="scope-body">1465 <span class="fold-space"> </span> // <strong>if</strong> (mService.mAnrManager.startAnrDump(mService, <strong>this</strong>, activityShortComponentName, aInfo, 1466 <span class="fold-space"> </span> // parentShortComponentName, parentPr, aboveSystem, annotation, getShowBackground(), 1467 <span class="fold-space"> </span> // anrTime)) 1468 <span class="fold-space"> </span> // <strong>return</strong>; </span> |
你好,请问这个博客的RSS是不是不再推送了?
https://ressrc.com/feed/
https://ressrc.com/comments/feed/