blob: 444dc9e69c5916d970d570f7d71b35ee87afb87b [file] [log] [blame]
Iliyan Malchev4ffa22b2013-02-27 18:45:49 -08001# Copyright 2012 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15on init
16 write /sys/class/android_usb/android0/f_rndis/manufacturer LGE
17 write /sys/class/android_usb/android0/f_rndis/vendorID 18D1
18 write /sys/class/android_usb/android0/f_rndis/wceis 1
19
20on boot
21 write /sys/class/android_usb/android0/iSerial $ro.serialno
22 write /sys/class/android_usb/android0/iManufacturer $ro.product.manufacturer
23 write /sys/class/android_usb/android0/iProduct $ro.product.model
24
25# MTP
26on property:sys.usb.config=mtp
27 stop adbd
28 write /sys/class/android_usb/android0/enable 0
29 write /sys/class/android_usb/android0/idVendor 0B05
30 write /sys/class/android_usb/android0/idProduct 4CC0
31 write /sys/class/android_usb/android0/bDeviceClass 0
32 write /sys/class/android_usb/android0/bDeviceSubClass 0
33 write /sys/class/android_usb/android0/bDeviceProtocol 0
34 write /sys/class/android_usb/android0/functions mtp
35 write /sys/class/android_usb/android0/enable 1
36 setprop sys.usb.state ${sys.usb.config}
37
38on property:sys.usb.config=mtp,adb
39 write /sys/class/android_usb/android0/enable 0
40 write /sys/class/android_usb/android0/idVendor 0B05
41 write /sys/class/android_usb/android0/idProduct 4CC1
42 write /sys/class/android_usb/android0/bDeviceClass 0
43 write /sys/class/android_usb/android0/bDeviceSubClass 0
44 write /sys/class/android_usb/android0/bDeviceProtocol 0
45 write /sys/class/android_usb/android0/functions mtp,adb
46 write /sys/class/android_usb/android0/enable 1
47 start adbd
48 setprop sys.usb.state ${sys.usb.config}
49
50# rndis
51on property:sys.usb.config=rndis
52 stop adbd
53 write /sys/class/android_usb/android0/enable 0
54 write /sys/class/android_usb/android0/idVendor 0B05
55 write /sys/class/android_usb/android0/idProduct 4CC2
56 write /sys/class/android_usb/android0/bDeviceClass 239
57 write /sys/class/android_usb/android0/bDeviceSubClass 2
58 write /sys/class/android_usb/android0/bDeviceProtocol 1
59 write /sys/class/android_usb/android0/functions rndis
60 write /sys/class/android_usb/android0/enable 1
61 setprop sys.usb.state ${sys.usb.config}
62
63on property:sys.usb.config=rndis,adb
64 write /sys/class/android_usb/android0/enable 0
65 write /sys/class/android_usb/android0/idVendor 0B05
66 write /sys/class/android_usb/android0/idProduct 4CC3
67 write /sys/class/android_usb/android0/bDeviceClass 239
68 write /sys/class/android_usb/android0/bDeviceSubClass 2
69 write /sys/class/android_usb/android0/bDeviceProtocol 1
70 write /sys/class/android_usb/android0/functions rndis,adb
71 write /sys/class/android_usb/android0/enable 1
72 start adbd
73 setprop sys.usb.state ${sys.usb.config}
74
75# PTP
76on property:sys.usb.config=ptp
77 stop adbd
78 write /sys/class/android_usb/android0/enable 0
79 write /sys/class/android_usb/android0/idVendor 0B05
80 write /sys/class/android_usb/android0/idProduct 4CC4
81 write /sys/class/android_usb/android0/bDeviceClass 0
82 write /sys/class/android_usb/android0/bDeviceSubClass 0
83 write /sys/class/android_usb/android0/bDeviceProtocol 0
84 write /sys/class/android_usb/android0/functions ptp
85 write /sys/class/android_usb/android0/enable 1
86 setprop sys.usb.state ${sys.usb.config}
87
88on property:sys.usb.config=ptp,adb
89 write /sys/class/android_usb/android0/enable 0
90 write /sys/class/android_usb/android0/idVendor 0B05
91 write /sys/class/android_usb/android0/idProduct 4CC5
92 write /sys/class/android_usb/android0/bDeviceClass 0
93 write /sys/class/android_usb/android0/bDeviceSubClass 0
94 write /sys/class/android_usb/android0/bDeviceProtocol 0
95 write /sys/class/android_usb/android0/functions ptp,adb
96 write /sys/class/android_usb/android0/enable 1
97 start adbd
98 setprop sys.usb.state ${sys.usb.config}
99
100# diag
101on property:sys.usb.config=diag
102 stop adbd
103 write /sys/class/android_usb/android0/enable 0
104 write /sys/class/android_usb/android0/idVendor 1004
105 write /sys/class/android_usb/android0/idProduct 631B
106 write /sys/class/android_usb/android0/bDeviceClass 239
107 write /sys/class/android_usb/android0/bDeviceSubClass 2
108 write /sys/class/android_usb/android0/bDeviceProtocol 1
109 write /sys/class/android_usb/android0/f_acm/acm_transports tty
110 write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
111 write /sys/class/android_usb/android0/functions acm,diag,mtp,adb
112 write /sys/class/android_usb/android0/enable 1
113 start adbd
114 setprop sys.usb.state ${sys.usb.config}
115
116on property:sys.usb.config=diag,adb
117 write /sys/class/android_usb/android0/enable 0
118 write /sys/class/android_usb/android0/idVendor 05C6
119 write /sys/class/android_usb/android0/idProduct 9025
120 write /sys/class/android_usb/android0/f_diag/clients diag
121 write /sys/class/android_usb/android0/f_serial/transports smd,tty
122 write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
123 write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
124 write /sys/class/android_usb/android0/enable 1
125 start adbd
126 setprop sys.usb.state $sys.usb.config
127
128on property:sys.usb.config=diag,mdm,adb
129 stop adbd
130 write /sys/class/android_usb/android0/enable 0
131 write /sys/class/android_usb/android0/idVendor 05C6
132 write /sys/class/android_usb/android0/idProduct 9031
133 write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
134 write /sys/class/android_usb/android0/f_serial/transports hsic,tty
135 write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
136 write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
137 write /sys/class/android_usb/android0/enable 1
138 start adbd
139 setprop sys.usb.state ${sys.usb.config}
140
141# Fusion 3 composition with diag_mdm and adb
142on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
143 write /sys/class/android_usb/android0/enable 0
144 write /sys/class/android_usb/android0/idVendor 05C6
145 write /sys/class/android_usb/android0/idProduct 9031
146 write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
147 write /sys/class/android_usb/android0/f_serial/transports hsic,tty
148 write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
149 write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
150 write /sys/class/android_usb/android0/enable 1
151 start adbd
152 setprop sys.usb.state ${sys.usb.config}