adb Concepts-How to Check/Change Battery Health, Level and Status via ADB Commands
- adb shell dumpsys battery
- adb shell dumpsys battery set level <value>
- adb shell dumpsys battery reset
- adb shell dumpsys battery set status<n>

Please go through the below video for complete details:
Summary:
In this article, we are going to discussion following cases.
- adb shell dumpsys battery
- adb shell dumpsys battery set level <value>
- adb shell dumpsys battery reset
- adb shell dumpsys battery set status<n>
Case-1: To Check Battery Health, Capacity, and Charge Cycle:
Code:
adb shell dumpsys battery
Usage & Output:

Case-2: To Settings Battery Custom Level using ADB:
Code:
adb shell dumpsys battery set level <value>
Usage & Output:

Case-3: To reset the battery level to the original:
Code:
adb shell dumpsys battery reset
Usage & Output:

Case-4: To change battery status of device:
Note: Value can be 0 to 3 which relates to status
1- unknown,
2 — charging
3- discharging
4 — not charging
5 — fully charged
Code:
adb shell dumpsys battery set status<n>
Usage & Output:

GitHub Link:
No comments:
Post a Comment