diff --git a/sepolicy/file.te b/sepolicy/file.te index 47f3c0f..2c3ff9e 100644 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -1,5 +1,7 @@ type sysfs_graphics, sysfs_type, fs_type; type sysfs_camera, sysfs_type, fs_type; +type sysfs_soc, sysfs_type, fs_type; + type qmuxd_socket, file_type; type netmgrd_socket, file_type; type thermal_socket, file_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 3fb9b5b..e840e4b 100644 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -47,6 +47,7 @@ /sys/module/msm_thermal(/.*)? u:object_r:sysfs_thermal:s0 /sys/devices/virtual/graphics/fb([0-2])+/idle_time u:object_r:sysfs_graphics:s0 /sys/devices/soc/8c0000\.qcom,msm-cam(/.*)? u:object_r:sysfs_camera:s0 +/sys/devices/soc0(/.*)? u:object_r:sysfs_soc:s0 # files in /system /system/bin/init\.power\.sh u:object_r:init_power_exec:s0 diff --git a/sepolicy/init_power.te b/sepolicy/init_power.te index 6ba6bfd..904015d 100644 --- a/sepolicy/init_power.te +++ b/sepolicy/init_power.te @@ -3,6 +3,16 @@ type init_power_exec, exec_type, file_type; init_daemon_domain(init_power) +allow init_power shell_exec:file rx_file_perms; +allow init_power toolbox_exec:file rx_file_perms; + +allow init_power sysfs_thermal:dir search; +allow init_power sysfs_thermal:file w_file_perms; +allow init_power sysfs_devices_system_cpu:file w_file_perms; +allow init_power sysfs_soc:file r_file_perms; +allow init_power sysfs_soc:dir search; + + userdebug_or_eng(` permissive init_power; ')