sapphire: rootdir: Give thermal profiles permissions

05-01 19:34:36.590 W/binder:2826_4(2826): type=1400 audit(0.0:3287): avc:  denied  { write } for  name="sconfig" dev="sysfs" ino=65252 scontext=u:r:system_app:s0 tcontext=u:object_r:sysfs_thermal:s0 tclass=file permissive=0
05-01 19:34:36.594 W/FileUtils(2826): No such file /sys/class/thermal/thermal_message/sconfig for writing
05-01 19:34:36.594 W/FileUtils(2826): java.io.FileNotFoundException: /sys/class/thermal/thermal_message/sconfig: open failed: EACCES (Permission denied)

Change-Id: Ie22a96daf93288eefa65e469487bd914c105d7cd
Signed-off-by: NikitaSavc <micraftur@gmail.com>
This commit is contained in:
chrisl7
2024-05-01 20:06:35 +03:00
committed by kibria5
parent b360ce4179
commit 113bc47509
2 changed files with 7 additions and 0 deletions

View File

@@ -56,6 +56,12 @@ on init
on early-fs
start vold
# Xiaomi Thermal Profiles permissions
chmod 0664 /sys/class/thermal/thermal_message/sconfig
chown system system /sys/class/thermal/thermal_message/sconfig
chmod 0666 /sys/class/thermal/thermal_message/temp_state
chown system system /sys/class/thermal/thermal_message/temp_state
on fs
start hwservicemanager

View File

@@ -1,6 +1,7 @@
allow system_app proc_pagetypeinfo:file { read open getattr };
allow system_app sysfs_zram:dir r_dir_perms;
allow system_app sysfs_zram:file r_file_perms;
allow system_app sysfs_thermal:file { rw_file_perms getattr };
binder_call(system_app, hal_audio_default)
binder_call(system_app, hal_health_default)