Android A13 CTS 测试问题部分总结

|---------------------------------------------------------------------------|------------|-------------------------------------------------------------------------------------------------------------------------|------------|
| arm64-v8a CtsAppOpsTestCases ||| 备注 |
| Test | Result | Details | |
| android.app.appops.cts.AppOpsLoggingTest#openCameraWithAttribution | fail | java.lang.SecurityException: android.app.appops.cts was not granted this permission: android.permission.WRITE_SETTINGS. | 修改之后复测pass |
| android.app.appops.cts.AppOpsLoggingTest#openCameraWithDefaultAttribution | fail | java.lang.SecurityException: android.app.appops.cts was not granted this permission: android.permission.WRITE_SETTINGS. | 修改之后复测pass |

修改原因,在代码里面修改settings值,导致CTS 测试fail,后面去掉了。就测过

2..

|-----------------------------------------------------------------------------------------------------|------------|---------------------------------------------------|
| arm64-v8a CtsDevicePolicyManagerTestCases |||
| Test | Result | Details |
| com.android.cts.devicepolicy.MixedDeviceOwnerTest#testDelegatedCertInstallerDeviceIdAttestation | fail | java.lang.AssertionError: on-device tests failed: |
| com.android.cts.devicepolicy.MixedDeviceOwnerTest#testKeyManagement | fail | java.lang.AssertionError: on-device tests failed: |
| com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testKeyManagement | fail | java.lang.AssertionError: on-device tests failed: |
| com.android.cts.devicepolicy.MixedProfileOwnerTest#testKeyManagement | fail | java.lang.AssertionError: on-device tests failed: |
| com.android.cts.devicepolicy.MixedProfileOwnerTest#testDelegatedCertInstallerDirectly | fail | java.lang.AssertionError: on-device tests failed: |
| com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDelegatedCertInstallerDeviceIdAttestation | fail | java.lang.AssertionError: on-device tests failed: |
| com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testDeviceIdAttestationForProfileOwner | fail | java.lang.AssertionError: on-device tests failed: |
| com.android.cts.devicepolicy.OrgOwnedProfileOwnerTest#testCameraDisabledOnParentIsEnforced | fail | java.lang.AssertionError: on-device tests failed: |

CTS 测试的机器必现是ome lock默认锁上的状态,否则写的google key 就会无效,出现上面的失败

|------------------------------------------------------|------------|---------------------------------------------------------------------------------------------------------------------------------|
| arm64-v8a CtsInputTestCases |||
| Test | Result | Details |
| android.input.cts.InputEventTest#testKeyCodeToString | fail | org.junit.ComparisonFailure: expected:<KEYCODE_[PROFILE_SWITCH]> but was:<KEYCODE_[SYSTEM_NAVIGATION_LEFT]> |

这个是修改了按键值导致,修改方法如下:主要是修改顺序要对

