How to Inspect App Slices and Interactive UI Templates on Android Using ADB dumpsys slice

Modern mobile operating systems increasingly present app functionality outside the primary app sandbox. In Android, rather than launching an application full-screen to execute a simple task—such as toggling Wi-Fi, booking a ride, adjusting smart home thermostat temperatures, or pausing music playback—system surfaces like Google Assistant, Google Search, and Android Settings display interactive, modular UI components called Android Slices. Slices allow third-party and system applications to export live, rich templates (containing buttons, sliders, dynamic icons, and pending intents) that execute seamlessly within host surfaces. Using the Android Debug Bridge (ADB), mobile developers and UI engineers can query dumpsys slice to audit slice providers, debug URI permissions, and inspect live slice binding states.

Understanding Android Slice Architecture and Hosting

The Android Slices framework operates through a secure provider-host interaction model:

  • Slice Provider: An application implementing a SliceProvider (built on Android ContentProvider architecture). The provider defines structured UI templates and maps them to content URIs (e.g., content://com.example.app/slices/temperature).
  • Slice Host (Surface): System applications authorized to display slices—such as Google Assistant, Google Quick Search Box, or Android Settings.
  • Template Primitives: Slices are constructed using standardized, responsive layouts (List, Grid, Range/Slider, Action Toggle) that automatically adapt their typography, dark mode styling, and touch boundaries to fit the hosting surface.
  • SliceManager System Service: The background service (slice) that manages provider registrations, enforces URI-level read/write permissions, caches remote view structures, and dispatches interaction callbacks.

Connecting via ADB and Querying dumpsys slice

To inspect active slice architecture on your Android device, enable USB Debugging under Developer Options and query the service:

# Check device connection
adb devices

# Execute the slice service dump
adb shell dumpsys slice

The output returns registered slice providers, granted URI permissions, and active slice binding contexts.

Auditing Registered Slice Providers

To identify which installed applications currently expose interactive slice endpoints to the operating system, filter the service dump:

# Inspect registered slice providers and authority mappings
adb shell dumpsys slice | grep -i -A 10 "Providers:"

Each entry reveals:

  • Authority: The content URI authority used to locate the slice (e.g., com.google.android.settings.slices).
  • Target Package: The application package implementing the slice provider.
  • Process: The background Linux process hosting the slice component.

Inspecting Slice URI Permissions and Access Grants

Because slices can expose sensitive user information or trigger real-world actions (such as paying an invoice or unlocking a door), Android enforces strict URI permissions between slice providers and hosting apps:

# Inspect granted slice URI permissions across applications
adb shell dumpsys slice | grep -A 15 "Permissions:"

The permissions table records:

  • URI: The exact content URI granted (e.g., content://com.example.smarthome/thermostat).
  • Granted To UID: The process identifier of the host application (e.g., Google Assistant).
  • Permission Flags: Indicates whether read or write access is granted.

Debugging Slice Binding and Interactions via Logcat

When developing a custom SliceProvider, UI rendering glitches or null template exceptions frequently occur during remote binding. To trace slice requests in real time:

  1. Trigger a slice interaction (such as querying an action in Android Settings search).
  2. Monitor the SliceManager and SliceProvider tags in logcat:
# Filter logcat for slice binding and interaction events
adb logcat -s SliceManager:V SliceProvider:V SliceView:D

Logcat logs slice lifecycle events:

SliceManager: Binding slice URI: content://com.example.media/now_playing
SliceProvider: onBindSlice returned template with 2 actions
SliceView: Rendered Range/Slider template in host container

Simulating Slice Interactions via ADB Content Queries

You can query slice providers directly from ADB shell using the content tool to verify that the provider responds with valid Cursor/Bundle structures without launching a visual surface:

# Query a slice provider URI directly
adb shell content query --uri content://com.android.settings.slices/action/wifi

The output prints the underlying bundle metadata, confirming that the provider successfully serializes its interactive state.

Evaluating Slice Security and Auto-Revocation

If an application attempts to access a slice without holding the required content provider permissions, Android’s SliceManager automatically blocks the transaction and logs a security violation:

# Check for security exceptions or unauthorized slice binding attempts
adb logcat -s SliceManager:W | grep -i "permission"

In enterprise-managed devices (Work Profiles), slice sharing between work and personal profiles is strictly segregated to prevent corporate data leakage into personal search surfaces.

Querying adb shell dumpsys slice equips Android developers and system architects with full transparency into modular UI hosting, guaranteeing secure, responsive, and reliable interactive templates across system surfaces.

Get the best tech tips delivered straight to your inbox.

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