Since Android 6.0 (Marshmallow) the OS has been classifying apps into standby buckets. The bucket determines how aggressively the system limits background work, network access, and wake‑locks for that app. An app in the ACTIVE bucket can run freely, while an app in RESTRICTED or NEVER gets very tight limits. Understanding these buckets helps you identify why a particular app is draining battery or why notifications are delayed.
Android also defines a special NEVER bucket for apps that the user has explicitly restricted (e.g., via battery‑optimization settings). The system may also place an app in RESTRICTED when power‑saving mode is on.
adb platform‑tools on your PC/Mac. No root is required for any step in this guide.The easiest way to see which bucket an app occupies is via ADB. You can also use third‑party apps that expose the same information, but ADB gives the most reliable result.
adb devices
You should see a line with your device’s serial number and the word device.com.example.app with the real package name):
adb shell dumpsys deviceidle get appstandby com.example.app
The output will be something like ACTIVE, WORKING_SET, etc.adb shell dumpsys deviceidle get appstandby
This prints a long list; you can pipe it to grep (Linux/macOS) or use findstr (Windows) to filter for a particular app.
If you don’t know the package name, you can retrieve it from the Play Store URL or via the Settings > Apps list – tap an app, scroll down to “App details in store”, and copy the part after id=.
Google does not provide a public UI to manually move apps between buckets – the system decides based on usage patterns. However, you can nudge the system by using a few safe techniques.
Simply opening the app, using a core feature, and then closing it will signal to Android that the app belongs in a higher bucket. For apps that you want to stay in ACTIVE or WORKING_SET, make it a habit to launch them at least once a day.
adb shell am set-inactive (Android 10+)Android 10 introduced a developer‑only command that can temporarily mark an app as inactive, which forces it into the RESTRICTED bucket. While this is intended for testing, you can also use the opposite – clearing the inactive flag – to move an app back to a higher bucket.
adb shell am set-inactive com.example.app false
WORKING_SET or higher.Warning: This command does not guarantee a permanent bucket change; the system may demote the app again if you stop using it.
When an app is placed in RESTRICTED because the user or the system has enabled battery optimisation, you can manually exempt it.
Exempting an app moves it out of the RESTRICTED bucket, but the system may still place it in RARE if you don’t use it often.
Some power users create a tiny foreground‑service app that simply starts a persistent notification. Adding the target app to the same notification channel can keep the OS thinking the app is active. This approach requires building a small APK and is beyond the scope of a no‑root guide, but it’s mentioned for completeness.
When you notice an app draining battery, follow this checklist to decide whether the bucket is the culprit and how to address it.
RARE or RESTRICTED but you use the app daily, it likely means Android hasn’t registered the usage correctly (e.g., you open it only via a deep link).adb shell am set-inactive … false to clear any stale inactive flag.For users who prefer a GUI, several free apps on the Play Store can display standby buckets without root:
These apps internally call the same ADB‑style commands, so the data is identical. They can be handy if you don’t want to keep a computer nearby.
This usually means the computer is not authorized for USB debugging. Re‑connect the cable, watch for the prompt on the phone, and tap Allow. If the prompt never appears, toggle “USB debugging” off and on again.
Bucket promotion only relaxes background limits. If the app itself performs heavy work (e.g., constant GPS, video playback, or frequent sync), you’ll need to address those behaviours directly – turn off background sync, reduce location accuracy, or limit push notifications.
Older Android versions (< 6.0) do not expose the standby‑bucket API. In that case you cannot query the bucket, and the OS uses a simpler “Doze” model. Consider upgrading the device or focusing on classic battery‑optimization steps (disable background data, limit wake‑locks).
If you are a developer or comfortable with scripting, you can embed the bucket query into a small shell script that logs changes over time. Example (Linux/macOS):
#!/bin/bash
while true; do
adb shell dumpsys deviceidle get appstandby > /tmp/buckets.txt
sleep 3600 # log every hour
done
This creates a simple timeline you can later analyze to see how your usage patterns affect bucket placement.
ACTIVE or WORKING_SET.am set-inactive trick only when you need an immediate promotion.RESTRICTED throttling.By understanding how Android’s App Standby Buckets work and applying the practical steps above, you can take control of background restrictions, reduce unexpected battery drain, and keep your favorite apps responsive.









