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 |
| 16 | write /config/usb_gadget/g1/idVendor 0x18d1 |
| 17 | write /config/usb_gadget/g1/idProduct 0xd001 |
| 18 | mkdir /config/usb_gadget/g1/strings/0x409 0770 |
| 19 | write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} |
| 20 | write /config/usb_gadget/g1/strings/0x409/manufacturer "HISILICON" |
| 21 | write /config/usb_gadget/g1/strings/0x409/product "ADB Gadget" |
| 22 | mkdir /config/usb_gadget/g1/functions/ffs.adb |
| 23 | write /config/usb_gadget/g1/os_desc/use 1 |
| 24 | symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 |
| 25 | setprop sys.usb.configfs 1 |
| 26 | |
| 27 | on property:sys.usb.ffs.ready=1 |
| 28 | mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell |
| 29 | symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1 |
| 30 | mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell |
| 31 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" |
| 32 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 |