gs101: recovery: add wait for dwc3 device to probe

This patch adds a dependency on the dwc3 device probing before setting
the sys.usb.controller property. Without this, we have a race between
fastbootd starting and the dwc3 device probing. If fastbootd starts
before the dwc3 device probes, then the recovery init.rc will fail to
setup the USB gadget resulting in "fastboot devices" failing to detect
the device.

Bug: 202338035
Test: verify device is detected in fastbootd
Change-Id: I146451eae03f23dde915c00af3028681be41a8c1
(cherry picked from commit f31fad844a7b94ee7c6689afd0b563da00c29118)
This commit is contained in:
Will McVicker 2021-10-13 09:53:23 -07:00 committed by Will Mcvicker
parent f5817b68d7
commit 09f583f336

View file

@ -1,4 +1,5 @@
on init on init
wait /sys/devices/platform/11110000.usb/11110000.dwc3/driver 10
setprop sys.usb.controller "11110000.dwc3" setprop sys.usb.controller "11110000.dwc3"
setprop sys.usb.configfs 1 setprop sys.usb.configfs 1