1on fs 2 wait /dev/block/platform/soc/${ro.boot.bootdevice} 3 symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice 4 5on init 6 mount configfs none /config 7 mkdir /config/usb_gadget/g1 0770 shell shell 8 write /config/usb_gadget/g1/idVendor 0x18d1 9 write /config/usb_gadget/g1/idProduct 0xd001 10 mkdir /config/usb_gadget/g1/strings/0x409 0770 11 write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} 12 write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} 13 write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model} 14 mkdir /config/usb_gadget/g1/functions/ffs.adb 15 write /config/usb_gadget/g1/os_desc/use 1 16 setprop sys.usb.configfs 1 17 # Enable thermal mitigation 18 write /sys/devices/virtual/thermal/tz-by-name/backup-charge/mode enabled 19 20on property:sys.usb.ffs.ready=1 21 mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell 22 symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 23 mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell 24 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" 25 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 26 write /config/usb_gadget/g1/UDC "a600000.dwc3" 27