Badhri Jagan Sridharan | e180186 | 2015-08-28 19:32:45 -0700 | [diff] [blame] | 1 | on property:sys.usb.config=none && property:sys.usb.configfs=1 |
| 2 | write /config/usb_gadget/g1/UDC "none" |
| 3 | stop adbd |
Winter Wang | 46c313b | 2016-03-24 17:45:37 +0800 | [diff] [blame] | 4 | setprop sys.usb.ffs.ready 0 |
Badhri Jagan Sridharan | e180186 | 2015-08-28 19:32:45 -0700 | [diff] [blame] | 5 | write /config/usb_gadget/g1/bDeviceClass 0 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 6 | write /config/usb_gadget/g1/bDeviceSubClass 0 |
| 7 | write /config/usb_gadget/g1/bDeviceProtocol 0 |
Amit Pundir | aae7b49 | 2016-06-07 19:35:23 +0530 | [diff] [blame] | 8 | rm /config/usb_gadget/g1/configs/b.1/f1 |
| 9 | rm /config/usb_gadget/g1/configs/b.1/f2 |
| 10 | rm /config/usb_gadget/g1/configs/b.1/f3 |
| 11 | rmdir /config/usb_gadget/g1/functions/rndis.gs4 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 12 | setprop sys.usb.state ${sys.usb.config} |
| 13 | |
| 14 | on property:sys.usb.config=adb && property:sys.usb.configfs=1 |
| 15 | start adbd |
| 16 | |
| 17 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1 |
| 18 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 19 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 |
| 20 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
Badhri Jagan Sridharan | e180186 | 2015-08-28 19:32:45 -0700 | [diff] [blame] | 21 | setprop sys.usb.state ${sys.usb.config} |
| 22 | |
| 23 | on property:sys.usb.config=mtp && property:sys.usb.configfs=1 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 24 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp" |
Badhri Jagan Sridharan | e180186 | 2015-08-28 19:32:45 -0700 | [diff] [blame] | 25 | symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 |
| 26 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 27 | setprop sys.usb.state ${sys.usb.config} |
| 28 | |
| 29 | on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 |
| 30 | start adbd |
| 31 | |
| 32 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 33 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb" |
Badhri Jagan Sridharan | e180186 | 2015-08-28 19:32:45 -0700 | [diff] [blame] | 34 | symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 |
| 35 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 |
| 36 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 37 | setprop sys.usb.state ${sys.usb.config} |
| 38 | |
| 39 | on property:sys.usb.config=ptp && property:sys.usb.configfs=1 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 40 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp" |
Badhri Jagan Sridharan | e180186 | 2015-08-28 19:32:45 -0700 | [diff] [blame] | 41 | symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 |
| 42 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 43 | setprop sys.usb.state ${sys.usb.config} |
| 44 | |
| 45 | on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 |
| 46 | start adbd |
| 47 | |
| 48 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 49 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb" |
Badhri Jagan Sridharan | e180186 | 2015-08-28 19:32:45 -0700 | [diff] [blame] | 50 | symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1 |
| 51 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 |
| 52 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 53 | setprop sys.usb.state ${sys.usb.config} |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 54 | |
| 55 | on property:sys.usb.config=accessory && property:sys.usb.configfs=1 |
| 56 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 57 | symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 |
| 58 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 59 | setprop sys.usb.state ${sys.usb.config} |
| 60 | |
| 61 | on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1 |
| 62 | start adbd |
| 63 | |
| 64 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1 |
| 65 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_adb" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 66 | symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 |
| 67 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 |
| 68 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 69 | setprop sys.usb.state ${sys.usb.config} |
| 70 | |
| 71 | on property:sys.usb.config=audio_source && property:sys.usb.configfs=1 |
| 72 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource" |
Winter Wang | 60c763e | 2016-06-06 13:16:11 +0800 | [diff] [blame] | 73 | symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 74 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 75 | setprop sys.usb.state ${sys.usb.config} |
| 76 | |
| 77 | on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1 |
| 78 | start adbd |
| 79 | |
| 80 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1 |
| 81 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource_adb" |
Winter Wang | 60c763e | 2016-06-06 13:16:11 +0800 | [diff] [blame] | 82 | symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 83 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 |
| 84 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 85 | setprop sys.usb.state ${sys.usb.config} |
| 86 | |
| 87 | on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1 |
| 88 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 89 | symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 |
| 90 | symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2 |
| 91 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 92 | setprop sys.usb.state ${sys.usb.config} |
| 93 | |
| 94 | on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1 |
| 95 | start adbd |
| 96 | |
| 97 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1 |
| 98 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource_adb" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 99 | symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1 |
| 100 | symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2 |
| 101 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3 |
| 102 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 103 | setprop sys.usb.state ${sys.usb.config} |
| 104 | |
| 105 | on property:sys.usb.config=midi && property:sys.usb.configfs=1 |
| 106 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 107 | symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1 |
| 108 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 109 | setprop sys.usb.state ${sys.usb.config} |
| 110 | |
| 111 | on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 |
| 112 | start adbd |
| 113 | |
| 114 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb && property:sys.usb.configfs=1 |
| 115 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi_adb" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 116 | symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1 |
| 117 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 |
| 118 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 119 | setprop sys.usb.state ${sys.usb.config} |
| 120 | |
| 121 | on property:sys.usb.config=rndis && property:sys.usb.configfs=1 |
Amit Pundir | aae7b49 | 2016-06-07 19:35:23 +0530 | [diff] [blame] | 122 | mkdir /config/usb_gadget/g1/functions/rndis.gs4 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 123 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 124 | symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 |
| 125 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 126 | setprop sys.usb.state ${sys.usb.config} |
| 127 | |
| 128 | on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1 |
| 129 | start adbd |
| 130 | |
| 131 | on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1 |
Amit Pundir | aae7b49 | 2016-06-07 19:35:23 +0530 | [diff] [blame] | 132 | mkdir /config/usb_gadget/g1/functions/rndis.gs4 |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 133 | write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb" |
Badhri Jagan Sridharan | a6c377b | 2015-09-03 12:12:44 -0700 | [diff] [blame] | 134 | symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1 |
| 135 | symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2 |
| 136 | write /config/usb_gadget/g1/UDC ${sys.usb.controller} |
| 137 | setprop sys.usb.state ${sys.usb.config} |