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}