From e5a2a1d2ffc9f609adcc2cccf80ecd29d11a54cb Mon Sep 17 00:00:00 2001 From: Kun Liang Date: Tue, 4 Mar 2014 17:40:52 +0800 Subject: [PATCH] USB: add charging only mode for usb config "Charging only" mode has nothing exported. It only supports charging under this mode. Change-Id: Idc38a0176170763cba3f72392df83ee9a4ad5450 --- rootdir/etc/init.qcom.usb.rc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rootdir/etc/init.qcom.usb.rc b/rootdir/etc/init.qcom.usb.rc index bd2d93f4..92418455 100644 --- a/rootdir/etc/init.qcom.usb.rc +++ b/rootdir/etc/init.qcom.usb.rc @@ -731,3 +731,15 @@ on property:sys.usb.config=ncm,adb write /sys/class/android_usb/android0/enable 1 start adbd setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=charging + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/functions charging + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config} + +on property:sys.usb.config=charging,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/functions charging + write /sys/class/android_usb/android0/enable 1 + setprop sys.usb.state ${sys.usb.config}