From aa5218c8a70bc12f0f9615327ce1460d655b18c1 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Wed, 20 Sep 2023 22:01:18 +0000 Subject: [PATCH] Support metric upload in USB HAL Grant access to stats service. Sample error logs: avc: denied { find } for pid=949 uid=1000 name=android.frameworks.stats.IStats/default scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:fwk_stats_service:s0 tclass=service_manager permissive=0 Bug: 297224564 Test: no audit log in logcat after command execution Change-Id: I4a80e11e63ec164dff73288e93aac851ffebb696 --- vendor/hal_usb_impl.te | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vendor/hal_usb_impl.te b/vendor/hal_usb_impl.te index e4610507..d282a559 100644 --- a/vendor/hal_usb_impl.te +++ b/vendor/hal_usb_impl.te @@ -19,3 +19,6 @@ hal_client_domain(hal_usb_impl, hal_thermal); # For monitoring usb sysfs attributes allow hal_usb_impl sysfs_wakeup:dir search; allow hal_usb_impl sysfs_wakeup:file r_file_perms; + +# For metrics upload +allow hal_usb_impl fwk_stats_service:service_manager find;