init.common.usb.rc: Do not hardcode sys.usb.controller property
Upstream commit eb9b7bfd5954 ("arm64: dts: qcom: Harmonize DWC
USB3 DT nodes name") (v5.14-rc1) changed the DTS USB node names,
breaking the sys.usb.controller property hardcoded in the
platfrom specific init.usb.common.rc
This script will get rid of the static/hardcoded proprty name
and set the property to the available on-board USB controller
from /sys/class/udc instead.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Change-Id: I1255cd9a3456510d93437989e7e378d9e6bc0c8b
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index 6bc4965..52f8668 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -30,6 +30,8 @@
/sys/devices/platform/remoteproc-adsp/remoteproc u:object_r:sysfs_remoteproc:s0
/sys/devices/platform/remoteproc-cdsp/remoteproc u:object_r:sysfs_remoteproc:s0
+/sys/class/udc u:object_r:sysfs_udc:s0
+
/data/vendor/tmp(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
/data/vendor/readwrite(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
/data/vendor/readonly(/.*)? u:object_r:tqftpserv_vendor_data_file:s0
@@ -37,6 +39,7 @@
/system/bin/eth_mac_addr\.sh u:object_r:eth_mac_addr_exec:s0
/system/bin/tinymix u:object_r:tinymix_exec:s0
+/vendor/bin/grep u:object_r:vendor_toolbox_exec:s0
/vendor/bin/hw/android\.hardware\.gatekeeper@1\.0-service\.software u:object_r:hal_gatekeeper_default_exec:s0
/vendor/bin/hw/android\.hardware\.graphics\.allocator@4\.0-service\.minigbm_msm u:object_r:hal_graphics_allocator_default_exec:s0
/vendor/bin/pd-mapper u:object_r:pd_mapper_exec:s0
@@ -45,6 +48,7 @@
/vendor/bin/rmtfs u:object_r:rmtfs_exec:s0
/vendor/bin/tqftpserv u:object_r:tqftpserv_exec:s0
/vendor/bin/suspend_blocker u:object_r:suspend_blocker_exec:s0
+/vendor/bin/set_udc\.sh u:object_r:set_udc_exec:s0
/vendor/lib(64)?/dri/.* u:object_r:same_process_hal_file:s0
/vendor/lib(64)?/hw/gralloc\.gbm\.so u:object_r:same_process_hal_file:s0