CTS 问题 第一篇

时间:2023-01-02 17:02:22

以下是遇到已经解决的问题:
(只会测,改的方式也是提CQ,欢迎懂得人提供一些学习地址之类的,因为测试的上万项很多都不知道是干什么,很头疼)


首先提一下可以wavie项

  • android.keystore.cts.KeyChainTest
    – testIsBoundKeyAlgorithm_RequiredAlgorithmsSupported
    wavie项,这个并不是一直确定,看平台,会随时更新改变

解决方法

1、

android.hardware.cts.SingleSensorTests
– testAccelerometer_10hz
– testAccelerometer_5hz

android.net.cts.legacy.api22.ConnectivityManagerLegacyTest
– testStartUsingNetworkFeature_enableHipri

很多方法带有_数字的,基本是网络问题,要开网重测;

2、

android.os.cts.BuildTest
– testBuildConstants com.android.cts.usb.TestUsbTest
– testUsbSerial

以上需要sn号码,在断电情况下,写入sn号码
写入方法:我用的是writeimei 软件

3、

android.security.cts.ListeningPortsTest
– testNoRemotelyAccessibleListeningUdp6Ports

恢复出厂设置,修改报告的时候只修改这一项,对这一项单独测试

4、

android.jobscheduler.cts.ConnectivityConstraintTest
– testUnmeteredConstraintFails_withMobile

同时打开wifi 和数据网络

5、

android.app.cts.SystemFeaturesTest
– testLocationFeatures

开启Location access中所有开关(gps和wifi) 单侧一下如果还有问题需要改代码:、
路径可能不同项目有差异,但名字应该很相近,ndroid.hardware.location.gps.xml
我的路径是:frameworks\base\data\etc\android.hardware.location.gps.xml

 <permissions>
                         <feature name="android.hardware.location" />  ----打开
                         <feature name="android.hardware.location.network" />   ----打开
                         <feature name="android.hardware.location.gps" />   ---无GPS则关此项
                </permissions>

6、

com.android.cts.appsecurity.ExternalStorageHostTest –
testExternalStorageNone fail java.lang.AssertionError: on-device tests
failed:
com.android.cts.externalstorageapp.CommonExternalStorageTest#testAllPackageDirsWritable:
– testExternalStorageRead fail java.lang.AssertionError: on-device tests failed:
com.android.cts.externalstorageapp.CommonExternalStorageTest#testAllPackageDirsWritable:
– testExternalStorageWrite fail java.lang.AssertionError: on-device tests failed:
com.android.cts.externalstorageapp.CommonExternalStorageTest#testAllPackageDirsWritable:
– testMultiUserStorageIsolated fail java.lang.AssertionError: on-device tests failed:
com.android.cts.multiuserstorageapp.MultiUserStorageTest#testWriteIsolatedStorage:

修改方式:
idh.code/device/sprd/scx20/common/emmc/emmc_device.mk
注释掉那几行代码
CTS 问题 第一篇

7、

com.android.cts.appsecurity.AppSecurityTests
– testAppFailAccessPrivateData fail java.lang.AssertionError: on-device tests failed:
com.android.cts.appaccessdata.AccessPrivateDataTest#testAccessPrivateData:
– testPermissionDiffCert fail java.lang.AssertionError: on-device tests failed:
com.android.cts.usespermissiondiffcertapp.ModifyInstallerPackageTest#testSetInstallPackage:

+++ b/idh.code/kernel/net/netfilter/xt_qtaguid.c
@@ -2528,7 +2528,7 @@ static int pp_stats_line(struct seq_file *m, struct tag_stat *ts_entry,
uid_t stat_uid = get_uid_from_tag(tag);
struct proc_print_info *ppi = m->private;
/* Detailed tags are not available to everybody */
- if (get_atag_from_tag(tag) && !can_read_other_uid_stats(stat_uid)) {
+ if (!can_read_other_uid_stats(stat_uid)) {
CT_DEBUG(“qtaguid: stats line: ”
“%s 0x%llx %u: insufficient priv ”
“from pid=%u tgid=%u uid=%u stats.gid=%u\n”,

8、

android.provider.cts.ContactsContract_ContactCountsTest
– testContactCounts_correctCountsReturned fail junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:48)

+++ b/idh.code/packages/providers/ContactsProvider/src/com/android/providers/contacts/ContactsDatabaseHelper.java
@@ -6151,7 +6151,8 @@ public class ContactsDatabaseHelper extends SQLiteOpenHelper {
         }
         Log.e("zzz_ContactsDatabaseHelper", "isECC = "+isECC+" old_phonebook_label = "+old_phonebook_label
                 +" old_phonebook_label_alt = "+old_phonebook_label_alt);
-
+               isSticky = false;
+               isECC = false;