From 1f54dc72561df7145c246006a162cc5e3e677fc2 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Fri, 17 Mar 2023 00:33:30 +0000 Subject: [PATCH] Support sending vendor command to GL852G via libusbhost libusbhost need access to USB device fs. Bug: 261923350 Test: no audit log in logcat after command execution Change-Id: I4b0c8cc750eff12d2494504f9f215d5b1bab35fd --- whitechapel_pro/hal_usb_impl.te | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/whitechapel_pro/hal_usb_impl.te b/whitechapel_pro/hal_usb_impl.te index a5da3ce1..5d2a65e7 100644 --- a/whitechapel_pro/hal_usb_impl.te +++ b/whitechapel_pro/hal_usb_impl.te @@ -24,3 +24,8 @@ hal_client_domain(hal_usb_impl, hal_thermal); # For reading the usb-c throttling stats allow hal_usb_impl sysfs_usbc_throttling_stats:file r_file_perms; + +# For issuing vendor commands to USB hub via libusbhost +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;