blob: 186384bddd713bf20768a53b820124315a094537 [file] [log] [blame]
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -07001on property:sys.usb.config=none && property:sys.usb.configfs=1
2 write /config/usb_gadget/g1/UDC "none"
3 stop adbd
4 write /config/usb_gadget/g1/bDeviceClass 0
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -07005 write /config/usb_gadget/g1/bDeviceSubClass 0
6 write /config/usb_gadget/g1/bDeviceProtocol 0
7 setprop sys.usb.state ${sys.usb.config}
8
9on property:sys.usb.config=adb && property:sys.usb.configfs=1
10 start adbd
11
12on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
13 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
14 rm /config/usb_gadget/g1/configs/b.1/f1
15 rm /config/usb_gadget/g1/configs/b.1/f2
16 rm /config/usb_gadget/g1/configs/b.1/f3
17 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
18 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070019 setprop sys.usb.state ${sys.usb.config}
20
21on property:sys.usb.config=mtp && property:sys.usb.configfs=1
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070022 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070023 rm /config/usb_gadget/g1/configs/b.1/f1
24 rm /config/usb_gadget/g1/configs/b.1/f2
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070025 rm /config/usb_gadget/g1/configs/b.1/f3
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070026 symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
27 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
28 setprop sys.usb.state ${sys.usb.config}
29
30on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
31 start adbd
32
33on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070034 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070035 rm /config/usb_gadget/g1/configs/b.1/f1
36 rm /config/usb_gadget/g1/configs/b.1/f2
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070037 rm /config/usb_gadget/g1/configs/b.1/f3
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070038 symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
39 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
40 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
41 setprop sys.usb.state ${sys.usb.config}
42
43on property:sys.usb.config=ptp && property:sys.usb.configfs=1
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070044 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070045 rm /config/usb_gadget/g1/configs/b.1/f1
46 rm /config/usb_gadget/g1/configs/b.1/f2
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070047 rm /config/usb_gadget/g1/configs/b.1/f3
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070048 symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
49 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
50 setprop sys.usb.state ${sys.usb.config}
51
52on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
53 start adbd
54
55on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070056 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070057 rm /config/usb_gadget/g1/configs/b.1/f1
58 rm /config/usb_gadget/g1/configs/b.1/f2
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070059 rm /config/usb_gadget/g1/configs/b.1/f3
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070060 symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
61 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
62 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
63 setprop sys.usb.state ${sys.usb.config}
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070064
65on property:sys.usb.config=accessory && property:sys.usb.configfs=1
66 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory"
67 rm /config/usb_gadget/g1/configs/b.1/f1
68 rm /config/usb_gadget/g1/configs/b.1/f2
69 rm /config/usb_gadget/g1/configs/b.1/f3
70 symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
71 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
72 setprop sys.usb.state ${sys.usb.config}
73
74on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
75 start adbd
76
77on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
78 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_adb"
79 rm /config/usb_gadget/g1/configs/b.1/f1
80 rm /config/usb_gadget/g1/configs/b.1/f2
81 rm /config/usb_gadget/g1/configs/b.1/f3
82 symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
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
87on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
88 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource"
89 rm /config/usb_gadget/g1/configs/b.1/f1
90 rm /config/usb_gadget/g1/configs/b.1/f2
91 rm /config/usb_gadget/g1/configs/b.1/f3
92 symlink /config/usb_gadget/g1/functions/audio_source.gs2 /config/usb_gadget/g1/configs/b.1/f1
93 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
94 setprop sys.usb.state ${sys.usb.config}
95
96on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
97 start adbd
98
99on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
100 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource_adb"
101 rm /config/usb_gadget/g1/configs/b.1/f1
102 rm /config/usb_gadget/g1/configs/b.1/f2
103 rm /config/usb_gadget/g1/configs/b.1/f3
104 symlink /config/usb_gadget/g1/functions/audio_source.gs2 /config/usb_gadget/g1/configs/b.1/f1
105 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
106 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
107 setprop sys.usb.state ${sys.usb.config}
108
109on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
110 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource"
111 rm /config/usb_gadget/g1/configs/b.1/f1
112 rm /config/usb_gadget/g1/configs/b.1/f2
113 rm /config/usb_gadget/g1/configs/b.1/f3
114 symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
115 symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2
116 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
117 setprop sys.usb.state ${sys.usb.config}
118
119on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
120 start adbd
121
122on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
123 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource_adb"
124 rm /config/usb_gadget/g1/configs/b.1/f1
125 rm /config/usb_gadget/g1/configs/b.1/f2
126 rm /config/usb_gadget/g1/configs/b.1/f3
127 symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
128 symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2
129 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
130 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
131 setprop sys.usb.state ${sys.usb.config}
132
133on property:sys.usb.config=midi && property:sys.usb.configfs=1
134 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi"
135 rm /config/usb_gadget/g1/configs/b.1/f1
136 rm /config/usb_gadget/g1/configs/b.1/f2
137 rm /config/usb_gadget/g1/configs/b.1/f3
138 symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
139 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
140 setprop sys.usb.state ${sys.usb.config}
141
142on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
143 start adbd
144
145on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
146 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi_adb"
147 rm /config/usb_gadget/g1/configs/b.1/f1
148 rm /config/usb_gadget/g1/configs/b.1/f2
149 rm /config/usb_gadget/g1/configs/b.1/f3
150 symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
151 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
152 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
153 setprop sys.usb.state ${sys.usb.config}
154
155on property:sys.usb.config=rndis && property:sys.usb.configfs=1
156 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis"
157 rm /config/usb_gadget/g1/configs/b.1/f1
158 rm /config/usb_gadget/g1/configs/b.1/f2
159 rm /config/usb_gadget/g1/configs/b.1/f3
160 symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1
161 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
162 setprop sys.usb.state ${sys.usb.config}
163
164on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
165 start adbd
166
167on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
168 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb"
169 rm /config/usb_gadget/g1/configs/b.1/f1
170 rm /config/usb_gadget/g1/configs/b.1/f2
171 rm /config/usb_gadget/g1/configs/b.1/f3
172 symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1
173 symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
174 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
175 setprop sys.usb.state ${sys.usb.config}