Add wireless reprobe service for post-mount firmware loading
This commit is contained in:
parent
6645a6d36a
commit
b691318ecf
6 changed files with 79 additions and 2 deletions
|
|
@ -49,4 +49,6 @@
|
|||
/dev/block/by-name/boot u:object_r:boot_block_device:s0
|
||||
|
||||
#V4L2
|
||||
/vendor/bin/hw/android\.hardware\.media\.c2@1\.2-service-v4l2(.*)? u:object_r:mediacodec_exec:s0
|
||||
/vendor/bin/hw/android\.hardware\.media\.c2@1\.2-service-v4l2(.*)? u:object_r:mediacodec_exec:s0
|
||||
# WiFi
|
||||
/vendor/bin/wireless_reprobe\.sh u:object_r:wireless_reprobe_exec:s0
|
||||
|
|
|
|||
16
sepolicy/wireless_reprobe.te
Normal file
16
sepolicy/wireless_reprobe.te
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Domain for wireless_reprobe.sh: re-probes wireless drivers via sysfs after
|
||||
# /vendor is mounted (see wifi/wireless_reprobe.sh). Runs once from init at
|
||||
# post-fs as a oneshot service.
|
||||
type wireless_reprobe, domain;
|
||||
type wireless_reprobe_exec, exec_type, vendor_file_type, file_type;
|
||||
|
||||
init_daemon_domain(wireless_reprobe)
|
||||
|
||||
# Execute the vendor shell and toybox for the script interpreter
|
||||
allow wireless_reprobe vendor_shell_exec:file rx_file_perms;
|
||||
allow wireless_reprobe vendor_toolbox_exec:file rx_file_perms;
|
||||
|
||||
# Walk /sys/bus/{usb,serial}/devices and write to drivers_probe/unbind
|
||||
allow wireless_reprobe sysfs:dir r_dir_perms;
|
||||
allow wireless_reprobe sysfs:file rw_file_perms;
|
||||
allow wireless_reprobe sysfs:lnk_file read;
|
||||
Loading…
Add table
Add a link
Reference in a new issue