Add udc sysfs to udc_sysfs fs context
Meeded for system server to monitor usb gadget state. Grant hal_usb_impl read access as it's needed by UsbDataSessionMonitor. Starting at board level api 202504 due to its dependency on aosp/3337514 10956 10956 W android.hardwar: type=1400 audit(0.0:327): avc: denied { read } for name="state" dev="sysfs" ino=84394 scontext=u:r:hal_usb_impl:s0 tcontext=u:object_r:sysfs_udc:s0 tclass=file permissive=0 Bug: 339241080 Test: tested on Tokay Flag: android.hardware.usb.flags.enable_udc_sysfs_usb_state_update Change-Id: Iab79eec9a836d70792dfaa64eb24a5c013dc85aa
This commit is contained in:
parent
1f96101a5e
commit
20707fd77f
2 changed files with 8 additions and 1 deletions
5
vendor/genfs_contexts
vendored
5
vendor/genfs_contexts
vendored
|
@ -499,3 +499,8 @@ genfscon sysfs /kernel/metrics/cpuidle_histogram/cpucluster_histogram u:obje
|
|||
|
||||
# Bluetooth
|
||||
genfscon sysfs /devices/platform/155d0000.serial/uart_dbg u:object_r:sysfs_bt_uart:s0
|
||||
|
||||
# USB
|
||||
starting_at_board_api(202504, `
|
||||
genfscon sysfs /devices/platform/11210000.usb/11210000.dwc3/udc/11210000.dwc3/state u:object_r:sysfs_udc:s0
|
||||
')
|
||||
|
|
4
vendor/hal_usb_impl.te
vendored
4
vendor/hal_usb_impl.te
vendored
|
@ -30,4 +30,6 @@ allow hal_usb_impl usb_device:dir r_dir_perms;
|
|||
# For monitoring usb sysfs attributes
|
||||
allow hal_usb_impl sysfs_wakeup:dir search;
|
||||
allow hal_usb_impl sysfs_wakeup:file r_file_perms;
|
||||
|
||||
starting_at_board_api(202504, `
|
||||
allow hal_usb_impl sysfs_udc:file r_file_perms;
|
||||
')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue