From 55d345c5e86701f03ea1f7306aa01719301976c9 Mon Sep 17 00:00:00 2001 From: Ken Tsou Date: Thu, 16 Feb 2023 10:34:13 +0800 Subject: [PATCH] hal_health_default: allow to access persist.vendor.shutdown.* msg='avc: denied { set } for property=persist.vendor.shutdown.voltage_avg pid=908 uid=1000 gid=1000 scontext=u:r:hal_health_default:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=property_service permissive=0' Bug: 266181615 Change-Id: Ia87610f0363bbfbe4fe446244b44818c273841f4 Signed-off-by: Ken Tsou --- whitechapel_pro/hal_health_default.te | 1 + whitechapel_pro/property.te | 1 + whitechapel_pro/property_contexts | 1 + 3 files changed, 3 insertions(+) diff --git a/whitechapel_pro/hal_health_default.te b/whitechapel_pro/hal_health_default.te index 6c3c6940..eeaab1a7 100644 --- a/whitechapel_pro/hal_health_default.te +++ b/whitechapel_pro/hal_health_default.te @@ -4,6 +4,7 @@ allow hal_health_default persist_battery_file:file create_file_perms; allow hal_health_default persist_battery_file:dir rw_dir_perms; set_prop(hal_health_default, vendor_battery_defender_prop) +set_prop(hal_health_default, vendor_shutdown_prop) # Access to /sys/devices/platform/14700000.ufs/* allow hal_health_default sysfs_scsi_devices_0000:dir r_dir_perms; diff --git a/whitechapel_pro/property.te b/whitechapel_pro/property.te index b5bf04c2..080a186e 100644 --- a/whitechapel_pro/property.te +++ b/whitechapel_pro/property.te @@ -11,6 +11,7 @@ vendor_internal_prop(vendor_nfc_prop) vendor_internal_prop(vendor_secure_element_prop) vendor_internal_prop(vendor_battery_profile_prop) vendor_internal_prop(vendor_battery_defender_prop) +vendor_internal_prop(vendor_shutdown_prop) vendor_internal_prop(vendor_imssvc_prop) vendor_internal_prop(vendor_camera_prop) vendor_internal_prop(vendor_camera_debug_prop) diff --git a/whitechapel_pro/property_contexts b/whitechapel_pro/property_contexts index 32b304b1..6707794a 100644 --- a/whitechapel_pro/property_contexts +++ b/whitechapel_pro/property_contexts @@ -57,6 +57,7 @@ persist.vendor.testing_battery_profile u:object_r:vendor_battery_profile_pro # Battery vendor.battery.defender. u:object_r:vendor_battery_defender_prop:s0 +persist.vendor.shutdown. u:object_r:vendor_shutdown_prop:s0 # NFC persist.vendor.nfc. u:object_r:vendor_nfc_prop:s0