From 36313e7bc9f1c54be8f15edce8053cb212c5bc02 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Tue, 11 Jul 2023 23:04:24 +0000 Subject: [PATCH] Support monitoring USB sysfs attributes in USB HAL Grant access to USB sysfs attributes. Bug: 285199434 Test: no audit log in logcat after command execution Change-Id: Ida489f0f8788100795613de900fd06317087d9cc --- whitechapel_pro/hal_usb_impl.te | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/whitechapel_pro/hal_usb_impl.te b/whitechapel_pro/hal_usb_impl.te index 5d2a65e7..4c997733 100644 --- a/whitechapel_pro/hal_usb_impl.te +++ b/whitechapel_pro/hal_usb_impl.te @@ -29,3 +29,7 @@ allow hal_usb_impl sysfs_usbc_throttling_stats:file r_file_perms; allow hal_usb_impl device:dir r_dir_perms; allow hal_usb_impl usb_device:chr_file rw_file_perms; allow hal_usb_impl usb_device:dir r_dir_perms; + +# For monitoring usb sysfs attributes +allow hal_usb_impl sysfs_wakeup:dir search; +allow hal_usb_impl sysfs_wakeup:file r_file_perms;