You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.3 KiB

service console /system/bin/sh
class core
console
disabled
user root
group shell log readproc
seclabel u:r:shell:s0
setenv HOSTNAME console
on property:ro.debuggable=1
start console
on init
mount configfs none /config
mkdir /config/usb_gadget/g1 0770 shell shell
write /config/usb_gadget/g1/driver_match_existing_only 0
write /config/usb_gadget/g1/idVendor 0x18d1
write /config/usb_gadget/g1/idProduct 0xd001
mkdir /config/usb_gadget/g1/strings/0x409 0770
write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
write /config/usb_gadget/g1/strings/0x409/manufacturer "HISILICON"
write /config/usb_gadget/g1/strings/0x409/product "ADB Gadget"
mkdir /config/usb_gadget/g1/functions/ffs.adb
write /config/usb_gadget/g1/os_desc/use 1
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
setprop sys.usb.configfs 1
on property:sys.usb.ffs.ready=1
mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1