| on boot |
| write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} |
| write /sys/class/android_usb/android0/iProduct ${ro.product.model} |
| write /sys/class/android_usb/android0/iSerial ${ro.serialno} |
| write /sys/class/android_usb/android0/f_mass_storage/inquiry_string "Flounder 0100" |
| write /sys/class/android_usb/android0/f_rndis/manufacturer ${ro.product.manufacturer} |
| write /sys/class/android_usb/android0/f_rndis/vendorID 18d1 |
| write /sys/class/android_usb/android0/f_rndis/wceis 1 |
| |
| on fs |
| 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 |
| write /sys/class/android_usb/android0/f_ffs/aliases adb |
| |
| on property:sys.usb.config=mtp |
| write /sys/class/android_usb/android0/enable 0 |
| write /sys/class/android_usb/android0/idVendor 18d1 |
| write /sys/class/android_usb/android0/idProduct 4ee1 |
| write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| write /sys/class/android_usb/android0/enable 1 |
| setprop sys.usb.state ${sys.usb.config} |
| |
| on property:sys.usb.config=mtp,adb |
| write /sys/class/android_usb/android0/enable 0 |
| write /sys/class/android_usb/android0/idVendor 18d1 |
| write /sys/class/android_usb/android0/idProduct 4ee2 |
| write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| write /sys/class/android_usb/android0/enable 1 |
| start adbd |
| setprop sys.usb.state ${sys.usb.config} |
| |
| on property:sys.usb.config=rndis |
| write /sys/class/android_usb/android0/enable 0 |
| write /sys/class/android_usb/android0/idVendor 18d1 |
| write /sys/class/android_usb/android0/idProduct 4ee3 |
| write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| write /sys/class/android_usb/android0/bDeviceClass 224 |
| write /sys/class/android_usb/android0/enable 1 |
| setprop sys.usb.state ${sys.usb.config} |
| |
| on property:sys.usb.config=rndis,adb |
| write /sys/class/android_usb/android0/enable 0 |
| write /sys/class/android_usb/android0/idVendor 18d1 |
| write /sys/class/android_usb/android0/idProduct 4ee4 |
| write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| write /sys/class/android_usb/android0/bDeviceClass 224 |
| write /sys/class/android_usb/android0/enable 1 |
| start adbd |
| setprop sys.usb.state ${sys.usb.config} |
| |
| on property:sys.usb.config=ptp |
| write /sys/class/android_usb/android0/enable 0 |
| write /sys/class/android_usb/android0/idVendor 18d1 |
| write /sys/class/android_usb/android0/idProduct 4ee5 |
| write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| write /sys/class/android_usb/android0/enable 1 |
| setprop sys.usb.state ${sys.usb.config} |
| |
| on property:sys.usb.config=ptp,adb |
| write /sys/class/android_usb/android0/enable 0 |
| write /sys/class/android_usb/android0/idVendor 18d1 |
| write /sys/class/android_usb/android0/idProduct 4ee6 |
| write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| write /sys/class/android_usb/android0/enable 1 |
| start adbd |
| setprop sys.usb.state ${sys.usb.config} |