Add sysfs thermal permissions for dumpstate

Dumpstate currently cannot print temperature readings because it doesn't
have permissions to read thermal sensor values via sysfs. This commit
adds read permissions for sysfs_thermal.

Test: adb bugreport
Bug: 63602647
Change-Id: I21dd6f7bcaabaff722c8847b0958c725d661f489
This commit is contained in:
Maggie White
2017-07-31 21:00:11 -07:00
parent ab0968ecf6
commit 7b6ff9bc56
3 changed files with 5 additions and 4 deletions

View File

@@ -229,6 +229,9 @@
/vendor/lib(64)?/libadsprpc\.so u:object_r:same_process_hal_file:s0
/vendor/lib/dsp/fastrpc_shell_0 u:object_r:hexagon_halide_file:s0
# thermal sysfs files
/sys/class/thermal(/.*)? u:object_r:sysfs_thermal:s0
# data files
/data/vendor/netmgr(/.*)? u:object_r:netmgr_data_file:s0
/data/vendor/location(/.*)? u:object_r:location_data_file:s0

View File

@@ -1,3 +1,4 @@
# TODO: genfs doesn't apply correctly to linked files (b/64270911)
genfscon proc /debug/fwdump u:object_r:proc_wifi_dbg:s0
genfscon proc /debugdriver/driverdump u:object_r:proc_wifi_dbg:s0
genfscon proc /ath_pktlog/cld u:object_r:proc_wifi_dbg:s0
@@ -15,7 +16,6 @@ genfscon sysfs /devices/soc/1da4000.ufshc/host0/target0:0:0/0:0:0:0 u:object_r:s
genfscon sysfs /class/rfkill/rfkill0/state u:object_r:sysfs_bluetooth_writable:s0
genfscon sysfs /class/thermal u:object_r:sysfs_thermal:s0
genfscon sysfs /class/uio u:object_r:sysfs_uio:s0
genfscon sysfs /devices/soc/1da4000.ufshc/clkscale_enable u:object_r:sysfs_clkscale:s0
genfscon sysfs /devices/soc/soc:bt_wcn3990 u:object_r:sysfs_bluetooth_writable:s0

View File

@@ -33,9 +33,7 @@ r_dir_file(hal_dumpstate_impl, sysfs_uio)
r_dir_file(hal_dumpstate_impl, sysfs_rmtfs)
r_dir_file(hal_dumpstate_impl, sysfs_msm_subsys)
r_dir_file(hal_dumpstate_impl, sysfs_soc)
allow hal_dumpstate_impl sysfs_thermal:dir search;
allow hal_dumpstate_impl sysfs_thermal:file r_file_perms;
r_dir_file(hal_dumpstate_impl, sysfs_thermal)
allow hal_dumpstate_impl debugfs_ion:dir r_dir_perms;
allow hal_dumpstate_impl debugfs_ion:file r_file_perms;