summaryrefslogtreecommitdiffstats
path: root/rootdir/init.tuna.usb.rc
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir/init.tuna.usb.rc')
-rwxr-xr-xrootdir/init.tuna.usb.rc12
1 files changed, 12 insertions, 0 deletions
diff --git a/rootdir/init.tuna.usb.rc b/rootdir/init.tuna.usb.rc
index e86a7bd..57a27ef 100755
--- a/rootdir/init.tuna.usb.rc
+++ b/rootdir/init.tuna.usb.rc
@@ -8,6 +8,18 @@ on boot
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=charging
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04e8
+ write /sys/class/android_usb/android0/idProduct 4ee1
+ 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 adbd
+ setprop sys.usb.state ${sys.usb.config}
+
on property:sys.usb.config=mtp
write /sys/class/android_usb/android0/enable 0
write /sys/class/android_usb/android0/idVendor 04e8