Understanding Android Battery Optimization: How It Works and How to Manage Exceptions

12 min read Learn how Android's battery optimization works, why apps get restricted, and step‑by‑step ways to whitelist or adjust settings without rooting. October 04, 2026 21:00 Understanding Android Battery Optimization: How It Works and How to Manage Exceptions

Android’s battery optimization is designed to stretch every percent of charge, but the same feature can also cause apps to stop working in the background, miss notifications, or even crash. This guide explains the core mechanisms behind Android’s adaptive battery, how the system decides which apps to limit, and provides safe, step‑by‑step methods to manage exceptions – both through the UI and with ADB – without rooting your device.

Why Android Restricts Apps in the First Place

Since Android 6.0 (Marshmallow) Google introduced Doze and App Standby. Their goal is simple: when the device is idle, keep the CPU and network asleep unless a high‑priority task needs attention. Starting with Android 9 (Pie), Adaptive Battery adds machine‑learning predictions to limit power‑hungry apps based on your usage patterns.

  • Doze activates after the device has been motionless, screen‑off, and unplugged for a few hours. It batches network syncs and defers background jobs.
  • App Standby puts individual apps into a sleep state when they haven’t been used for a while, regardless of the device’s overall idle state.
  • Adaptive Battery ranks apps into buckets (e.g., foreground, active, working_set, frequent, restricted) and throttles CPU/network for lower‑ranked buckets.

These mechanisms are great for most users, but they can be frustrating when a messaging app stops delivering messages or a fitness tracker fails to log steps. Knowing how to view the current state and how to create exceptions is essential for a smooth experience.

Before You Start

  • Make sure your phone is charged to at least 30 % or plugged into power.
  • Connect to a stable Wi‑Fi network if you plan to download ADB tools.
  • Back up any critical data – especially if you will use ADB to change system settings.
  • Enable Developer options (Settings > About phone > Tap Build number seven times).
  • Install the Android Platform‑Tools package on your computer.

Checking Which Apps Are Optimized

Android provides a quick visual overview of the battery‑optimization status for each installed app.

  1. Open Settings → Battery → Battery usage (or Battery > Battery usage on some OEM skins).
  2. Tap the three‑dot menu (⋮) and select Battery optimization. If you don’t see this option, look for Advanced > Battery optimization.
  3. By default the list shows Not optimized apps. Change the filter to All apps to see every installed package.
  4. Each entry will display either Optimized or Not optimized. Tapping an app opens a dialog where you can toggle its status.

On devices with heavy OEM customizations (e.g., Samsung, Xiaomi), the path may differ slightly: Settings > Device care > Battery > App power management, or Settings > Battery > App launch.

Method 1 – Whitelisting an App via the UI

This is the safest and most universal method. It works on all Android versions that support battery optimization (6.0+).

  1. Follow the steps in the previous section to open the Battery optimization screen.
  2. Select the app you want to exempt.
  3. Choose Don’t optimize and tap Done.

After you confirm, the system will no longer place the app into Doze or App Standby. The change takes effect immediately, but some apps may need a restart to recognize the new status.

Method 2 – Using ADB to Whitelist Multiple Apps Quickly

If you have several apps to exempt (e.g., a messenger, a VPN, a health tracker), typing each one through the UI can be tedious. ADB lets you script the changes.

You do not need root access to run the commands below; the device only needs to allow USB debugging.
  1. Connect your Android device to the computer via USB.
  2. Open a terminal (Command Prompt, PowerShell, or a Linux shell) and verify the connection:
    adb devices
    You should see your device’s serial number listed as device.
  3. Run the following command for each package you want to exempt (replace com.example.app with the actual package name):
    adb shell cmd appops set com.example.app RUN_IN_BACKGROUND allow
    adb shell cmd appops set com.example.app AUTO_REVOKE_PERMISSIONS ignore
    The first line tells Android to let the app run background services; the second prevents the system from automatically revoking permissions for that app.
  4. Optionally, you can batch‑process a list. Create a text file whitelist.txt with one package name per line, then run:
    while read pkg; do adb shell cmd appops set $pkg RUN_IN_BACKGROUND allow; done < whitelist.txt
  5. Disconnect the USB cable. The changes persist across reboots.

