Modern Android smartphones and tablets use interactive low-power states to present glanceable information—such as notifications, time, battery level, and weather—while the device remains docked, charging, or locked. In the Android Open Source Project (AOSP) architecture, these low-power ambient visuals, interactive desk clock displays, and Always-On Display (AOD) features are handled by the DreamManagerService. When diagnosing battery drain during idle states, troubleshooting custom lock screen overlays, or auditing why an ambient display fails to engage or wake, Android Debug Bridge (ADB) provides direct access to the internal dream state machine through dumpsys dreams.
Android Dream Architecture and Ambient Display States
The Android dream framework coordinates between the PowerManagerService, the WindowManagerService, and registered dream components (implementations of android.service.dreams.DreamService). The service operates across distinct operational phases:
- Screen Saver (Standard Dream): Triggered when a device is docked or charging and reaches an inactivity timeout. The display remains active with standard brightness or interactive visuals (e.g. Google Photos screensavers or ambient clocks).
- Doze Mode (Ambient Display / AOD): A specialised dream state designed for OLED and AMOLED panels where the processor enters an ultra-low-power sleep state, and the display controller renders sparse monochrome UI elements at a low refresh rate (often 1 Hz to 30 Hz).
- Awakening: The state transition where user touch, device lift, or incoming high-priority notifications cause the dream service to exit and transition control back to the keyguard or active launcher.
Dumping the Current Dream Service State
To inspect the real-time operational status of the Dream Manager, connect your Android device with USB debugging enabled and execute the diagnostic dump via ADB:
# Dump the full DreamManagerService operational state
adb shell dumpsys dreams
The output provides an immediate snapshot of the active service state, registered components, and power dependencies:
mCurrentDream=DreamRecord{token=android.os.BinderProxy@2a7ef81, name=ComponentInfo{com.google.android.deskclock/com.android.deskclock.Screensaver}, isCanDoze=true, isDozing=true, userId=0}
mSentStartDreaming=true
mSentWakeUp=false
mDreamsEnabled=true
mAreDreamsSupported=true
mDreamToken=android.os.Binder@9c34f2d
mCurrentDreamComponentName=com.google.android.deskclock/com.android.deskclock.Screensaver
mCurrentDreamUser=0
mCurrentDreamIsTest=false
mCurrentDreamCanDoze=true
mCurrentDreamIsDozing=true
mCurrentDreamIsWaking=false
mCurrentDreamDozeScreenState=DOZE_SUSPEND
mCurrentDreamDozeScreenBrightness=10
Key Metrics in the dumpsys dreams Output
Auditing the output fields clarifies how the operating system handles ambient rendering and power conservation:
- mCurrentDream: Identifies the exact package and class handling the display. For example,
com.android.systemui/.doze.DozeServicerepresents the system ambient AOD engine. - mDreamsEnabled: Indicates whether screensavers and ambient features are enabled globally in system settings (
trueorfalse). - isCanDoze: Confirms whether the current dream service supports low-power panel dozing. If
false, the display will operate as a standard backlit screensaver rather than an energy-efficient AOD. - isDozing: Indicates whether the panel is currently operating in low-refresh, low-power doze mode.
- mCurrentDreamDozeScreenState: Displays the hardware panel state passed to the display subsystem, such as
DOZE(active scanning at low frequency) orDOZE_SUSPEND(display refreshed only on explicit CPU wake-up interrupts). - mCurrentDreamDozeScreenBrightness: The hardware backlight brightness level applied during ambient mode (typically scaled between 1 and 255).
Controlling and Testing Dream States via ADB Command Line
Rather than waiting for sleep timeouts or physical docking events, developers can trigger, test, and cancel dream transitions dynamically using the cmd dreams utility:
# Force the device to immediately enter its configured dream state
adb shell cmd dreams start-dream
# Force the device to awaken immediately from the dream state
adb shell cmd dreams awaken
# Check current command-line options supported by the dream service
adb shell cmd dreams help
Executing cmd dreams start-dream while monitoring adb logcat -s DreamManagerService reveals how the window manager manages surface layers and enforces keyguard security.
Auditing Dream Configuration in System Settings
System-level policies governing when and how dreams activate are persisted in Android’s Settings.Secure provider. Query these values to detect misconfigured timeouts or policy conflicts:
# Check whether screensavers are enabled (1 = enabled, 0 = disabled)
adb shell settings get secure screensaver_enabled
# Inspect which dream component is selected by default
adb shell settings get secure screensaver_components
# Check trigger policy (0 = while docked, 1 = while charging, 2 = either, 3 = never)
adb shell settings get secure screensaver_activate_on_dock
adb shell settings get secure screensaver_activate_on_sleep
# Check whether Ambient Display / Pick-up-to-wake is active
adb shell settings get secure doze_enabled
adb shell settings get secure doze_pulse_on_pick_up
adb shell settings get secure doze_pulse_on_double_tap
Troubleshooting Common Ambient Display and Dream Failures
When an Android device refuses to engage ambient display or drains excessive battery in standby, check the following diagnostic indicators:
- Conflicting Wakelocks: If a third-party application holds a partial power manager wakelock (
dumpsys power | grep -i wakelock), the system may prevent the display controller from entering theDOZE_SUSPENDstate. - Doze Screen State Stuck in ON: If
mCurrentDreamDozeScreenStatedisplaysONrather thanDOZEorDOZE_SUSPEND, the active dream component is preventing the hardware display driver from dropping its refresh rate, causing high battery consumption. - Low Battery Protection: When Android’s Battery Saver mode is active (
dumpsys power | grep -i "mIsPowered"), the dream manager automatically suppresses ambient display features regardless of user settings. - Proximity Sensor Masking: If the device is in a pocket or facing downwards, the sensor listener subsystem instructs
DozeServiceto turn off ambient rendering entirely to prevent accidental pocket interaction.