How to disable battery charging during ADB connection?

后端 未结 5 1498
暖寄归人
暖寄归人 2021-02-03 12:31

Problem description: Each time wen I connect USB cable between PC and my mobile phone the battery automatically is charged. I want to use ADB protocol but I don\'t want to charg

5条回答
  •  一整个雨季
    2021-02-03 12:43

    Try this for rooted device:

    To enable battery Charging:

        adb shell dumpsys battery set ac 1
        adb shell dumpsys battery set usb 1
        adb shell dumpsys battery set wireless 1
    

    To disable battery Charging:

        adb shell dumpsys battery set ac 0
        adb shell dumpsys battery set usb 0
        adb shell dumpsys battery set wireless 0
    

提交回复
热议问题