1# Copyright 2013 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 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 38on 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 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 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 63on 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 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 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 88on 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 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 61F1 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 smd 110 write /sys/class/android_usb/android0/f_diag/clients diag 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 stop adbd 118 write /sys/class/android_usb/android0/enable 0 119 write /sys/class/android_usb/android0/idVendor 1004 120 write /sys/class/android_usb/android0/idProduct 61F1 121 write /sys/class/android_usb/android0/bDeviceClass 239 122 write /sys/class/android_usb/android0/bDeviceSubClass 2 123 write /sys/class/android_usb/android0/bDeviceProtocol 1 124 write /sys/class/android_usb/android0/f_acm/acm_transports smd 125 write /sys/class/android_usb/android0/f_diag/clients diag 126 write /sys/class/android_usb/android0/functions acm,diag,mtp,adb 127 write /sys/class/android_usb/android0/enable 1 128 start adbd 129 setprop sys.usb.state ${sys.usb.config} 130