From a7f03de9ca8233bc76ba664ccda9c9c475bc7987 Mon Sep 17 00:00:00 2001 From: Pulkit077 Date: Sat, 16 Dec 2023 17:45:58 +0530 Subject: [PATCH] sweet_k6a: sepolicy: address some power supply & wakeup denials Signed-off-by: Pulkit077 --- sepolicy/vendor/genfs_contexts | 16 ++++++++++++---- sepolicy/vendor/hal_camera_default.te | 3 +++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts index 030d0b4..e3b74c1 100644 --- a/sepolicy/vendor/genfs_contexts +++ b/sepolicy/vendor/genfs_contexts @@ -2,11 +2,15 @@ genfscon sysfs /class/smartpa/re25_calib u:object_r:sysfs_re25_calib:s0 # Battery +genfscon sysfs /devices/platform/soc/884000.i2c/i2c-3/3-0055/power_supply/bms u:object_r:vendor_sysfs_battery_supply:s0 genfscon sysfs /devices/platform/soc/soc:maxim_ds28e16/power_supply/batt_verify u:object_r:vendor_sysfs_battery_supply:s0 +genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qpnp,qg/power_supply/qcom-bms/type +u:object_r:vendor_sysfs_battery_supply:s0 + # bq2597x charge pump -genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0051/power_supply/bq2597x-standalone u:object_r:vendor_sysfs_usb_supply:s0 -genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0066/power_supply/bq2597x-standalone u:object_r:vendor_sysfs_usb_supply:s0 +genfscon sysfs /devices/platform/soc/890000.i2c/i2c-4/4-0066/power_supply/bq2597x-slave u:object_r:vendor_sysfs_usb_supply:s0 +genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0066/power_supply/bq2597x-master u:object_r:vendor_sysfs_usb_supply:s0 # Display genfscon sysfs /devices/platform/soc/ae00000.qcom,mdss_mdp/idle_encoder_mask u:object_r:vendor_sysfs_graphics:s0 @@ -48,17 +52,21 @@ u:object_r:sysfs_iio_devices:s0 # sysfs (wakeup) genfscon sysfs /devices/platform/goodix_ts.0/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/platform/soc/884000.i2c/i2c-3/3-0055/power_supply/bms/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/884000.i2c/i2c-3/3-0055/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/888000.i2c/i2c-0/0-0028/wakeup 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/a8c000.i2c/i2c-2/2-0051/power_supply/bq2597x-standalone/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/890000.i2c/i2c-4/4-0066/power_supply/bq2597x-slave/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/890000.i2c/i2c-4/4-0066/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0051/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-005a/wakeup u:object_r:sysfs_wakeup:s0 -genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0066/power_supply/bq2597x-standalone/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0066/power_supply/bq2597x-master/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-0066/wakeup 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/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qcom,power-on@800/wakeup 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,qpnp-smb5/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qpnp,qg/power_supply/bms/wakeup u:object_r:sysfs_wakeup:s0 +genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-00/c440000.qcom,spmi:qcom,pm6150@0:qpnp,qg/power_supply/qcom-bms/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-04/c440000.qcom,spmi:qcom,pm6150l@4:qcom,power-on@800/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/wakeup u:object_r:sysfs_wakeup:s0 genfscon sysfs /devices/platform/soc/soc:gpio_keys/wakeup u:object_r:sysfs_wakeup:s0 diff --git a/sepolicy/vendor/hal_camera_default.te b/sepolicy/vendor/hal_camera_default.te index beed7b1..dcaf638 100644 --- a/sepolicy/vendor/hal_camera_default.te +++ b/sepolicy/vendor/hal_camera_default.te @@ -5,3 +5,6 @@ get_prop(hal_camera_default, exported_camera_prop) # Allow access to read gpu_available_frequencies r_dir_file(hal_camera_default, vendor_sysfs_kgsl) + +# Allow acces to read power_supply/bms/capacity +r_dir_file(hal_camera_default, vendor_sysfs_battery_supply)