Why this works: The appops command modifies the App Ops database, which sits underneath the battery‑optimization UI. It is a low‑level way to achieve the same result without navigating menus.

Method 3 – Disabling Adaptive Battery for Specific Apps (Android 9+)

Adaptive Battery works at the bucket level, but you can move an app to a higher bucket by marking it as “Unrestricted”. This is done through the Settings > Battery > Battery usage screen.

  1. Open Settings → Battery → Battery usage.
  2. Tap the three‑dot menu and select Show full device usage if needed.Find the app you want to prioritize and tap it.
  3. Toggle Unrestricted (or “Allow background activity”) on.

This tells the system to treat the app as a foreground or active bucket, which effectively disables the throttling that Adaptive Battery would otherwise apply.

Special Cases: OEM‑Specific Power Management

Many manufacturers ship their own power‑saving layers that sit on top of Android’s native optimization. They often have aggressive kill‑lists that ignore the standard whitelist.

  • Samsung: Settings > Battery and device care > Battery > App power management. Turn off “Put unused apps to sleep”. Then add the desired apps to the “Never sleeping apps” list.
  • Xiaomi (MIUI): Settings > Battery & performance > Battery saver > Choose apps > Never for the apps you trust.
  • OnePlus (OxygenOS): Settings > Battery > Battery optimization > All apps > Select your app > Don’t optimize.

When you encounter unexpected battery‑drain despite whitelisting, double‑check these OEM panels because they can override the standard Android settings.

Troubleshooting Common Issues

1. The app still doesn’t receive push notifications

  • Verify that the app’s own notification settings are enabled (Settings > Apps > App > Notifications).
  • Check if a third‑party “Battery saver” or “Task killer” app is active; disable it.
  • On Android 13+, ensure the app has the POST_NOTIFICATIONS runtime permission.

2. ADB reports Permission denied for appops

  • Make sure USB debugging is enabled (Settings > Developer options > USB debugging).
  • On some devices, you must also enable “Allow ADB debugging” when the phone prompts you after connection.
  • If the device is running Android 12+ with the “ADB security” toggle, turn it off temporarily.

3. After whitelisting, battery usage shows the app as “restricted”

  • Force‑stop the app (Settings > Apps > App > Force stop) then launch it again.
  • Re‑open the Battery optimization screen to confirm the status changed.
  • Some OEM skins require a reboot for the new policy to take effect.

Best‑Practice Checklist

  • Only whitelist trusted apps. Unrestricted background activity can drain battery quickly.
  • Periodically review the whitelist (every 2–3 months) to remove apps you no longer need.
  • Combine whitelisting with Android’s built‑in Battery usage graphs to spot any outliers.
  • If you notice a sudden spike, check for recent OS updates that may have reset optimization settings.
  • For developers: use adb shell dumpsys batterystats --checkin to see per‑app power consumption.

When to Consider Turning Off Adaptive Battery Entirely

Disabling Adaptive Battery (Settings > Battery > Adaptive Battery) is a blunt instrument that can improve performance for power‑hungry apps but will reduce overall battery life. Reserve this for devices with very large batteries (e.g., 5000 mAh+) or for users who prioritize constant background sync over endurance.

Summary

Android’s battery optimization is a layered system that balances power savings with app functionality. By understanding Doze, App Standby, and Adaptive Battery, you can make informed decisions about which apps truly need an exemption. The UI method is simple and safe for occasional tweaks; ADB gives you a fast, repeatable way to whitelist many apps at once; and OEM‑specific panels must be checked on heavily skinned devices. Follow the checklist, keep your whitelist tight, and you’ll enjoy reliable background behavior without sacrificing the battery life Android promises.

User Comments (0)

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