vibrator: fixup sepolicy
External HALs need some extra sepolicy stuff to work, notably the domain
of the executable has to be set manually. I wish there was documentation
explaining this...
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 2ef9d0b..99b05a8 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -37,6 +37,7 @@
/vendor/bin/hw/android\.hardware\.graphics\.allocator@4\.0-service\.minigbm_msm u:object_r:hal_graphics_allocator_default_exec:s0
/vendor/bin/hw/android\.hardware\.vibrator@1\.1-service\.sdm845 u:object_r:hal_vibrator_default_exec:s0
/vendor/bin/hw/android\.hardware\.light@2\.0-service u:object_r:hal_light_default_exec:s0
+/vendor/bin/hw/android.hardware.vibrator@1.1-service.ff u:object_r:hal_vibrator_default_exec:s0
/vendor/bin/pd-mapper u:object_r:pd_mapper_exec:s0
/vendor/bin/qrtr-cfg u:object_r:qrtr_exec:s0
/vendor/bin/qrtr-ns u:object_r:qrtr_exec:s0
@@ -54,3 +55,4 @@
/vendor/lib(64)?/libglapi\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libminigbm_gralloc_msm\.so u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/libqrtr\.so u:object_r:same_process_hal_file:s0
+/vendor/lib(64)?/hw/android\.hardware\.health@2\.0-impl-2\.1-sdm845\.so u:object_r:same_process_hal_file:s0
diff --git a/sepolicy/hal_vibrator.te b/sepolicy/hal_vibrator.te
index 9a755bf..cca0a1d 100644
--- a/sepolicy/hal_vibrator.te
+++ b/sepolicy/hal_vibrator.te
@@ -1,6 +1,5 @@
# Vibrator HAL scans input devices to find the haptics device
# it then calls ioctls on it.
-# type hal_vibrator_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_vibrator_default);
allow hal_vibrator_default input_device:chr_file { ioctl open read write };
@@ -10,4 +9,4 @@
allowxperm hal_vibrator_default input_device:chr_file ioctl 0x4580;
# EVIOCRMFF
allowxperm hal_vibrator_default input_device:chr_file ioctl 0x4581;
-allow hal_vibrator_default input_device:dir { open read search };
+allow hal_vibrator_default input_device:dir { open read search };
\ No newline at end of file