summaryrefslogtreecommitdiff
path: root/rootdir
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir')
-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}