diff options
author | Tai Kuo <taikuo@google.com> | 2021-04-12 22:03:25 +0800 |
---|---|---|
committer | Tai Kuo <taikuo@google.com> | 2021-04-19 15:20:59 +0800 |
commit | e306107be1e9459ba79741c6fcd6ccce35ccc59e (patch) | |
tree | 084ebfe99c43560b1613d8b0af642b926e295ee1 /vibrator | |
parent | 6f436a925a4f2fdbe480bd764a927bb7efd20503 (diff) | |
download | pixel-sepolicy-e306107be1e9459ba79741c6fcd6ccce35ccc59e.tar.gz |
vibrator: cs40l26: setup sepolicy
Bug: 184610991
Test: Service and HAL can init properly from rc
Signed-off-by: Tai Kuo <taikuo@google.com>
Change-Id: I9d72f564688f56f7415d7398b032df375d86e37c
Diffstat (limited to 'vibrator')
-rw-r--r-- | vibrator/cs40l26/file_contexts | 2 | ||||
-rw-r--r-- | vibrator/cs40l26/hal_vibrator_default.te | 11 | ||||
-rw-r--r-- | vibrator/cs40l26/property_contexts | 1 | ||||
-rw-r--r-- | vibrator/cs40l26/vendor_init.te | 1 |
4 files changed, 15 insertions, 0 deletions
diff --git a/vibrator/cs40l26/file_contexts b/vibrator/cs40l26/file_contexts new file mode 100644 index 0000000..13513c9 --- /dev/null +++ b/vibrator/cs40l26/file_contexts @@ -0,0 +1,2 @@ +/vendor/bin/hw/android\.hardware\.vibrator-service\.cs40l26 u:object_r:hal_vibrator_default_exec:s0 +/vendor/bin/hw/android\.hardware\.vibrator-service\.cs40l26-dual u:object_r:hal_vibrator_default_exec:s0 diff --git a/vibrator/cs40l26/hal_vibrator_default.te b/vibrator/cs40l26/hal_vibrator_default.te new file mode 100644 index 0000000..963a1c9 --- /dev/null +++ b/vibrator/cs40l26/hal_vibrator_default.te @@ -0,0 +1,11 @@ +allow hal_vibrator_default input_device:dir search; +allow hal_vibrator_default input_device:chr_file rw_file_perms; + +allow hal_vibrator_default mnt_vendor_file:dir search; +allow hal_vibrator_default persist_file:dir search; +r_dir_file(hal_vibrator_default, persist_haptics_file) + +get_prop(hal_vibrator_default, vendor_vibrator_prop); + +# Allow vibrator HAL's default implementation to use vendor-binder service +vndbinder_use(hal_vibrator_default); diff --git a/vibrator/cs40l26/property_contexts b/vibrator/cs40l26/property_contexts new file mode 100644 index 0000000..64a2600 --- /dev/null +++ b/vibrator/cs40l26/property_contexts @@ -0,0 +1 @@ +ro.vendor.vibrator.hal. u:object_r:vendor_vibrator_prop:s0 diff --git a/vibrator/cs40l26/vendor_init.te b/vibrator/cs40l26/vendor_init.te new file mode 100644 index 0000000..417a40c --- /dev/null +++ b/vibrator/cs40l26/vendor_init.te @@ -0,0 +1 @@ +set_prop(vendor_init, vendor_vibrator_prop) |