buttons

 

adb Concepts-How to Check/Change Battery Health, Level and Status via ADB Commands

  1. adb shell dumpsys battery
  2. adb shell dumpsys battery set level <value>
  3. adb shell dumpsys battery reset
  4. adb shell dumpsys battery set status<n>

Please go through the below video for complete details:

Summary:

  1. adb shell dumpsys battery
  2. adb shell dumpsys battery set level <value>
  3. adb shell dumpsys battery reset
  4. 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