1type hal_usb_impl, domain;
2
3type hal_usb_impl_exec, vendor_file_type, exec_type, file_type;
4init_daemon_domain(hal_usb_impl)
5hal_server_domain(hal_usb_impl, hal_usb)
6hal_server_domain(hal_usb_impl, hal_usb_gadget)
7
8allow hal_usb_impl sysfs_batteryinfo:dir r_dir_perms;
9allow hal_usb_impl sysfs_batteryinfo:file rw_file_perms;
10allow hal_usb_impl dumpstate:fd use;
11get_prop(hal_usb_impl, vendor_usb_config_prop)
12
13# Needed for monitoring usb port temperature
14allow hal_usb_impl self:capability2 wake_alarm;
15wakelock_use(hal_usb_impl);
16
17# For interfacing with ThermalHAL
18hal_client_domain(hal_usb_impl, hal_thermal);
19
20# For monitoring usb sysfs attributes
21allow hal_usb_impl sysfs_wakeup:dir search;
22allow hal_usb_impl sysfs_wakeup:file r_file_perms;
23
24# For metrics upload
25allow hal_usb_impl fwk_stats_service:service_manager find;
26
27# For reading the usb-c throttling stats
28allow hal_usb_impl sysfs_usbc_throttling_stats:file r_file_perms;
29