Alistair Strachan | 10c509c | 2018-11-20 18:09:27 -0800 | [diff] [blame] | 1 | service console /system/bin/sh |
| 2 | class core |
| 3 | console |
| 4 | disabled |
| 5 | user root |
| 6 | group shell log readproc |
| 7 | seclabel u:r:shell:s0 |
| 8 | setenv HOSTNAME console |
| 9 | |
| 10 | on property:ro.debuggable=1 |
| 11 | start console |
| 12 | |
| 13 | on init |
| 14 | mount configfs none /config |
| 15 | mkdir /config/usb_gadget/g1 0770 shell shell |
John Stultz | f80ca2b | 2019-02-01 17:20:07 -0800 | [diff] [blame] | 16 | write /config/usb_gadget/g1/driver_match_existing_only 0 |
Alistair Strachan | 10c509c | 2018-11-20 18:09:27 -0800 | [diff] [blame] | 17 | write /config/usb_gadget/g1/idVendor 0x18d1 |
| 18 | write /config/usb_gadget/g1/idProduct 0xd001 |
| 19 | mkdir /config/usb_gadget/g1/strings/0x409 0770 |
| 20 | write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} |
| 21 | write /config/usb_gadget/g1/strings/0x409/manufacturer "HISILICON" |
| 22 | write /config/usb_gadget/g1/strings/0x409/product "ADB Gadget" |
| 23 | mkdir /config/usb_gadget/g1/functions/ffs.adb |
| 24 | write /config/usb_gadget/g1/os_desc/use 1 |
| 25 | symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 |
| 26 | setprop sys.usb.configfs 1 |
| 27 | |
| 28 | on property:sys.usb.ffs.ready=1 |
| 29 | mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell |
| 30 | symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 |
| 31 | mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell |
| 32 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" |
| 33 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 |