Android classifies each installed app into one of five app standby buckets – Active, Working set, Frequent, Rare, and Restricted. The bucket determines how aggressively the system limits the app’s background work, network access, and battery usage. By default the OS moves apps between buckets based on usage patterns, but power‑hungry or mission‑critical apps sometimes benefit from a manual override.
Restricted reduces wake‑ups.Active keeps it responsive even when not in the foreground.am set-standby-bucket command requires the privileged permission android.permission.SET_STANDBY_BUCKET. On a stock, non‑rooted device you can only adjust buckets for your own debug builds.| Bucket | Typical Use‑Case | Background Limits |
|---|---|---|
| Active | App is in the foreground or a foreground service is running. | No restrictions. |
| Working set | App used frequently in the last few hours. | Limited background jobs; network access allowed. |
| Frequent | App used a few times a day. | Background jobs throttled; network access may be delayed. |
| Rare | App used once per day or less. | Background jobs heavily throttled; network may be blocked. |
| Restricted | App rarely used for weeks. | Background execution almost blocked; alarms may be delayed. |
adb devices
The command should list your device’s serial number followed by device. If you see unauthorized, check your phone for the RSA prompt and tap “Allow”.
You need the exact package name of the app you want to modify. Use one of the following methods:
id=.adb shell pm list packages | grep -i appnameadb shell dumpsys deviceidle | grep -i "Bucket" | grep com.example.app
If the command returns nothing, the app is in the default bucket based on usage. You can also use:
adb shell am get-standby-bucket com.example.app
Run the am set-standby-bucket command with the desired bucket value. Bucket values are numeric constants:
ACTIVEWORKING_SETFREQUENTRARERESTRICTEDExample – moving a fitness app to the ACTIVE bucket:
adb shell su -c "am set-standby-bucket com.fitapp.android 0"
If your device is rooted, the su -c wrapper grants the needed permission. On a userdebug build you can omit su and run the command directly.
adb shell am get-standby-bucket com.fitapp.android
The output should be the numeric value you set (e.g., 0 for ACTIVE).
To let the system manage the app again, move it back to the default bucket that matches its usage pattern. A safe choice is FREQUENT (value 20), which still allows background work but isn’t overly aggressive.
adb shell su -c "am set-standby-bucket com.fitapp.android 20"
ACTIVE while driving to keep GPS updates alive.WORKING_SET ensures timely push notifications without draining the battery.RARE or RESTRICTED to stop background sync.ACTIVE may increase battery drain and memory pressure, especially on low‑end devices.If you cannot obtain root, you can still influence bucket placement indirectly:
WORKING_SET.Manually setting Android app standby buckets with ADB gives you fine‑grained control over how the system treats background work. While the method requires root or a developer‑friendly build, it can be a valuable tool for power users and developers who need predictable behavior. Always test the impact on battery and performance, and revert to the default policy when you’re done.









