diff --git a/non_plat/file.te b/non_plat/file.te index e80c9c3..01d0c0d 100644 --- a/non_plat/file.te +++ b/non_plat/file.te @@ -260,6 +260,7 @@ type consyslog_data_file, file_type, data_file_type; # Purpose : for meta to get com port type and uart port info type sysfs_comport_type, fs_type, sysfs_type; type sysfs_uart_info, fs_type, sysfs_type; +type sysfs_usb_cmode, fs_type, sysfs_type; # Date : WK1820 # Purpose : for charger to access vbus info and pump_express diff --git a/non_plat/file_contexts b/non_plat/file_contexts index 7abec2e..0434854 100644 --- a/non_plat/file_contexts +++ b/non_plat/file_contexts @@ -485,6 +485,7 @@ /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 +/sys/devices/platform/mt_usb/musb-hdrc/cmode(/.*)? u:object_r:sysfs_usb_cmode:s0 ############################# # debugfs files diff --git a/non_plat/meta_tst.te b/non_plat/meta_tst.te index 86ff33d..59cad79 100644 --- a/non_plat/meta_tst.te +++ b/non_plat/meta_tst.te @@ -209,6 +209,8 @@ allow meta_tst sysfs_uart_info:file rw_file_perms; allow meta_tst sysfs_boot_mode:file rw_file_perms; allow meta_tst sysfs_android_usb:file rw_file_perms; allow meta_tst sysfs_android_usb:dir search; +allow meta_tst sysfs_usb_cmode:file rw_file_perms; +allow meta_tst sysfs_usb_cmode:dir search; #Date: W16.17 # Purpose: N Migration For meta_tst load MD NVRAM database @@ -340,8 +342,7 @@ allow meta_tst audiohal_prop:property_service set; #Data:W1745 # Purpose : Allow meta_tst to open and read proc/bootprof -allow meta_tst proc:file write; -allow meta_tst proc:file getattr; +allow meta_tst proc_bootprof:file {write open read}; # Date:W17.51 # Operation : lbs hal