sm7125-common: Address system_suspend denials

Change-Id: If5a2b3ad3c5a815cafb791535008d330336c0e6c
urubino-microg
Simon1511 1 year ago committed by Ruchit
parent e787c495b9
commit a43fa2e6da
  1. 3
      BoardConfigCommon.mk
  2. 10
      sepolicy/private/system_suspend.te
  3. 1
      sepolicy/public/file.te
  4. 1
      sepolicy/vendor/file.te
  5. 24
      sepolicy/vendor/genfs_contexts

@ -211,7 +211,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)

@ -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 };

@ -0,0 +1 @@
type sysfs_battery, sysfs_type, r_fs_type, fs_type;

@ -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;

@ -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

Loading…
Cancel
Save