diff --git a/sepolicy/private/devicesettings_app.te b/sepolicy/private/devicesettings_app.te index 2f6a3d0..ee23b53 100644 --- a/sepolicy/private/devicesettings_app.te +++ b/sepolicy/private/devicesettings_app.te @@ -15,6 +15,7 @@ allow devicesettings_app { # Allow devicesettings_app read and write /data/data subdirectory allow devicesettings_app system_app_data_file:dir create_dir_perms; allow devicesettings_app system_app_data_file:{ file lnk_file } create_file_perms; +allow devicesettings_app sysfs_vibrator:file rw_file_perms; # Allow binder communication with gpuservice binder_call(devicesettings_app, gpuservice) diff --git a/sepolicy/vendor/file_contexts b/sepolicy/vendor/file_contexts index 780d94b..8d9d151 100644 --- a/sepolicy/vendor/file_contexts +++ b/sepolicy/vendor/file_contexts @@ -150,6 +150,9 @@ /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:flash_[0-3](/.*) u:object_r:sysfs_leds:s0 /sys/devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-02/c440000.qcom,spmi:qcom,pm8350c@2:qcom,flash_led@ee00/leds/led:switch_[0-3](/.*) u:object_r:sysfs_leds:s0 +# Haptic +/sys/class/leds/vibrator/brightness u:object_r:sysfs_vibrator:s0 + # Mlipay /vendor/bin/mlipayd@1.1 u:object_r:hal_mlipay_default_exec:s0 diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts index 703189a..ab3ef4d 100644 --- a/sepolicy/vendor/genfs_contexts +++ b/sepolicy/vendor/genfs_contexts @@ -32,6 +32,9 @@ genfscon sysfs /devices/platform/soc/soc:silead_fp # Graphics genfscon sysfs /devices/platform/soc/soc:qcom,msm-ext-disp/extcon/extcon[0-4]+/name u:object_r:vendor_sysfs_graphics:s0 +# Haptic +genfscon sysfs /sys/devices/platform/soc/soc:vibrator/leds/vibrator/brightness u:object_r:sysfs_vibrator:s0 + # kmsg genfscon proc /last_kmsg u:object_r:proc_last_kmsg:s0 diff --git a/sepolicy/vendor/system_app.te b/sepolicy/vendor/system_app.te index b7f1392..91b57fc 100644 --- a/sepolicy/vendor/system_app.te +++ b/sepolicy/vendor/system_app.te @@ -25,3 +25,5 @@ allow system_app vendor_sysfs_graphics:dir { search setattr getattr write open r allow system_app vendor_sysfs_graphics:file write; allow system_app privapp_data_file:dir { search }; allow system_app system_server:file { write read }; +allow system_app sysfs_leds:dir search; +allow system_app sysfs_leds:file { getattr open write };