1on init 2 write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} 3 write /sys/class/android_usb/android0/iProduct ${ro.product.model} 4 write /sys/class/android_usb/android0/iSerial ${ro.serialno} 5 write /sys/class/android_usb/android0/f_mass_storage/inquiry_string "Flounder 0100" 6 write /sys/class/android_usb/android0/f_rndis/manufacturer ${ro.product.manufacturer} 7 write /sys/class/android_usb/android0/f_rndis/vendorID 18d1 8 write /sys/class/android_usb/android0/f_rndis/wceis 1 9 mkdir /dev/usb-ffs 0770 shell shell 10 mkdir /dev/usb-ffs/adb 0770 shell shell 11 mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 12 write /sys/class/android_usb/android0/f_ffs/aliases adb 13 14on property:sys.usb.config=mtp 15 write /sys/class/android_usb/android0/enable 0 16 write /sys/class/android_usb/android0/idVendor 18d1 17 write /sys/class/android_usb/android0/idProduct 4ee1 18 write /sys/class/android_usb/android0/functions ${sys.usb.config} 19 write /sys/class/android_usb/android0/enable 1 20 setprop sys.usb.state ${sys.usb.config} 21 22on property:sys.usb.config=mtp,adb 23 write /sys/class/android_usb/android0/enable 0 24 write /sys/class/android_usb/android0/idVendor 18d1 25 write /sys/class/android_usb/android0/idProduct 4ee2 26 write /sys/class/android_usb/android0/functions ${sys.usb.config} 27 write /sys/class/android_usb/android0/bDeviceClass 0 28 write /sys/class/android_usb/android0/bDeviceSubClass 0 29 write /sys/class/android_usb/android0/bDeviceProtocol 0 30 write /sys/class/android_usb/android0/enable 1 31 start adbd 32 setprop sys.usb.state ${sys.usb.config} 33 34on property:sys.usb.config=rndis 35 write /sys/class/android_usb/android0/enable 0 36 write /sys/class/android_usb/android0/idVendor 18d1 37 write /sys/class/android_usb/android0/idProduct 4ee3 38 write /sys/class/android_usb/android0/functions ${sys.usb.config} 39 write /sys/class/android_usb/android0/bDeviceClass 224 40 write /sys/class/android_usb/android0/enable 1 41 setprop sys.usb.state ${sys.usb.config} 42 43on property:sys.usb.config=rndis,adb 44 write /sys/class/android_usb/android0/enable 0 45 write /sys/class/android_usb/android0/idVendor 18d1 46 write /sys/class/android_usb/android0/idProduct 4ee4 47 write /sys/class/android_usb/android0/functions ${sys.usb.config} 48 write /sys/class/android_usb/android0/bDeviceClass 239 49 write /sys/class/android_usb/android0/bDeviceSubClass 2 50 write /sys/class/android_usb/android0/bDeviceProtocol 1 51 write /sys/class/android_usb/android0/enable 1 52 start adbd 53 setprop sys.usb.state ${sys.usb.config} 54 55on property:sys.usb.config=ptp 56 write /sys/class/android_usb/android0/enable 0 57 write /sys/class/android_usb/android0/idVendor 18d1 58 write /sys/class/android_usb/android0/idProduct 4ee5 59 write /sys/class/android_usb/android0/functions ${sys.usb.config} 60 write /sys/class/android_usb/android0/enable 1 61 setprop sys.usb.state ${sys.usb.config} 62 63on property:sys.usb.config=ptp,adb 64 write /sys/class/android_usb/android0/enable 0 65 write /sys/class/android_usb/android0/idVendor 18d1 66 write /sys/class/android_usb/android0/idProduct 4ee6 67 write /sys/class/android_usb/android0/functions ${sys.usb.config} 68 write /sys/class/android_usb/android0/bDeviceClass 0 69 write /sys/class/android_usb/android0/bDeviceSubClass 0 70 write /sys/class/android_usb/android0/bDeviceProtocol 0 71 write /sys/class/android_usb/android0/enable 1 72 start adbd 73 setprop sys.usb.state ${sys.usb.config} 74 75# USB midi configuration 76on property:sys.usb.config=midi 77 write /sys/class/android_usb/android0/enable 0 78 write /sys/class/android_usb/android0/idVendor 18d1 79 write /sys/class/android_usb/android0/idProduct 4ee8 80 write /sys/class/android_usb/android0/functions ${sys.usb.config} 81 write /sys/class/android_usb/android0/enable 1 82 start adbd 83 setprop sys.usb.state ${sys.usb.config} 84 85# USB midi configuration, with adb 86on property:sys.usb.config=midi,adb 87 write /sys/class/android_usb/android0/enable 0 88 write /sys/class/android_usb/android0/idVendor 18d1 89 write /sys/class/android_usb/android0/idProduct 4ee9 90 write /sys/class/android_usb/android0/functions ${sys.usb.config} 91 write /sys/class/android_usb/android0/enable 1 92 start adbd 93 setprop sys.usb.state ${sys.usb.config} 94 95# diag 96on property:sys.usb.config=diag 97 write /sys/class/android_usb/android0/enable 0 98 write /sys/class/android_usb/android0/idVendor 0bb4 99 write /sys/class/android_usb/android0/idProduct 0c07 100 write /sys/class/android_usb/android0/functions mtp,adb,diag_mdm 101 write /sys/class/android_usb/android0/bDeviceClass 0 102 write /sys/class/android_usb/android0/bDeviceSubClass 0 103 write /sys/class/android_usb/android0/bDeviceProtocol 0 104 write /sys/class/android_usb/android0/enable 1 105 start adbd 106 setprop sys.usb.state ${sys.usb.config} 107 108# rmnet 109on property:sys.usb.config=rmnet 110 write /sys/class/android_usb/android0/enable 0 111 write /sys/class/android_usb/android0/idVendor 0bb4 112 write /sys/class/android_usb/android0/idProduct 0fda 113 write /sys/class/android_usb/android0/functions mtp,adb,rmnet 114 write /sys/class/android_usb/android0/bDeviceClass 0 115 write /sys/class/android_usb/android0/bDeviceSubClass 0 116 write /sys/class/android_usb/android0/bDeviceProtocol 0 117 write /sys/class/android_usb/android0/enable 1 118 start adbd 119 setprop sys.usb.state ${sys.usb.config} 120 121#diag, modem, rmnet 122on property:sys.usb.config=diag,modem,rmnet 123 write /sys/class/android_usb/android0/enable 0 124 write /sys/class/android_usb/android0/idVendor 0bb4 125 write /sys/class/android_usb/android0/idProduct 0fd8 126 write /sys/class/android_usb/android0/functions mtp,adb,diag_mdm,modem,rmnet 127 write /sys/class/android_usb/android0/bDeviceClass 0 128 write /sys/class/android_usb/android0/bDeviceSubClass 0 129 write /sys/class/android_usb/android0/bDeviceProtocol 0 130 write /sys/class/android_usb/android0/enable 1 131 start adbd 132 setprop sys.usb.state ${sys.usb.config} 133