blob: 40245d722b4eccb02729b026e4126b998d19dec6 [file] [log] [blame]
Alistair Strachan10c509c2018-11-20 18:09:27 -08001service 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
10on property:ro.debuggable=1
11 start console
12
13on init
14 mount configfs none /config
15 mkdir /config/usb_gadget/g1 0770 shell shell
John Stultzf80ca2b2019-02-01 17:20:07 -080016 write /config/usb_gadget/g1/driver_match_existing_only 0
Alistair Strachan10c509c2018-11-20 18:09:27 -080017 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
28on 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