Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 1 | on boot |
| 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 "Manta 0100" |
| 6 | write /sys/class/android_usb/android0/f_rndis/manufacturer Samsung |
| 7 | write /sys/class/android_usb/android0/f_rndis/vendorID 18d1 |
| 8 | write /sys/class/android_usb/android0/f_rndis/wceis 1 |
| 9 | |
Benoit Goby | b95ddb8 | 2012-03-29 19:40:39 -0700 | [diff] [blame] | 10 | on fs |
| 11 | mkdir /dev/usb-ffs 0770 shell shell |
| 12 | mkdir /dev/usb-ffs/adb 0770 shell shell |
| 13 | mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000 |
| 14 | write /sys/class/android_usb/android0/f_ffs/aliases adb |
| 15 | |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 16 | on property:sys.usb.config=mtp |
| 17 | write /sys/class/android_usb/android0/enable 0 |
| 18 | write /sys/class/android_usb/android0/idVendor 18d1 |
Dima Zavin | 5f8a681 | 2012-07-18 11:48:17 -0700 | [diff] [blame] | 19 | write /sys/class/android_usb/android0/idProduct 4ee1 |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 20 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| 21 | write /sys/class/android_usb/android0/enable 1 |
| 22 | setprop sys.usb.state ${sys.usb.config} |
| 23 | |
| 24 | on property:sys.usb.config=mtp,adb |
| 25 | write /sys/class/android_usb/android0/enable 0 |
| 26 | write /sys/class/android_usb/android0/idVendor 18d1 |
Dima Zavin | 5f8a681 | 2012-07-18 11:48:17 -0700 | [diff] [blame] | 27 | write /sys/class/android_usb/android0/idProduct 4ee2 |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 28 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| 29 | write /sys/class/android_usb/android0/enable 1 |
| 30 | start adbd |
| 31 | setprop sys.usb.state ${sys.usb.config} |
| 32 | |
| 33 | on property:sys.usb.config=rndis |
| 34 | write /sys/class/android_usb/android0/enable 0 |
| 35 | write /sys/class/android_usb/android0/idVendor 18d1 |
Dima Zavin | 5f8a681 | 2012-07-18 11:48:17 -0700 | [diff] [blame] | 36 | write /sys/class/android_usb/android0/idProduct 4ee3 |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 37 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| 38 | write /sys/class/android_usb/android0/bDeviceClass 224 |
| 39 | write /sys/class/android_usb/android0/enable 1 |
| 40 | setprop sys.usb.state ${sys.usb.config} |
| 41 | |
| 42 | on property:sys.usb.config=rndis,adb |
| 43 | write /sys/class/android_usb/android0/enable 0 |
| 44 | write /sys/class/android_usb/android0/idVendor 18d1 |
Dima Zavin | 5f8a681 | 2012-07-18 11:48:17 -0700 | [diff] [blame] | 45 | write /sys/class/android_usb/android0/idProduct 4ee4 |
Colin Cross | 29380e6 | 2012-03-06 17:41:22 -0800 | [diff] [blame] | 46 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| 47 | write /sys/class/android_usb/android0/bDeviceClass 224 |
| 48 | write /sys/class/android_usb/android0/enable 1 |
| 49 | start adbd |
| 50 | setprop sys.usb.state ${sys.usb.config} |
Benoit Goby | 970ce7a | 2012-07-12 14:17:50 -0700 | [diff] [blame] | 51 | |
| 52 | on property:sys.usb.config=ptp |
| 53 | write /sys/class/android_usb/android0/enable 0 |
| 54 | write /sys/class/android_usb/android0/idVendor 18d1 |
Dima Zavin | 5f8a681 | 2012-07-18 11:48:17 -0700 | [diff] [blame] | 55 | write /sys/class/android_usb/android0/idProduct 4ee5 |
Benoit Goby | 970ce7a | 2012-07-12 14:17:50 -0700 | [diff] [blame] | 56 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| 57 | write /sys/class/android_usb/android0/enable 1 |
| 58 | setprop sys.usb.state ${sys.usb.config} |
| 59 | |
| 60 | on property:sys.usb.config=ptp,adb |
| 61 | write /sys/class/android_usb/android0/enable 0 |
| 62 | write /sys/class/android_usb/android0/idVendor 18d1 |
Dima Zavin | 5f8a681 | 2012-07-18 11:48:17 -0700 | [diff] [blame] | 63 | write /sys/class/android_usb/android0/idProduct 4ee6 |
Benoit Goby | 970ce7a | 2012-07-12 14:17:50 -0700 | [diff] [blame] | 64 | write /sys/class/android_usb/android0/functions ${sys.usb.config} |
| 65 | write /sys/class/android_usb/android0/enable 1 |
| 66 | start adbd |
| 67 | setprop sys.usb.state ${sys.usb.config} |