diff options
-rw-r--r-- | Android.mk | 3 | ||||
-rw-r--r-- | common/file.te | 1 | ||||
-rw-r--r-- | common/file_contexts | 8 | ||||
-rw-r--r-- | common/ssr_setup.te | 17 |
4 files changed, 27 insertions, 2 deletions
@@ -76,7 +76,8 @@ BOARD_SEPOLICY_UNION := \ adsprpcd.te \ qlogd.te \ ipacm.te \ - dpmd.te + dpmd.te \ + ssr_setup.te # Compile sensor pilicy only for SSC targets SSC_TARGET_LIST := apq8084 diff --git a/common/file.te b/common/file.te index 68600231..6ef2c450 100644 --- a/common/file.te +++ b/common/file.te @@ -71,6 +71,7 @@ type ims_socket, file_type; #File types required by mdm-helper type sysfs_esoc, sysfs_type, fs_type; type sysfs_ssr, sysfs_type, fs_type; +type sysfs_ssr_toggle, sysfs_type, file_type; type sysfs_hsic, sysfs_type, fs_type; type sysfs_hsic_host_rdy, sysfs_type, file_type; diff --git a/common/file_contexts b/common/file_contexts index 75954814..7305ab27 100644 --- a/common/file_contexts +++ b/common/file_contexts @@ -113,6 +113,7 @@ /system/bin/ipacm u:object_r:ipacm_exec:s0 /system/bin/ipacm-diag u:object_r:ipacm-diag_exec:s0 /system/bin/dpmd u:object_r:dpmd_exec:s0 +/system/bin/ssr_setup u:object_r:ssr_setup_exec:s0 ################################### # sysfs files @@ -145,8 +146,13 @@ /sys/devices/msm_hsic_host/host_ready u:object_r:sysfs_hsic_host_rdy:s0 /sys/bus/esoc(/.*)? u:object_r:sysfs_esoc:s0 /sys/bus/msm_subsys(/.*)? u:object_r:sysfs_ssr:s0 -/sys/devices/soc0/.* u:object_r:sysfs_socinfo:s0 /sys/module/ccid_bridge(/.*)? u:object_r:sysfs_usb_uicc:s0 +/sys/bus/msm_subsys/devices/subsys0/restart_level u:object_r:sysfs_ssr_toggle:s0 +/sys/bus/msm_subsys/devices/subsys1/restart_level u:object_r:sysfs_ssr_toggle:s0 +/sys/bus/msm_subsys/devices/subsys2/restart_level u:object_r:sysfs_ssr_toggle:s0 +/sys/bus/msm_subsys/devices/subsys3/restart_level u:object_r:sysfs_ssr_toggle:s0 +/sys/bus/msm_subsys/devices/subsys4/restart_level u:object_r:sysfs_ssr_toggle:s0 +/sys/devices/soc0/.* u:object_r:sysfs_socinfo:s0 ################################### # data files diff --git a/common/ssr_setup.te b/common/ssr_setup.te new file mode 100644 index 00000000..0ec733a8 --- /dev/null +++ b/common/ssr_setup.te @@ -0,0 +1,17 @@ +#Policy for ssr_setup +#ssr_setup - ssr_setup domain +type ssr_setup, domain; +type ssr_setup_exec, exec_type, file_type; +init_daemon_domain(ssr_setup); + +#Required to discover esoc's +allow ssr_setup sysfs_esoc:dir { r_file_perms search }; +allow ssr_setup sysfs_esoc:lnk_file r_file_perms; + +#Required to enable/disable ssr +allow ssr_setup sysfs_ssr:dir { r_file_perms search }; +allow ssr_setup sysfs_ssr_toggle:file rw_file_perms; +allow ssr_setup sysfs_ssr:lnk_file rw_file_perms; + +#Keeping this here till sysfs labeling is resolved +allow ssr_setup sysfs:file w_file_perms; |