1 # 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 15 on 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 20 on 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 26 on 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 18D1 30 write /sys/class/android_usb/android0/idProduct 4EE1 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 38 on property:sys.usb.config=mtp,adb 39 write /sys/class/android_usb/android0/enable 0 40 write /sys/class/android_usb/android0/idVendor 18D1 41 write /sys/class/android_usb/android0/idProduct 4EE2 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 51 on 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 18D1 55 write /sys/class/android_usb/android0/idProduct 4EE3 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 63 on property:sys.usb.config=rndis,adb 64 write /sys/class/android_usb/android0/enable 0 65 write /sys/class/android_usb/android0/idVendor 18D1 66 write /sys/class/android_usb/android0/idProduct 4EE4 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 76 on 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 18D1 80 write /sys/class/android_usb/android0/idProduct 4EE5 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 88 on property:sys.usb.config=ptp,adb 89 write /sys/class/android_usb/android0/enable 0 90 write /sys/class/android_usb/android0/idVendor 18D1 91 write /sys/class/android_usb/android0/idProduct 4EE6 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 101 on 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 116 on 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 128 on 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_serial/transport_names serial_hsic 136 write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic 137 write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic 138 write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage 139 write /sys/class/android_usb/android0/enable 1 140 start adbd 141 setprop sys.usb.state ${sys.usb.config} 142 143 # Fusion 3 composition with diag_mdm and adb 144 on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb 145 write /sys/class/android_usb/android0/enable 0 146 write /sys/class/android_usb/android0/idVendor 05C6 147 write /sys/class/android_usb/android0/idProduct 9031 148 write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm 149 write /sys/class/android_usb/android0/f_serial/transports hsic,tty 150 write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic 151 write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic 152 write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic 153 write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage 154 write /sys/class/android_usb/android0/enable 1 155 start adbd 156 setprop sys.usb.state ${sys.usb.config} 157