1{ 2 "jobs" : [{ 3 "name" : "pre-init", 4 "cmds" : [ 5 "symlink /system/bin /bin", 6 "start ueventd" 7 ] 8 }, { 9 "name" : "init", 10 "cmds" : [ 11 "wait /dev/block/platform/fe310000.sdhci/by-name", 12 "symlink /dev/block/platform/fe310000.sdhci/by-name /dev/block/by-name", 13 "mkdir /system", 14 "mkdir /vendor", 15 "mkdir /tmp", 16 "mkdir /param", 17 "mount tmpfs tmpfs /tmp", 18 "chown 0 2000 /tmp", 19 "chmod 0755 /tmp", 20 "chmod 0755 /param", 21 "mkdir /dev/usb-ffs 0770 shell shell", 22 "mkdir /dev/usb-ffs/hdc 0770 shell shell", 23 "mkdir /dev/usb-ffs/hdc 0770 shell shell", 24 "mkdir /config 0770 shell shell", 25 "mount configfs none /config", 26 "mkdir /config/usb_gadget/g1 0770 shell shell", 27 "write /config/usb_gadget/g1/idVendor 0x12D1", 28 "write /config/usb_gadget/g1/idProduct 0x5000", 29 "write /config/usb_gadget/g1/os_desc/use 1", 30 "write /config/usb_gadget/g1/bcdDevice 0x0223", 31 "write /config/usb_gadget/g1/bcdUSB 0x0200", 32 "mkdir /config/usb_gadget/g1/strings/0x409 0770", 33 "copy /sys/block/mmcblk0/device/cid /config/usb_gadget/g1/strings/0x409/serialnumber", 34 "write /config/usb_gadget/g1/strings/0x409/manufacturer HISILICON", 35 "write /config/usb_gadget/g1/strings/0x409/product \"HDC Device\"", 36 "mkdir /config/usb_gadget/g1/functions/ffs.hdc", 37 "mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell", 38 "mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell", 39 "write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1", 40 "write /config/usb_gadget/g1/os_desc/qw_sign MSFT100", 41 "write /config/usb_gadget/g1/configs/b.1/MaxPower 500", 42 "symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1", 43 "mount functionfs hdc /dev/usb-ffs/hdc uid=2000,gid=2000", 44 "load_persist_params ", 45 "setparam sys.usb.controller 100e0000.hidwc3_0", 46 "setparam sys.usb.config hdc", 47 "setparam sys.usb.configfs 1" 48 ] 49 }, { 50 "name" : "post-init", 51 "cmds" : [ 52 "start shell", 53 "start updater" 54 ] 55 } 56 ], 57 "services" : [{ 58 "name" : "shell", 59 "path" : ["/bin/sh"], 60 "uid" : 0, 61 "gid" : 2000, 62 "once" : 0, 63 "importance" : 0, 64 "console" : 1 65 }, { 66 "name" : "updater", 67 "path" : ["/bin/updater"], 68 "uid" : 0, 69 "gid" : 0, 70 "importance" : 0, 71 "caps" : [0, 1] 72 }, { 73 "name" : "ueventd", 74 "path" : ["/bin/ueventd"], 75 "uid" : 0, 76 "gid" : 2000, 77 "once" : 0, 78 "importance" : 0, 79 "caps" : [0, 1], 80 "socket" : [{ 81 "name" : "ueventd", 82 "family" : "AF_NETLINK", 83 "type" : "SOCK_DGRAM", 84 "protocol" : "NETLINK_KOBJECT_UEVENT", 85 "permissions" : "0660", 86 "uid" : "0", 87 "gid" : "2000", 88 "option" : [ 89 "SOCKET_OPTION_PASSCRED", 90 "SOCKET_OPTION_RCVBUFFORCE", 91 "SOCK_CLOEXEC", 92 "SOCK_NONBLOCK" 93 ] 94 }], 95 "critical" : [ 0, 15, 5], 96 "ondemand" : true 97 } 98 ] 99} 100