summaryrefslogtreecommitdiffstats
path: root/rootdir
diff options
context:
space:
mode:
authorZiyan <jaraidaniel@gmail.com>2015-05-08 23:57:40 +0200
committerZiyan <jaraidaniel@gmail.com>2015-05-08 23:57:40 +0200
commit542f1d5d04d38122bee4ce5ecc19f547b37d23cc (patch)
treea041c9fd48025811628a12edf394822f3f78164b /rootdir
parentf27610481b44e155d866a19fa63b89972ceb5acb (diff)
downloaddevice_samsung_tuna-542f1d5d04d38122bee4ce5ecc19f547b37d23cc.zip
device_samsung_tuna-542f1d5d04d38122bee4ce5ecc19f547b37d23cc.tar.gz
device_samsung_tuna-542f1d5d04d38122bee4ce5ecc19f547b37d23cc.tar.bz2
Add charge-only mode
Change-Id: I4fbbc086e0f01001cecd764b7a726787bb41a4dc
Diffstat (limited to 'rootdir')
-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