diff --git a/public/init.te b/public/init.te index f8a22b9cd7690fa1d4a74ac6696ad566e14167f6..0b1e86c5c24c8d2d176645586107bae0f888040c 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