58 lines
3.0 KiB
Plaintext
58 lines
3.0 KiB
Plaintext
|
on property:sys.usb.config=none && property:sys.usb.configfs=1
|
||
|
write /config/usb_gadget/g1/UDC "none"
|
||
|
stop adbd
|
||
|
write /config/usb_gadget/g1/bDeviceClass 0
|
||
|
setprop sys.usb.state ${sys.usb.config}
|
||
|
|
||
|
on property:sys.usb.config=mtp && property:sys.usb.configfs=1
|
||
|
rmdir /config/usb_gadget/g1/configs/b.1
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
|
||
|
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ffs1"
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f1
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f2
|
||
|
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
|
||
|
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||
|
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 && property:sys.usb.configfs=1
|
||
|
rmdir /config/usb_gadget/g1/configs/b.1
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
|
||
|
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ffs1"
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f1
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f2
|
||
|
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
|
||
|
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
|
||
|
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||
|
setprop sys.usb.state ${sys.usb.config}
|
||
|
|
||
|
on property:sys.usb.config=ptp && property:sys.usb.configfs=1
|
||
|
rmdir /config/usb_gadget/g1/configs/b.1
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
|
||
|
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ffs1"
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f1
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f2
|
||
|
symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
|
||
|
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||
|
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 && property:sys.usb.configfs=1
|
||
|
rmdir /config/usb_gadget/g1/configs/b.1
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell
|
||
|
mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
|
||
|
write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ffs1"
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f1
|
||
|
rm /config/usb_gadget/g1/configs/b.1/f2
|
||
|
symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
|
||
|
symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
|
||
|
write /config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||
|
setprop sys.usb.state ${sys.usb.config}
|