summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaio Schnepper <caioschnepper@gmail.com>2015-10-06 09:12:25 -0300
committerCaio Schnepper <caioschnepper@gmail.com>2015-10-06 09:12:25 -0300
commit6a549eb6b6e910f7dbffa51a52ccf841c0aabd03 (patch)
tree31a6ada7394cf3046c0d34ae66ad8e887f6f4a65
parent8e740553768bb7ca136c1db8397066b206921ddd (diff)
downloaddevice_samsung_galaxys2-common-6a549eb6b6e910f7dbffa51a52ccf841c0aabd03.zip
device_samsung_galaxys2-common-6a549eb6b6e910f7dbffa51a52ccf841c0aabd03.tar.gz
device_samsung_galaxys2-common-6a549eb6b6e910f7dbffa51a52ccf841c0aabd03.tar.bz2
Add USB charging config
Change-Id: I76c997990ef2ad6250ab0f0210ac37569898374c
-rw-r--r--rootdir/init.smdk4210.usb.rc9
1 files changed, 9 insertions, 0 deletions
diff --git a/rootdir/init.smdk4210.usb.rc b/rootdir/init.smdk4210.usb.rc
index 7545695..aee84ed 100644
--- a/rootdir/init.smdk4210.usb.rc
+++ b/rootdir/init.smdk4210.usb.rc
@@ -87,3 +87,12 @@ on property:sys.usb.config=mass_storage,adb
write /sys/class/android_usb/android0/enable 1
start adbd
setprop sys.usb.state $sys.usb.config
+
+on property:sys.usb.config=charging
+ stop adbd
+ write /sys/class/android_usb/android0/enable 0
+ write /sys/class/android_usb/android0/idVendor 04e8
+ write /sys/class/android_usb/android0/idProduct 6866
+ write /sys/class/android_usb/android0/functions charging
+ write /sys/class/android_usb/android0/enable 1
+ setprop sys.usb.state ${sys.usb.config}