How to simulate low battery in Android devices

后端 未结 6 1844
独厮守ぢ
独厮守ぢ 2021-01-11 09:37

Can anyone tell me how can I simulate low battery in my rooted device?

I gone through this question but did not find much information on this.

6条回答
  •  星月不相逢
    2021-01-11 10:13

    Use the following commands

    To simulate the device being unplugged:

    adb shell dumpsys battery unplug
    

    To test how the device behaves under low power conditions:

    adb shell settings put global low_power 1
    

    Once you have finished your testing, you can undo your manual device settings with this command:

    adb shell dumpsys battery reset
    

提交回复
热议问题