device_google_gs101/conf/init.recovery.device.rc
Will McVicker 04c94df116 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
2021-11-04 14:36:37 -07:00

19 lines
527 B
Text

on init
wait /sys/devices/platform/11110000.usb/11110000.dwc3/driver 10
setprop sys.usb.controller "11110000.dwc3"
setprop sys.usb.configfs 1
on init && property:ro.debuggable=1 && property:ro.boot.mode=recovery
start recovery-console
service recovery-console /system/bin/sh
class core
console
disabled
user root
group root shell log readproc
seclabel u:r:su:s0
setenv HOSTNAME console
on fs && property:sys.usb.configfs=1
write /config/usb_gadget/g1/configs/b.1/MaxPower 900