diff --git a/usb/cfg/init.usb.configfs.cfg b/usb/cfg/init.usb.configfs.cfg index 4eec9f10087a492734a2fc9a583f01124e64beaf..9496b8fe7e4cc6a6224fd2009e3e5130c5b748d4 100755 --- a/usb/cfg/init.usb.configfs.cfg +++ b/usb/cfg/init.usb.configfs.cfg @@ -9,6 +9,10 @@ "name" : "param:sys.usb.config=none && param:sys.usb.configfs=1", "condition" : "sys.usb.config=none && sys.usb.configfs=1", "cmds" : [ + "stop adbd", + "write /config/usb_gadget/g1/os_desc/use 0", + "setparam sys.usb.ffs.ready 0", + "setparam sys.usb.state ${sys.usb.config}", "write /config/usb_gadget/g1/UDC none", "stop hdcd", "setparam sys.usb.ffs.ready 0", @@ -31,12 +35,18 @@ "name" : "param:sys.usb.config=hdc && param:sys.usb.configfs=1", "condition" : "sys.usb.config=hdc && sys.usb.configfs=1", "cmds" : [ + "setparam sys.usb.ffs.ready.hdc 1", + "write /dev/hdc_usb_debug_mode device", + "write /config/usb_gadget/g1/idProduct 0x5000", + "write /config/usb_gadget/g1/os_desc/use 1", "start hdcd" ] }, { "name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=hdc && param:sys.usb.configfs=1 && param:sys.usb.ffs.ready.hdc=1", "condition" : "sys.usb.ffs.ready=1 && sys.usb.config=hdc && sys.usb.configfs=1 && sys.usb.ffs.ready.hdc=1", "cmds" : [ + "setparam sys.usb.ffs.ready.hdc 0", + "setparam persist.sys.usb.config ${sys.usb.config}", "setparam sys.usb.ffs.ready.hdc 0", "write /config/usb_gadget/g1/UDC none", "write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration hdc", @@ -59,6 +69,7 @@ "name" : "param:sys.usb.config=hdc_debug && param:sys.usb.configfs=1", "condition" : "sys.usb.config=hdc_debug && sys.usb.configfs=1", "cmds" : [ + "write /dev/hdc_usb_debug_mode device", "start hdcd", "write /config/usb_gadget/g1/idProduct 0x5000", "write /config/usb_gadget/g1/os_desc/use 1"