复制代码
--- a/QSSI.13/frameworks/base/core/java/android/view/KeyEvent.java
+++ b/QSSI.13/frameworks/base/core/java/android/view/KeyEvent.java
@@ -884,8 +884,9 @@ public class KeyEvent extends InputEvent implements Parcelable {
      * @hide
      */
     @TestApi
-    public static final int LAST_KEYCODE = KEYCODE_DEMO_APP_4;
-
+    public static final int LAST_KEYCODE = KEYCODE_F18;
+  //  public static final int LAST_KEYCODE = KEYCODE_DEMO_APP_4;
+    
     // NOTE: If you add a new keycode here you must also add it to:
     //  isSystem()
     //  isWakeKey()
diff --git a/frameworks/native/libs/input/InputEventLabels.cpp b/frameworks/native/libs/input/InputEventLabels.cpp
index bd168fbfe5d..97d6be07932 100755
--- a/frameworks/native/libs/input/InputEventLabels.cpp
+++ b/frameworks/native/libs/input/InputEventLabels.cpp
@@ -169,12 +169,6 @@ namespace android {
     DEFINE_KEYCODE(F10), \
     DEFINE_KEYCODE(F11), \
     DEFINE_KEYCODE(F12), \
-    DEFINE_KEYCODE(PTT), \
-    DEFINE_KEYCODE(F14), \
-    DEFINE_KEYCODE(F15), \
-    DEFINE_KEYCODE(F16), \
-    DEFINE_KEYCODE(F17), \
-    DEFINE_KEYCODE(F18), \
     DEFINE_KEYCODE(NUM_LOCK), \
     DEFINE_KEYCODE(NUMPAD_0), \
     DEFINE_KEYCODE(NUMPAD_1), \
@@ -320,7 +314,14 @@ namespace android {
     DEFINE_KEYCODE(REFRESH), \
     DEFINE_KEYCODE(THUMBS_UP), \
     DEFINE_KEYCODE(THUMBS_DOWN), \
-    DEFINE_KEYCODE(PROFILE_SWITCH)
+    DEFINE_KEYCODE(PROFILE_SWITCH), \
+    DEFINE_KEYCODE(PTT), \
+    DEFINE_KEYCODE(F14), \
+    DEFINE_KEYCODE(F15), \
+    DEFINE_KEYCODE(F16), \
+    DEFINE_KEYCODE(F17), \
+    DEFINE_KEYCODE(F18), \

4.插上SIM卡测试pass

|-------------------------------------------------------------------------------|------------|--------------------------------|
| arm64-v8a CtsStatsdAtomHostTestCases[instant] |||
| Test | Result | Details |
| android.cts.statsdatom.net.BytesTransferredTest#testMobileBytesTransferByFgBg | fail | expected to be greater than: 0 |

5

我们自己增加了属性导致测试失败,后面属性改成 ro.vendor开头的就行了

|-------------------------------------------------------|------------|------------------------------------|
| arm64-v8a vts_treble_sys_prop_test |||
| Test | Result | Details |
| main.VtsTrebleSysPropTest#testVendorPropertyNames | fail | Traceback (most recent call last): |
| main.VtsTrebleSysPropTest#testVendorPropertyTypes | fail | Traceback (most recent call last): |

复制代码
+++ b/system/core/init/init.cpp
@@ -545,7 +545,7 @@ static void export_oem_lock_status() {
             SetProperty("ro.lcd.type", value);
         }
         if (key == "wb.device") {
-            SetProperty("ro.wb.device", value);
+            SetProperty("ro.vendor.device", value);
         }
     });
 }
diff --git a/device/qcom/sepolicy_vndr/generic/vendor/common/hal_camera_default.te b/device/qcom/sepolicy_vndr/generic/vendor/common/hal_camera_default.te
index aebf93006ca..5ba54799a81 100755
--- a/device/qcom/sepolicy_vndr/generic/vendor/common/hal_camera_default.te
+++ b/device/qcom/sepolicy_vndr/generic/vendor/common/hal_camera_default.te
@@ -26,5 +26,5 @@
 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 vndbinder_use(hal_camera_default);
 allow hal_camera_default vendor_camera_info:file { getattr write open read};
-allow hal_camera_default wb_device_prop:file {read open getattr map};
+allow hal_camera_default vendor_device_prop:file {read open getattr map};
 
diff --git a/device/qcom/sepolicy_vndr/generic/vendor/common/property.te b/device/qcom/sepolicy_vndr/generic/vendor/common/property.te
index 7dbe36dba50..ae5a029bf0a 100644
--- a/device/qcom/sepolicy_vndr/generic/vendor/common/property.te
+++ b/device/qcom/sepolicy_vndr/generic/vendor/common/property.te
@@ -106,7 +106,7 @@ vendor_internal_prop(vendor_qdcmss_prop);
 #adsprpc props
 vendor_restricted_prop(vendor_adsprpc_prop);
 
