blob: dc875b4f0bf5b17c873c804a176ddfa71d1c46a6 [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
Winter Wang46c313b2016-03-24 17:45:37 +08004 setprop sys.usb.ffs.ready 0
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -07005 write /config/usb_gadget/g1/bDeviceClass 0
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -07006 write /config/usb_gadget/g1/bDeviceSubClass 0
7 write /config/usb_gadget/g1/bDeviceProtocol 0
Amit Pundiraae7b492016-06-07 19:35:23 +05308 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 Sridharana6c377b2015-09-03 12:12:44 -070012 setprop sys.usb.state ${sys.usb.config}
13
14on property:sys.usb.config=adb && property:sys.usb.configfs=1
15 start adbd
16
17on 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 Sridharana6c377b2015-09-03 12:12:44 -070019 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 Sridharane1801862015-08-28 19:32:45 -070021 setprop sys.usb.state ${sys.usb.config}
22
23on property:sys.usb.config=mtp && property:sys.usb.configfs=1
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070024 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070025 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
29on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
30 start adbd
31
32on 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 -070033 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070034 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
39on property:sys.usb.config=ptp && property:sys.usb.configfs=1
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070040 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070041 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
45on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
46 start adbd
47
48on 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 -070049 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb"
Badhri Jagan Sridharane1801862015-08-28 19:32:45 -070050 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 Sridharana6c377b2015-09-03 12:12:44 -070054
55on 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 Sridharana6c377b2015-09-03 12:12:44 -070057 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
61on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
62 start adbd
63
64on 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 Sridharana6c377b2015-09-03 12:12:44 -070066 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
71on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
72 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource"
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070073 symlink /config/usb_gadget/g1/functions/audio_source.gs2 /config/usb_gadget/g1/configs/b.1/f1
74 write /config/usb_gadget/g1/UDC ${sys.usb.controller}
75 setprop sys.usb.state ${sys.usb.config}
76
77on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
78 start adbd
79
80on 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"
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070082 symlink /config/usb_gadget/g1/functions/audio_source.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=accessory,audio_source && property:sys.usb.configfs=1
88 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource"
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -070089 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
94on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
95 start adbd
96
97on 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 Sridharana6c377b2015-09-03 12:12:44 -070099 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
105on 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 Sridharana6c377b2015-09-03 12:12:44 -0700107 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
111on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
112 start adbd
113
114on 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 Sridharana6c377b2015-09-03 12:12:44 -0700116 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
121on property:sys.usb.config=rndis && property:sys.usb.configfs=1
Amit Pundiraae7b492016-06-07 19:35:23 +0530122 mkdir /config/usb_gadget/g1/functions/rndis.gs4
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -0700123 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis"
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -0700124 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
128on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
129 start adbd
130
131on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
Amit Pundiraae7b492016-06-07 19:35:23 +0530132 mkdir /config/usb_gadget/g1/functions/rndis.gs4
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -0700133 write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb"
Badhri Jagan Sridharana6c377b2015-09-03 12:12:44 -0700134 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}