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 |

相关推荐
洞见不一样的自己2 小时前
android 常用方法
android
暗碳2 小时前
华为麦芒5(安卓6)termux记录 使用ddns-go,alist
android·linux
seven27293 小时前
Android MQTT关于断开连接disconnect报错原因
android·mqtt·disconnect报错
Maplee6 小时前
Compose 转场动画之 Transition
android·前端
weixin_482565537 小时前
Android IC读写器安卓小程序 3
android·小程序
hvinsion8 小时前
Python PDF批量加密工具
android·python·pdf
m0_748230449 小时前
【MySQL】数据库开发技术:内外连接与表的索引穿透深度解析
android·mysql·数据库开发
marui19829 小时前
hadoop sql 执行log
android·ide·android studio
liangmou212110 小时前
解释小部分分WPI函数(由贪吃蛇游戏拓展)
android·游戏·c#
你听得到1110 小时前
《Flutter性能优化全攻略:从首屏渲染到性能监测,附案例代码详解》
android·flutter