Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to set battery % in android mobile using adb command?

If suppose 40% battery is available in my android device, what is the adb command to set the battery % to 30? Using adb command can set battery % only to lower level / higher level also?

like image 598
RVR Avatar asked Apr 23 '18 13:04

RVR


2 Answers

You can use following command:

adb shell dumpsys battery set level 30

like image 188
Sagar Avatar answered Sep 19 '22 11:09

Sagar


Use the following command:

adb shell dumpsys battery set level 30

And use this to reset the level:

adb shell dumpsys battery reset

like image 37
Mrinmoy Haloi Avatar answered Sep 21 '22 11:09

Mrinmoy Haloi