Simulating Battery Levels with Android Developer Options

9 min read Learn step‑by‑step how to enable Developer Options on Android and use the battery level simulation feature to test apps under low‑power conditions without draining your device. September 26, 2026 15:00 How to Simulate Battery Levels Using Android Developer Options

Why Simulate Battery Levels?

When you develop or test Android applications, understanding how your app behaves as the battery drains is crucial. Real‑world users often experience low‑battery conditions that can affect performance, background processing, and UI responsiveness. Manually discharging a device to reach a specific level is time‑consuming and can wear the battery. Android’s Developer Options include a hidden feature that lets you simulate any battery percentage instantly, making testing fast and repeatable.

Prerequisites

  • An Android phone or tablet running Android 7.0 (Nougat) or newer. The feature is available on most stock Android builds and many OEM skins.
  • Basic familiarity with the Settings menu.
  • If you plan to test how your app reacts to low‑power mode, ensure the device is not already in a power‑saving state.

Step 1 – Enable Developer Options

Developer Options are hidden by default to prevent accidental changes. Follow these steps to reveal them:

  1. Open Settings on your device.
  2. Scroll down and tap About phone (or About tablet).
  3. Locate Build number. Tap it seven times. You may be prompted to enter your lock screen PIN or pattern.
  4. After the seventh tap, a toast message will appear: “You are now a developer!”
  5. Return to the main Settings screen. You will now see a new entry called Developer options (usually just above “System” or “About phone”).

Step 2 – Access the Battery Level Simulation

The battery simulation is part of the “Debugging” section inside Developer Options. Here’s how to find it:

  1. Open Settings → Developer options.
  2. Scroll down to the Debugging subsection.
  3. Locate the toggle labeled Simulate battery level. The exact wording can vary (e.g., “Battery level simulation”).
    • On some devices the option is hidden behind a three‑dot overflow menu. Tap the menu and enable “Show hidden options”.
  4. Turn the switch ON. A slider will appear, allowing you to set a percentage from 0 % to 100 %.

Step 3 – Choose a Battery Level to Simulate

With the slider visible, you can now pick any level you need for testing:

  • Drag the slider to the desired percentage, e.g., 15 % to emulate a critically low battery.
  • The system UI will immediately reflect the chosen level. The status bar icon changes to the simulated percentage, and the underlying battery stats are overridden.
  • If you need to test multiple levels, simply adjust the slider and observe the app’s response each time.

Step 4 – Verify the Simulation

To ensure the simulation is active, you can check the following:

  1. Pull down the notification shade. The battery icon should display the exact percentage you set.
  2. Open Settings → Battery. The battery usage chart will show the simulated level as the current charge.
  3. If you have a debugging console (ADB), run adb shell dumpsys battery. The output’s level field will match the simulated value.

Step 5 – Test Your App Under Simulated Conditions

Now that the device reports a low battery, you can observe how your app behaves. Common scenarios to test include:

  • Background restrictions: Does the app pause heavy tasks when the battery is low?
  • Network usage: Does the app defer non‑essential sync operations?
  • UI feedback: Does the app display a warning or adapt its theme for power saving?
  • Battery‑optimizing APIs: Are JobScheduler or WorkManager jobs deferred correctly?

Use Android Studio’s Logcat or your own logging to capture any deviations. If you notice unexpected behavior, you can adjust your code and re‑run the simulation without waiting for the battery to drain naturally.

Step 6 – Turn Off Simulation When Finished

Leaving the simulation on can confuse other users of the device. To revert to the real battery level:

  1. Return to Settings → Developer options → Simulate battery level.
  2. Toggle the switch OFF. The slider disappears and the device resumes reporting its actual charge.
  3. Optionally, you can disable Developer Options entirely by toggling the master switch at the top of the screen. This step is not required but can be a good habit for shared devices.

Additional Tips and Gotchas

  • Do not rely on the simulation for power‑consumption measurements. The feature only changes the reported level; it does not affect actual power draw. For accurate power profiling, use Battery Historian or a hardware power meter.
  • Some OEM customizations hide the option. If you cannot find “Simulate battery level”, check the device’s developer forums. Certain manufacturers (e.g., some Chinese brands) may disable the feature in their skins.
  • Battery‑saver mode interaction. When the simulated level falls below the threshold you set for Battery Saver, the OS will automatically enable the saver mode. This can be useful to test saver‑mode‑specific code paths.
  • Impact on notifications. Android may suppress non‑essential notifications when the simulated battery is low, mirroring real‑world behavior.
  • Security note. Enabling Developer Options grants access to powerful debugging tools. Avoid leaving it enabled on devices that are used by others, especially if you enable USB debugging.

Using ADB for Remote Simulation (Optional)

If you prefer not to touch the device’s UI, you can control the simulation via ADB. This is handy for automated test suites.

# Enable the simulation (replace 20 with the desired percentage)
adb shell dumpsys battery set level 20
# Verify the change
adb shell dumpsys battery | grep level
# Reset to real battery level
adb shell dumpsys battery reset

Note that the dumpsys battery set command requires root access on most production devices. On a development phone with an unlocked bootloader, you can grant the necessary permissions or use a custom recovery that provides su.

When Not to Use Battery Simulation

While the feature is convenient, there are scenarios where it should be avoided:

  • Testing hardware‑dependent power‑saving features such as adaptive brightness that relies on actual sensor readings.
  • Measuring battery life expectancy for a release‑candidate build. Real discharge curves are required.
  • End‑user troubleshooting. Simulated levels can mislead a user who thinks the device is actually low on charge.

Conclusion

Simulating battery levels through Android’s Developer Options is a quick, low‑risk way to verify how your app reacts to low‑power conditions. By following the steps above you can enable the feature, set any desired charge percentage, and test background restrictions, network throttling, UI warnings, and more—all without draining the real battery. Remember to turn the simulation off after testing and keep Developer Options disabled on devices that are not dedicated to development.

User Comments (0)

Add Comment
We'll never share your email with anyone else.