From c86eb96f457c3313ffeceae6863a81e0477eb1e4 Mon Sep 17 00:00:00 2001 From: Prashant Malani Date: Tue, 18 Oct 2016 10:46:33 -0700 Subject: [PATCH] Add sysfs rule for vibrator in system_server Helps fix vibrator HAL open issue avc: denied { write } for pid=907 comm="system_server" name="enable" dev="sysfs" ino=20423 scontext=u:r:system_server:s0 tcontext=u:object_r:sysfs_vibrator:s0 tclass=file permissive=0 Bug: 32209928 Bug: 32225232 Test: m, booted, tested keypad to make sure vibrator works Change-Id: I4977c42b7fac0c9503be04b6520487f2d6cbc903 --- public/system_server.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/system_server.te b/public/system_server.te index 54b3fa8c4..9805a1ad8 100644 --- a/public/system_server.te +++ b/public/system_server.te @@ -197,6 +197,9 @@ allow system_server sysfs_mac_address:file r_file_perms; allow system_server sysfs_thermal:dir search; allow system_server sysfs_thermal:file r_file_perms; +# TODO: Remove when HALs are forced into separate processes +allow system_server sysfs_vibrator:file write; + # TODO: added to match above sysfs rule. Remove me? allow system_server sysfs_usb:file w_file_perms;