diff --git a/public/init.te b/public/init.te index 3eec6ff3b209ca4c2667b0ffd165600fba521803..1489b701f8a5ed32b605ddc6146f20e9f3640aa2 100644 --- a/public/init.te +++ b/public/init.te @@ -320,6 +320,14 @@ allow init { sysfs_zram }:file rw_file_perms; +# Allow init to write to vibrator/trigger +allow init sysfs_vibrator:file w_file_perms; + +# Creating files on sysfs is impossible so this isn't a threat. +# We may write to a non-existent file to avoid conditional +# init behavior. +dontaudit init sysfs_vibrator:dir write; + # init chmod/chown access to /sys files. allow init { sysfs_android_usb