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
8set_prop(hal_usb_impl, vendor_usb_config_prop)
9allow hal_usb_impl functionfs:dir { watch watch_reads };
10
11allow hal_usb_impl sysfs_batteryinfo:dir r_dir_perms;
12allow hal_usb_impl sysfs_batteryinfo:file rw_file_perms;
13
14# Needed for reporting Usb Overheat suez event through statsd
15allow hal_usb_impl fwk_stats_service:service_manager find;
16binder_call(hal_usb_impl, servicemanager)
17
18# Needed for monitoring usb port temperature
19allow hal_usb_impl self:capability2 wake_alarm;
20wakelock_use(hal_usb_impl);
21
22# For interfacing with ThermalHAL
23hal_client_domain(hal_usb_impl, hal_thermal);
24
25# For reading the usb-c throttling stats
26allow hal_usb_impl sysfs_usbc_throttling_stats:file r_file_perms;
27
28# For issuing vendor commands to USB hub via libusbhost
29allow hal_usb_impl device:dir r_dir_perms;
30allow hal_usb_impl usb_device:chr_file rw_file_perms;
31allow hal_usb_impl usb_device:dir r_dir_perms;
32
33# For monitoring usb sysfs attributes
34allow hal_usb_impl sysfs_wakeup:dir search;
35allow hal_usb_impl sysfs_wakeup:file r_file_perms;
36