diff --git a/non_plat/file.te b/non_plat/file.te index 5d53c27..276a4b3 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -267,3 +267,6 @@ type sysfs_pump_express, fs_type, sysfs_type; # Widevine move data/mediadrm folder from system to vendor type mediadrm_vendor_data_file, file_type, data_file_type; + +# mtk usb hal +type sysfs_dual_role_usb20, fs_type, sysfs_type; \ No newline at end of file diff --git a/non_plat/file_contexts b/non_plat/file_contexts index 3d1cb98..c286c61 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -484,6 +484,7 @@ /sys/bus/platform/drivers/meta_uart_port_info/meta_uart_port_info(/.*)? u:object_r:sysfs_uart_info:s0 /sys/devices/platform/(charger|battery)/ADC_Charger_Voltage u:object_r:sysfs_vbus:s0 /sys/devices/platform/(charger|battery)/Pump_Express u:object_r:sysfs_pump_express:s0 +/sys/devices/platform/mt_usb/musb-hdrc/dual_role_usb(/.*)? u:object_r:sysfs_dual_role_usb20:s0 ############################# # debugfs files diff --git a/non_plat/hal_usb.te b/non_plat/hal_usb.te new file mode 100644 index 0000000..33e78d1 --- /dev/null +++ b/non_plat/hal_usb.te @@ -0,0 +1,2 @@ +allow hal_usb_default sysfs_dual_role_usb20:dir search; +allow hal_usb_default sysfs_dual_role_usb20:file {open read getattr};