From 17981f9fc0b58fdc3a2639bebf768557f9a38070 Mon Sep 17 00:00:00 2001 From: George Lee Date: Mon, 21 Mar 2022 20:36:32 -0700 Subject: [PATCH] health: Grant sysfs_thermal access to health health-service has trouble accessing /dev/thermal. This change fixes this. Bug: 226009696 Test: dev/thermal/tz-by-name/soc/mode error:Permission denied no longer exist Signed-off-by: George Lee Change-Id: I8d112cb12f3aeb1c8d5433ca69415d0413f070a2 Merged-In: I4d9491862ff1bcc88f89b1478497ac569e3d1df1 --- whitechapel_pro/genfs_contexts | 2 -- whitechapel_pro/hal_health_default.te | 4 ++++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/whitechapel_pro/genfs_contexts b/whitechapel_pro/genfs_contexts index e4c6cb1c..b1ebf4b2 100644 --- a/whitechapel_pro/genfs_contexts +++ b/whitechapel_pro/genfs_contexts @@ -213,8 +213,6 @@ genfscon sysfs /module/gs_thermal/parameters/tmu_top_reg_dump_fall_thres u:obj genfscon sysfs /module/gs_thermal/parameters/tmu_sub_reg_dump_rise_thres u:object_r:sysfs_thermal:s0 genfscon sysfs /module/gs_thermal/parameters/tmu_sub_reg_dump_fall_thres u:object_r:sysfs_thermal:s0 -genfscon sysfs /thermal_zone14/mode u:object_r:sysfs_thermal:s0 - # Camera genfscon sysfs /devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/min_freq u:object_r:sysfs_camera:s0 genfscon sysfs /devices/platform/17000060.devfreq_tnr/devfreq/17000060.devfreq_tnr/min_freq u:object_r:sysfs_camera:s0 diff --git a/whitechapel_pro/hal_health_default.te b/whitechapel_pro/hal_health_default.te index a4294ee5..0e393765 100644 --- a/whitechapel_pro/hal_health_default.te +++ b/whitechapel_pro/hal_health_default.te @@ -9,3 +9,7 @@ allow hal_health_default sysfs_scsi_devices_0000:file rw_file_perms; allow hal_health_default sysfs_wlc:dir search; allow hal_health_default sysfs_batteryinfo:file w_file_perms; +allow hal_health_default sysfs_thermal:dir search; +allow hal_health_default sysfs_thermal:file w_file_perms; +allow hal_health_default sysfs_thermal:lnk_file read; +allow hal_health_default thermal_link_device:dir search;