blob: 02c2d3b72cfde670ecb25cf98fa3be3ce7140280 [file] [log] [blame]
Sungmin Choicb14b4d2012-07-05 19:07:56 -07001# Copyright 2012 The Android Open Source Project
Iliyan Malchevfefe23c2012-06-08 10:36:25 -07002#
Sungmin Choicb14b4d2012-07-05 19:07:56 -07003# 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.
Iliyan Malchevfefe23c2012-06-08 10:36:25 -070014
Devin Kim9e777042012-08-03 16:18:22 -070015on 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
Devin Kim3a2ad102012-06-28 08:27:19 -070020on boot
Devin Kim9e777042012-08-03 16:18:22 -070021 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
Iliyan Malchev75efd292013-03-14 16:09:52 -070024 write /sys/module/rmnet_usb/parameters/rmnet_data_init 1
Devin Kim47123b92012-07-30 12:04:11 -070025
Devin Kim9e777042012-08-03 16:18:22 -070026# MTP
27on property:sys.usb.config=mtp
28 stop adbd
29 write /sys/class/android_usb/android0/enable 0
30 write /sys/class/android_usb/android0/idVendor 18D1
31 write /sys/class/android_usb/android0/idProduct 4EE1
32 write /sys/class/android_usb/android0/bDeviceClass 0
33 write /sys/class/android_usb/android0/bDeviceSubClass 0
34 write /sys/class/android_usb/android0/bDeviceProtocol 0
35 write /sys/class/android_usb/android0/functions mtp
36 write /sys/class/android_usb/android0/enable 1
37 setprop sys.usb.state $sys.usb.config
38
39on property:sys.usb.config=mtp,adb
40 write /sys/class/android_usb/android0/enable 0
41 write /sys/class/android_usb/android0/idVendor 18D1
42 write /sys/class/android_usb/android0/idProduct 4EE2
43 write /sys/class/android_usb/android0/bDeviceClass 0
44 write /sys/class/android_usb/android0/bDeviceSubClass 0
45 write /sys/class/android_usb/android0/bDeviceProtocol 0
46 write /sys/class/android_usb/android0/functions mtp,adb
47 write /sys/class/android_usb/android0/enable 1
48 start adbd
49 setprop sys.usb.state $sys.usb.config
50
51# rndis
52on property:sys.usb.config=rndis
53 stop adbd
54 write /sys/class/android_usb/android0/enable 0
55 write /sys/class/android_usb/android0/idVendor 18D1
56 write /sys/class/android_usb/android0/idProduct 4EE3
57 write /sys/class/android_usb/android0/bDeviceClass 239
58 write /sys/class/android_usb/android0/bDeviceSubClass 2
59 write /sys/class/android_usb/android0/bDeviceProtocol 1
60 write /sys/class/android_usb/android0/functions rndis
61 write /sys/class/android_usb/android0/enable 1
62 setprop sys.usb.state $sys.usb.config
63
64on property:sys.usb.config=rndis,adb
65 write /sys/class/android_usb/android0/enable 0
66 write /sys/class/android_usb/android0/idVendor 18D1
67 write /sys/class/android_usb/android0/idProduct 4EE4
68 write /sys/class/android_usb/android0/bDeviceClass 239
69 write /sys/class/android_usb/android0/bDeviceSubClass 2
70 write /sys/class/android_usb/android0/bDeviceProtocol 1
71 write /sys/class/android_usb/android0/functions rndis,adb
72 write /sys/class/android_usb/android0/enable 1
73 start adbd
74 setprop sys.usb.state $sys.usb.config
75
76# PTP
77on property:sys.usb.config=ptp
78 stop adbd
79 write /sys/class/android_usb/android0/enable 0
80 write /sys/class/android_usb/android0/idVendor 18D1
81 write /sys/class/android_usb/android0/idProduct 4EE5
82 write /sys/class/android_usb/android0/bDeviceClass 0
83 write /sys/class/android_usb/android0/bDeviceSubClass 0
84 write /sys/class/android_usb/android0/bDeviceProtocol 0
85 write /sys/class/android_usb/android0/functions ptp
86 write /sys/class/android_usb/android0/enable 1
87 setprop sys.usb.state $sys.usb.config
88
89on property:sys.usb.config=ptp,adb
90 write /sys/class/android_usb/android0/enable 0
91 write /sys/class/android_usb/android0/idVendor 18D1
92 write /sys/class/android_usb/android0/idProduct 4EE6
93 write /sys/class/android_usb/android0/bDeviceClass 0
94 write /sys/class/android_usb/android0/bDeviceSubClass 0
95 write /sys/class/android_usb/android0/bDeviceProtocol 0
96 write /sys/class/android_usb/android0/functions ptp,adb
97 write /sys/class/android_usb/android0/enable 1
98 start adbd
99 setprop sys.usb.state $sys.usb.config
100
101# diag
102on property:sys.usb.config=diag
103 stop adbd
104 write /sys/class/android_usb/android0/enable 0
105 write /sys/class/android_usb/android0/idVendor 1004
106 write /sys/class/android_usb/android0/idProduct 631B
107 write /sys/class/android_usb/android0/bDeviceClass 239
108 write /sys/class/android_usb/android0/bDeviceSubClass 2
109 write /sys/class/android_usb/android0/bDeviceProtocol 1
Devin Kimafed4262013-02-01 08:47:20 -0800110 write /sys/class/android_usb/android0/f_acm/acm_transports hsic
Devin Kim9e777042012-08-03 16:18:22 -0700111 write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
112 write /sys/class/android_usb/android0/functions acm,diag,mtp,adb
113 write /sys/class/android_usb/android0/enable 1
114 start adbd
115 setprop sys.usb.state $sys.usb.config
116
117on property:sys.usb.config=diag,adb
118 stop adbd
119 write /sys/class/android_usb/android0/enable 0
120 write /sys/class/android_usb/android0/idVendor 1004
121 write /sys/class/android_usb/android0/idProduct 631B
122 write /sys/class/android_usb/android0/bDeviceClass 239
123 write /sys/class/android_usb/android0/bDeviceSubClass 2
124 write /sys/class/android_usb/android0/bDeviceProtocol 1
Devin Kimafed4262013-02-01 08:47:20 -0800125 write /sys/class/android_usb/android0/f_acm/acm_transports hsic
Devin Kim9e777042012-08-03 16:18:22 -0700126 write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
127 write /sys/class/android_usb/android0/functions acm,diag,mtp,adb
128 write /sys/class/android_usb/android0/enable 1
129 start adbd
130 setprop sys.usb.state $sys.usb.config