diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 315f356..a8173dc 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -207,7 +207,8 @@ TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)/releasetools # SePolicy include device/qcom/sepolicy_vndr-legacy-um/SEPolicy.mk BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor -SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public +PRODUCT_PRIVATE_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/private +PRODUCT_PUBLIC_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/public # Vibrator $(call soong_config_set,samsungVibratorVars,duration_amplitude,true) diff --git a/sepolicy/private/system_suspend.te b/sepolicy/private/system_suspend.te new file mode 100644 index 0000000..9016f99 --- /dev/null +++ b/sepolicy/private/system_suspend.te @@ -0,0 +1,10 @@ +init_daemon_domain(system_suspend) + +# To serve ISuspendControlService.aidl. +binder_use(system_suspend) +add_service(system_suspend, system_suspend_control_service) + +allow system_suspend sysfs_wakeup:dir { open read }; +allow system_suspend sysfs_wakeup:file { getattr open read }; +allow system_suspend sysfs_battery:dir { open read }; +allow system_suspend sysfs_battery:file { getattr open read }; \ No newline at end of file diff --git a/sepolicy/public/file.te b/sepolicy/public/file.te new file mode 100644 index 0000000..8d5f5d9 --- /dev/null +++ b/sepolicy/public/file.te @@ -0,0 +1 @@ +type sysfs_battery, sysfs_type, r_fs_type, fs_type; \ No newline at end of file diff --git a/sepolicy/vendor/file.te b/sepolicy/vendor/file.te index 5e97588..20425e6 100644 --- a/sepolicy/vendor/file.te +++ b/sepolicy/vendor/file.te @@ -1,5 +1,4 @@ # SYSFS -type sysfs_battery, sysfs_type, r_fs_type, fs_type; type sysfs_camera, sysfs_type, r_fs_type, fs_type; type sysfs_fingerprint, sysfs_type, r_fs_type, fs_type; type sysfs_iio, sysfs_type, r_fs_type, fs_type; diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts index 2e92090..1cc6fa4 100644 --- a/sepolicy/vendor/genfs_contexts +++ b/sepolicy/vendor/genfs_contexts @@ -28,6 +28,30 @@ genfscon sysfs /devices/platform/soc/890000.i2c/i2c-22/22-0049/ genfscon sysfs /devices/platform/soc/890000.i2c/i2c-22/22-0057/ u:object_r:sysfs_battery:s0 genfscon sysfs /devices/platform/soc/88c000.qcom,qup_uart/wakeup/ u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/virtual/misc/msm_mp3/wakeup28 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,pm6150_rtc/rtc/rtc0/wakeup7 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/soc:qcom,msm-audio-apr/soc:qcom,msm-audio-apr:qcom,q6core-audio/soc:qcom,msm-audio-apr:qcom,q6core-audio:bolero-cdc/tx-macro/tx_swr_ctrl/wakeup/ u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/soc:qcom,msm-audio-apr/soc:qcom,msm-audio-apr:qcom,q6core-audio/soc:qcom,msm-audio-apr:qcom,q6core-audio:bolero-cdc/rx-macro/rx_swr_ctrl/wakeup/ u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/18800000.qcom,icnss/wakeup/ u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/fastrpc/adsprpc-smd-secure/wakeup36 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_g711alaw/wakeup26 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_ape/wakeup24 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_wmapro/wakeup32 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_amrwb/wakeup22 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_qcelp/wakeup30 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_alac/wakeup20 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/diag/diag/wakeup5 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/a84000.i2c/i2c-23/23-0049/wakeup/ u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_multi_aac/wakeup29 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_aac/wakeup19 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/88e0000.qcom,msm-eud/wakeup/ u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/soc:gpio_keys/wakeup/ u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_g711mlaw/wakeup27 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/fastrpc/adsprpc-smd/wakeup35 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_evrc/wakeup25 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_amrwbplus/wakeup23 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,pm6150_rtc/wakeup/ u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_wma/wakeup31 u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/virtual/misc/msm_amrnb/wakeup21 u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/virtual/sensors/ u:object_r:sysfs_sensors:s0 genfscon sysfs /devices/virtual/fingerprint/fingerprint u:object_r:sysfs_fingerprint:s0 genfscon sysfs /devices/virtual/sec/hall_ic/ u:object_r:sysfs_sensors:s0