-vendor_restricted_prop(wb_device_prop)
+vendor_restricted_prop(vendor_device_prop)
 
 # Wifi version recorder
 vendor_internal_prop(vendor_wifi_version);
diff --git a/device/qcom/sepolicy_vndr/generic/vendor/common/property_contexts b/device/qcom/sepolicy_vndr/generic/vendor/common/property_contexts
index 8ea9e7068b1..d3ccfbf09c4 100644
--- a/device/qcom/sepolicy_vndr/generic/vendor/common/property_contexts
+++ b/device/qcom/sepolicy_vndr/generic/vendor/common/property_contexts
@@ -49,7 +49,7 @@ ro.vendor.audio.           u:object_r:vendor_audio_prop:s0
 persist.vendor.audio.spkr.cal.duration  u:object_r:vendor_audio_prop:s0
 ro.vendor.alarm_boot       u:object_r:vendor_alarm_boot_prop:s0
 ro.boot.alarmboot          u:object_r:vendor_alarm_boot_prop:s0
-ro.wb.device               u:object_r:wb_device_prop:s0
+ro.vendor.device               u:object_r:vendor_device_prop:s0
 vendor.debug.camera.       u:object_r:vendor_camera_prop:s0
 persist.vendor.camera.     u:object_r:vendor_camera_prop:s0
 persist.vendor.sys.crash_rcu      u:object_r:vendor_ramdump_prop:s0
diff --git a/device/qcom/sepolicy_vndr/generic/vendor/test/snapcam.te b/device/qcom/sepolicy_vndr/generic/vendor/test/snapcam.te
index 4e838d091fc..4e95fb6d031 100755
--- a/device/qcom/sepolicy_vndr/generic/vendor/test/snapcam.te
+++ b/device/qcom/sepolicy_vndr/generic/vendor/test/snapcam.te
@@ -53,3 +53,4 @@ allow vendor_snapcam_app system_prop:property_service { set };
 
 allow vendor_snapcam_app proc_filesystems:file { open getattr read write };
 allow vendor_snapcam_app vendor_camera_info:file { getattr write open read};
+allow vendor_snapcam_app incremental_prop:file { getattr map open read};
  1. 注释了相关功能之后测试pass

|----------------------------------------------------------|------------|-------------------------------------------------------------------------------------------------------|
| arm64-v8a VtsHalSoundtriggerV2_0TargetTest |||
| Test | Result | Details |
| PerInstance/SoundTriggerHidlTest#GetProperties/0_default | fail | hardware/interfaces/soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp:165: Failure |

  1. 这个是因为我们在系统增加log kit功能导致,去掉了这个功能测试pass

|----------------------------------------------------|------------|--------------------------|
| arm64-v8a CtsSecurityBulletinHostTestCases |||
| Test | Result | Details |
| android.security.cts.Poc20_06#testPocCVE_2020_3628 | fail | java.lang.AssertionError |

相关推荐
黄林晴21 小时前
如何判断手机是否是纯血鸿蒙系统
android
火柴就是我21 小时前
flutter 之真手势冲突处理
android·flutter
法的空间21 小时前
Flutter JsonToDart 支持 JsonSchema
android·flutter·ios
循环不息优化不止21 小时前
深入解析安卓 Handle 机制
android
恋猫de小郭1 天前
Android 将强制应用使用主题图标,你怎么看?
android·前端·flutter
jctech1 天前
这才是2025年的插件化!ComboLite 2.0:为Compose开发者带来极致“爽”感
android·开源
用户2018792831671 天前
为何Handler的postDelayed不适合精准定时任务?
android
叽哥1 天前
Kotlin学习第 8 课:Kotlin 进阶特性:简化代码与提升效率
android·java·kotlin
Cui晨1 天前
Android RecyclerView展示List<View> Adapter的数据源使用View
android
氦客1 天前
Android Doze低电耗休眠模式 与 WorkManager
android·suspend·休眠模式·workmanager·doze·低功耗模式·state_doze