ADBSystemSafe
adb shell dumpsys battery set level <percentage>
Mock / simulate battery level for testing
What It Does
Overrides Android OS battery percentage reporter for testing low-battery notifications and power-saving modes.
Command Syntax
Terminal
$
adb shell dumpsys battery set level <0-100>Parameters & Placeholders Breakdown
This command syntax includes specific placeholder tokens. Below is an explanation of what each word represents and concrete real-world values to replace it with:
<0-100>0 100 ParameterReplace this placeholder with your specific 0 100 value.
Real-world value:your-0-100
Command syntax:
adb shell dumpsys battery set level your-0-100<percentage>PERCENTAGE ParameterReplace this placeholder with your specific percentage value.
Real-world value:your-percentage
Command syntax:
adb shell dumpsys battery set level <0-100>Usage Examples
$
adb shell dumpsys battery set level 5$
adb shell dumpsys battery set level 100$
adb shell dumpsys battery resetPrerequisites & Requirements
- Device connected
Related Commands
Found an error or missing flag for
adb shell dumpsys battery set level <percentage>?Submit a correction or request additional examples on GitHub.
Having issue? Contact @mkr_infinity
Direct technical assistance & ROM flashing troubleshooting by Mohammad Kaif Raja.