Manually Set Android App Standby Buckets with ADB

6 min read Learn how to change Android app standby buckets using ADB commands to control background restrictions and improve battery life. September 26, 2026 00:30 How to Manually Set Android App Standby Buckets with ADB

What Are App Standby Buckets?

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.

Why Adjust Buckets Manually?

  • Improved battery life: Moving rarely used apps to Restricted reduces wake‑ups.
  • Better performance for essential apps: Placing a navigation or health app in Active keeps it responsive even when not in the foreground.
  • Testing and development: Developers can simulate different background‑restriction scenarios without waiting for the OS to re‑bucket.

Prerequisites

  1. ADB installed on your computer (Windows, macOS, or Linux). You can download the platform‑tools package from the Android developer site.
  2. USB debugging enabled on the device (Settings → About phone → Tap “Build number” seven times, then Settings → System → Developer options → Enable “USB debugging”).
  3. Root access or a userdebug build if you want to change buckets for third‑party apps. The 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.

Understanding the Bucket Values

BucketTypical Use‑CaseBackground Limits
ActiveApp is in the foreground or a foreground service is running.No restrictions.
Working setApp used frequently in the last few hours.Limited background jobs; network access allowed.
FrequentApp used a few times a day.Background jobs throttled; network access may be delayed.
RareApp used once per day or less.Background jobs heavily throttled; network may be blocked.
RestrictedApp rarely used for weeks.Background execution almost blocked; alarms may be delayed.

Step‑by‑Step Guide

1. Verify ADB Connection

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”.

2. Identify the Package Name

You need the exact package name of the app you want to modify. Use one of the following methods:

  • From Play Store URL – the part after id=.
  • Via ADB: adb shell pm list packages | grep -i appname

3. Check the Current Bucket

adb 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

4. Change the Bucket (Root / Userdebug Required)

Run the am set-standby-bucket command with the desired bucket value. Bucket values are numeric constants:

  • 0 – ACTIVE
  • 10 – WORKING_SET
  • 20 – FREQUENT
  • 30 – RARE
  • 40 – RESTRICTED

Example – 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.

5. Verify the Change

adb shell am get-standby-bucket com.fitapp.android

The output should be the numeric value you set (e.g., 0 for ACTIVE).

6. Revert If Needed

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"

Practical Use Cases

  • Navigation apps: Set to ACTIVE while driving to keep GPS updates alive.
  • Messaging apps: WORKING_SET ensures timely push notifications without draining the battery.
  • Games you rarely play: Move to RARE or RESTRICTED to stop background sync.

Risks and Compatibility Notes

  • Root requirement: Without root or a userdebug build, the command will fail with a security exception.
  • System stability: Forcing an app into ACTIVE may increase battery drain and memory pressure, especially on low‑end devices.
  • Future Android versions: Google may tighten the permission model, making manual bucket changes harder.
  • App‑specific behavior: Some apps ignore the bucket and manage their own background tasks; changing the bucket won’t affect them.

Alternative Approaches (No Root)

If you cannot obtain root, you can still influence bucket placement indirectly:

  1. Open the app frequently – the OS will promote it to a higher bucket automatically.
  2. Use the “Battery optimization” screen (Settings → Battery → Battery optimization) and set the app to “Not optimized”. This tells the system to treat the app more like WORKING_SET.
  3. Enable “Allow background activity” in the app’s permission screen.

Summary

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.

User Comments (0)

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