From 794542baa6a5e58a83b444c1f7e96e9c04b542e5 Mon Sep 17 00:00:00 2001 From: Chenyang Zhong Date: Wed, 1 Mar 2023 10:21:03 -0500 Subject: [PATCH] sm8350-common: sepolicy: Set sensor HAL as a client of audio HAL Elliptic ultrasonic proximity sensor's libnotifyaudiohal looks for the audio HAL during elliptic's activate(). avc: denied { find } for interface=android.hardware.audio::IDevicesFactory sid=u:r:hal_sensors_default:s0 pid=970 scontext=u:r:hal_sensors_default:s0 tcontext=u:object_r:hal_audio_hwservice:s0 tclass=hwservice_manager permissive=0 Change-Id: Ibcd6693acb49c810e8ce1f0ea86cf2238ad10a70 Signed-off-by: Chenyang Zhong --- sepolicy/vendor/hal_sensors_default.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sepolicy/vendor/hal_sensors_default.te b/sepolicy/vendor/hal_sensors_default.te index a5418fc..ef41120 100644 --- a/sepolicy/vendor/hal_sensors_default.te +++ b/sepolicy/vendor/hal_sensors_default.te @@ -7,3 +7,6 @@ allow hal_sensors_default hal_audio_default:unix_stream_socket connectto; allow hal_sensors_default iio_device:chr_file r_file_perms; allow hal_sensors_default vendor_sysfs_iio:dir r_dir_perms; allow hal_sensors_default vendor_sysfs_iio:file rw_file_perms; + +hal_client_domain(hal_sensors_default, hal_audio) +allow hal_sensors_default hal_audio_hwservice:hwservice_manager find;