diff --git a/private/android_hardware_vibrator_1_0_service.te b/private/android_hardware_vibrator_1_0_service.te new file mode 100644 index 0000000000000000000000000000000000000000..1c99d233a714966148835f88d85f23dfc0f69f9a --- /dev/null +++ b/private/android_hardware_vibrator_1_0_service.te @@ -0,0 +1,2 @@ +# may be started by init +init_daemon_domain(android_hardware_vibrator_1_0_service) diff --git a/private/file_contexts b/private/file_contexts index 934de2f72505bf00b2febb519a0653a2e18e310e..a4a8770c403b679f31390faaa94b0403ab096188 100644 --- a/private/file_contexts +++ b/private/file_contexts @@ -222,6 +222,7 @@ /system/fake-lib(64)?/libart.* u:object_r:libart_file:s0 /system/lib(64)?/libart.* u:object_r:libart_file:s0 /system/bin/hw/android.hardware.nfc@1.0-service u:object_r:android_hardware_nfc_1_0_service_exec:s0 +/system/bin/hw/android.hardware.vibrator@1.0-service u:object_r:android_hardware_vibrator_1_0_service_exec:s0 ############################# # Vendor files @@ -384,6 +385,7 @@ /sys/kernel/uevent_helper -- u:object_r:usermodehelper:s0 /sys/module/lowmemorykiller(/.*)? -- u:object_r:sysfs_lowmemorykiller:s0 /sys/module/wlan/parameters/fwpath u:object_r:sysfs_wlan_fwpath:s0 +/sys/devices/virtual/timed_output/vibrator/enable u:object_r:sysfs_vibrator:s0 ############################# # debugfs files diff --git a/public/android_hardware_vibrator_1_0_service.te b/public/android_hardware_vibrator_1_0_service.te new file mode 100644 index 0000000000000000000000000000000000000000..17336a51c731c2a9c9210cbf359defa2ac4ec00e --- /dev/null +++ b/public/android_hardware_vibrator_1_0_service.te @@ -0,0 +1,9 @@ +# vibrator subsystem +type android_hardware_vibrator_1_0_service, domain; +type android_hardware_vibrator_1_0_service_exec, exec_type, file_type; + +# hwbinder access +hwbinder_use(android_hardware_vibrator_1_0_service) + +# vibrator sysfs rw access +allow android_hardware_vibrator_1_0_service sysfs_vibrator:file rw_file_perms; diff --git a/public/file.te b/public/file.te index 529ab1511074c5680b79328fb1561ce98720cbad..b622c875a750105f228a1d3c561c89e2e91bb738 100644 --- a/public/file.te +++ b/public/file.te @@ -41,6 +41,7 @@ type sysfs_devices_system_cpu, fs_type, sysfs_type; type sysfs_lowmemorykiller, fs_type, sysfs_type; # /sys/module/wlan/parameters/fwpath type sysfs_wlan_fwpath, fs_type, sysfs_type; +type sysfs_vibrator, fs_type, sysfs_type; type sysfs_thermal, sysfs_type, fs_type; diff --git a/public/system_server.te b/public/system_server.te index 2d479affffac70e249c39346053a084d7a41d19f..54b3fa8c4f93f9f98b9266ac583cbf1d8e3a0905 100644 --- a/public/system_server.te +++ b/public/system_server.te @@ -155,6 +155,7 @@ binder_call(system_server, dumpstate) binder_call(system_server, netd) binder_call(system_server, wificond) binder_service(system_server) +binder_call(system_server, android_hardware_vibrator_1_0_service) # Ask debuggerd to dump backtraces for native stacks of interest. #