blob: f229b0bbc0507da67f1474d61517fab1fc2d98fb [file] [log] [blame]
on early-fs
setprop sys.usb.controller 13600000.dwc3
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
# USB accessory configuration
on property:sys.usb.config=accessory && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d00
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# USB accessory configuration, with adb
on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d01
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# audio accessory configuration
on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d02
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# audio accessory configuration, with adb
on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d03
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# USB and audio accessory configuration
on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d04
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# USB and audio accessory configuration, with adb
on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d05
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=midi && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x686C
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x686C
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ncm && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 2
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 2
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on init
mount configfs none /sys/kernel/config
mkdir /sys/kernel/config/usb_gadget/g1
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409
mkdir /sys/kernel/config/usb_gadget/g1/functions/mtp.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/ptp.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/acm.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/uts.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/dm.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/rndis.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/conn_gadget.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/midi.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/accessory.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/audio_source.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/ncm.0
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb 0770 shell shell
mkdir /dev/usb-ffs 0770 shell shell
mkdir /dev/usb-ffs/adb 0770 shell shell
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
on boot
write /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
write /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer "SAMSUNG"
write /sys/kernel/config/usb_gadget/g1/strings/0x409/product "SAMSUNG_Android"
write /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Conf 1"
write /sys/kernel/config/usb_gadget/g1/configs/b.1/MaxPower 0x1f4
symlink /sys/kernel/config/usb_gadget/g1/functions/mtp.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/mtp.0
symlink /sys/kernel/config/usb_gadget/g1/functions/ptp.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/ptp.0
symlink /sys/kernel/config/usb_gadget/g1/functions/acm.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/acm.0
symlink /sys/kernel/config/usb_gadget/g1/functions/uts.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/uts.0
symlink /sys/kernel/config/usb_gadget/g1/functions/rndis.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/rndis.0
symlink /sys/kernel/config/usb_gadget/g1/functions/dm.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/dm.0
symlink /sys/kernel/config/usb_gadget/g1/functions/conn_gadget.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/conn_gadget.0
symlink /sys/kernel/config/usb_gadget/g1/functions/midi.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/midi.0
symlink /sys/kernel/config/usb_gadget/g1/functions/accessory.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/accessory.0
symlink /sys/kernel/config/usb_gadget/g1/functions/audio_source.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/audio_source.0
symlink /sys/kernel/config/usb_gadget/g1/functions/ncm.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/ncm.0
symlink /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/b.1/ffs.adb
setprop sys.usb.configfs 1
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions mtp,acm
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions mtp,acm,adb
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,acm,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,acm,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6863
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6864
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ptp
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6865
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6866
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,dm
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,acm,dm
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,acm,dm,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,acm,dm,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,acm,dm,uts
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,acm,dm,uts,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,acm,dm,uts,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=acm,dm
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=acm,dm,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=acm,dm,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=acm,dm,uts
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=acm,dm,uts,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=acm,dm,uts,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=dm,acm
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=dm,acm,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=dm,acm,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=dm,acm,uts
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=dm,acm,uts,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=dm,acm,uts,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685B
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685e
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mass_storage,acm
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685e
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# rndis,acm,diag and diag,acm,adb used for Hidden Menu
on property:sys.usb.config=rndis,diag
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
write /sys/class/android_usb/android0/f_diag/clients diag_mdm
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=diag,acm
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
write /sys/class/android_usb/android0/f_diag/clients diag_mdm
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=rndis,acm,diag
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6864
write /sys/class/android_usb/android0/f_diag/clients diag_mdm
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=sec_charging
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/class/android_usb/android0/functions mtp
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=sec_charging,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=sec_charging,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/class/android_usb/android0/functions mtp,adb
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=vzw_charging
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/class/android_usb/android0/functions mtp
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=vzw_charging,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=vzw_charging,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/class/android_usb/android0/functions mtp,adb
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,conn_gadget
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
on property:sys.usb.config=mtp,conn_gadget,adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,conn_gadget,adb
write /sys/class/android_usb/android0/enable 0
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
write /sys/class/android_usb/android0/functions ${sys.usb.config}
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
write /sys/class/android_usb/android0/enable 1
setprop sys.usb.state ${sys.usb.config}
# adb only USB configuration For VTS Test
# This is the fallback configuration if the
# USB manager fails to set a standard configuration
on property:sys.usb.config=adb && property:sys.usb.configfs=1
start adbd
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
setprop sys.usb.state ${sys.usb.config}