summaryrefslogtreecommitdiff
path: root/rootdir/init.sony.usb.rc
diff options
context:
space:
mode:
authorDavid Viteri <davidteri91@gmail.com>2015-05-15 09:13:37 +0200
committerChirayu Desai <chirayudesai1@gmail.com>2015-05-25 17:13:42 +0530
commitdcc52fea6feadf946d0541265648987e2379b2b6 (patch)
treec56e77c0d1fcde1afa109bf71988bf6d789adc9d /rootdir/init.sony.usb.rc
parentfb9160e8011827b5914b3c6cc35b70e3fbfd379e (diff)
shinano: init: create common usb.rc
Following AOSP https://github.com/sonyxperiadev/device-sony-shinano/blob/master/rootdir/init.shinano.usb.rc Change-Id: I2cf6613e0aa887755da8061a3a7fea7b08b4b946 Signed-off-by: David Viteri <davidteri91@gmail.com>
Diffstat (limited to 'rootdir/init.sony.usb.rc')
-rw-r--r--rootdir/init.sony.usb.rc96
1 files changed, 96 insertions, 0 deletions
diff --git a/rootdir/init.sony.usb.rc b/rootdir/init.sony.usb.rc
new file mode 100644
index 0000000..d83cf69
--- /dev/null
+++ b/rootdir/init.sony.usb.rc
@@ -0,0 +1,96 @@
+# Copyright 2012 The Android Open Source Project
+# Copyright (C) 2015 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+on init
+ write /sys/class/android_usb/android0/f_rndis/manufacturer Sony
+ write /sys/class/android_usb/android0/f_rndis/vendorID 0fce
+ write /sys/class/android_usb/android0/f_rndis/wceis 1
+
+on boot
+ write /sys/class/android_usb/android0/iSerial ${ro.serialno}
+ write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer}
+ write /sys/class/android_usb/android0/iProduct ${ro.product.model}
+
+on property:sys.usb.config=mtp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 0FCE
+ write /sys/class/android_usb/android0/idProduct 0${ro.usb.pid_suffix}
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ write /sys/class/android_usb/android0/bDeviceSubClass 0
+ write /sys/class/android_usb/android0/bDeviceProtocol 0
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ stop adb
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 0FCE
+ write /sys/class/android_usb/android0/idProduct 5${ro.usb.pid_suffix}
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ write /sys/class/android_usb/android0/bDeviceSubClass 0
+ write /sys/class/android_usb/android0/bDeviceProtocol 0
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 0FCE
+ write /sys/class/android_usb/android0/idProduct 7${ro.usb.pid_suffix}
+ write /sys/class/android_usb/android0/bDeviceClass 239
+ write /sys/class/android_usb/android0/bDeviceSubClass 2
+ write /sys/class/android_usb/android0/bDeviceProtocol 1
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ stop adb
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 0FCE
+ write /sys/class/android_usb/android0/idProduct 8${ro.usb.pid_suffix}
+ write /sys/class/android_usb/android0/bDeviceClass 239
+ write /sys/class/android_usb/android0/bDeviceSubClass 2
+ write /sys/class/android_usb/android0/bDeviceProtocol 1
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 0FCE
+ write /sys/class/android_usb/android0/idProduct 9${ro.usb.pid_suffix}
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ write /sys/class/android_usb/android0/bDeviceSubClass 0
+ write /sys/class/android_usb/android0/bDeviceProtocol 0
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ stop adb
+ setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp,adb
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 0FCE
+ write /sys/class/android_usb/android0/idProduct A${ro.usb.pid_suffix}
+ write /sys/class/android_usb/android0/bDeviceClass 0
+ write /sys/class/android_usb/android0/bDeviceSubClass 0
+ write /sys/class/android_usb/android0/bDeviceProtocol 0
+ write /sys/class/android_usb/android0/functions ${sys.usb.config}
+ write /sys/class/android_usb/android0/enable 1
+ start adbd
+ setprop sys.usb.state ${sys.usb.config}