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
This commit is contained in:
Roy Luo 2023-09-20 22:01:18 +00:00
parent e853c1919d
commit aa5218c8a7

View file

@ -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;