Skip to content

Instantly share code, notes, and snippets.

@sermuns
Last active December 2, 2025 18:47
Show Gist options
  • Select an option

  • Save sermuns/941f7eec18355fa9c8506e7c36e83a57 to your computer and use it in GitHub Desktop.

Select an option

Save sermuns/941f7eec18355fa9c8506e7c36e83a57 to your computer and use it in GitHub Desktop.
Check Android battery health with ADB
  1. On the device, enable USB debugging (in developer options).

  2. Connect device to computer via USB.

  3. Run the following on computer:

adb shell awk '"BEGIN{print $(cat /sys/class/power_supply/battery/charge_full) / $(cat /sys/class/power_supply/battery/charge_full_design)}"'
  1. The number printed is the quotient between the reported current max charge and designed max charge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment