How to Inspect Smartspace Targets and Contextual Cards on Android Using ADB dumpsys smartspace

On modern Android devices, the home screen and lockscreen provide real-time proactive information—such as upcoming flight departure gates, live sports scores, weather warnings, calendar appointments, and commute duration alerts. In Android 12, 13, and 14+, these contextual cards are managed by the platform Smartspace system framework. Governed by the com.android.server.smartspace system service and displayed via the “At a Glance” UI component, Smartspace aggregates predictive telemetry from system providers, calendar databases, and third-party apps. When debugging why an At a Glance card fails to appear, auditing contextual card expiry times, or inspecting Smartspace target listeners, developers can query the architecture using Android Debug Bridge (ADB). This article explains how to inspect Smartspace sessions, registered targets, contextual card payloads, and listener callbacks using adb shell dumpsys smartspace.

Understanding Android Smartspace Architecture and Contextual Targets

The Android Smartspace framework operates as a publisher-subscriber pipeline designed to deliver high-priority contextual cards to the user interface with minimal latency and battery impact:

  • Smartspace Sessions: Client UI surfaces (such as the default Launcher home screen, the Keyguard lockscreen, and the Always-on-Display ambient screen) create individual Smartspace sessions bound to unique surface IDs.
  • Contextual Targets: Each informative item (such as a calendar reminder or package delivery alert) is represented as a SmartspaceTarget object containing metadata, text strings, icon drawables, priority weighting, and expiration timestamps.
  • Smartspace Providers: Background system intelligence services—such as Google Play Services or OEM contextual prediction engines—evaluate user context (location, calendar, device motion) and publish updated target lists into the service.
  • Lifecycle and Expiration: Every target carries strict valid time windows. Once an event finishes (e.g. a meeting concludes or rain stops), the service automatically prunes the expired target and notifies listening UI surfaces.

Connecting to ADB and Querying dumpsys smartspace

To inspect Smartspace internals, enable Developer Options and USB debugging on your Android device, connect it to your computer, and verify authorization with adb devices. Then execute the service dump:

adb shell dumpsys smartspace

To save the diagnostics for detailed inspection or filtering, redirect the terminal output to a text file:

adb shell dumpsys smartspace > smartspace_diagnostics.txt

If executed on a bare AOSP build or older device lacking the Smartspace architecture, the command returns Service smartspace does not exist.

Inspecting Active Smartspace Sessions and Client Surfaces

At the top of the dumpsys smartspace output, inspect the active sessions established by client UI surfaces:

adb shell dumpsys smartspace | grep -A 12 "SmartspaceManagerService:"

Review the session parameters:

  • SessionId: A unique string identifier representing the active client connection (e.g. homescreen_10214, lockscreen_1000).
  • Client Package & UID: Identifies the application process hosting the Smartspace UI surface (typically com.google.android.apps.nexuslauncher for the home screen or com.android.systemui for the lockscreen).
  • SmartspaceConfig: Specifies surface attributes, including the maximum number of targets allowed and supported feature flags.

Auditing Active Smartspace Targets and Contextual Cards

The core of the telemetry details the actual contextual cards currently published into the framework. To inspect all active targets, query the target table:

adb shell dumpsys smartspace | grep -A 25 "SmartspaceTarget:"

A representative Smartspace target dump reveals structured information as follows:

SmartspaceTarget:
  id: weather_update_card_01
  headerAction: Weather in London, 18°C
  baseAction: intent=intent:#Intent;component=com.google.android.apps.weather/.MainActivity;end
  featureCategory: 1 (FEATURE_WEATHER)
  creationTimeMillis: 1712574000000
  expiryTimeMillis: 1712581200000
  score: 0.85

Understanding each target property clarifies how Android prioritizes content:

  • id: The unique string identifier assigned to this contextual card by the publisher.
  • headerAction / title: The visible headline text rendered in the At a Glance widget.
  • baseAction: The intent triggered when the user taps on the widget card (e.g. launching the calendar, weather app, or flight tracker).
  • featureCategory: The categorized type of notification (e.g. FEATURE_WEATHER, FEATURE_CALENDAR, FEATURE_COMMUTE_TIME, FEATURE_FLIGHT).
  • expiryTimeMillis: The epoch timestamp at which the card becomes invalid and is purged from the display.
  • score: The computed relevance score (from 0.0 to 1.0) determining which card is displayed when multiple events overlap.

Monitoring Target Listener Callbacks and Updates

To verify that client UI components are actively receiving real-time updates when new targets are generated, inspect the listener registration section:

adb shell dumpsys smartspace | grep -A 10 "mListeners:"

Confirm that listeners from SystemUI (lockscreen) and the Launcher remain connected. If listeners are missing, UI surfaces will fail to update dynamically, leaving stale cards visible even after events have passed.

Real-Time Tracing with Logcat

To observe cards being pushed, updated, and dismissed live—for example, when a calendar notification approaches—filter logcat output alongside the dump:

adb logcat -s SmartspaceManagerService:V SmartspaceService:V

Reviewing dumpsys smartspace provides Android engineers and UI designers with complete diagnostic visibility into the At a Glance pipeline, ensuring predictive contextual cards appear reliably and dismiss cleanly.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.