Skip to content

Embedded Agent — Runtime

Deep runtime introspection powered by an in-process agent library. These tools communicate directly with the running app over ADB — no reflection hacks, no logcat scraping.


List all permissions declared in the manifest and their current grant status at runtime.

What to ask your AI:

  • “which permissions are granted?”
  • “is camera permission allowed?”
  • “show me the permission state”

Parameters

NameTypeRequiredDefaultDescription
device_idstringNoauto-selectADB device serial

Tips

  • Useful for debugging flows that silently fail because a required permission was not granted during testing — e.g. location, notifications, or camera.

Return the current lifecycle state of each Activity and Fragment in the process.

What to ask your AI:

  • “what lifecycle state is the Activity in?”
  • “is the app in the foreground?”
  • “show all Activity lifecycle states”

Parameters

NameTypeRequiredDefaultDescription
device_idstringNoauto-selectADB device serial

Tips

  • A common diagnostic for “why doesn’t my observer fire?” — if the lifecycle owner is in CREATED rather than STARTED, LiveData and repeatOnLifecycle blocks will not emit.

Dump the Navigation component graph and current back stack, including arguments on each entry.

What to ask your AI:

  • “show the navigation graph”
  • “what’s the current route?”
  • “show the back stack”

Parameters

NameTypeRequiredDefaultDescription
device_idstringNoauto-selectADB device serial

Tips

  • The back stack snapshot includes SavedStateHandle arguments — useful for verifying that deep-link parameters were parsed correctly.
  • If the app uses multiple NavController instances (e.g. bottom-nav tabs), all are reported.

Read all key-value pairs from every DataStore preferences file in the app’s data directory.

What to ask your AI:

  • “what’s in DataStore?”
  • “show the user preferences”
  • “read the onboarding_complete flag from DataStore”

Parameters

NameTypeRequiredDefaultDescription
device_idstringNoauto-selectADB device serial

Tips

  • For SharedPreferences (not DataStore) use cp_get_feature_flags on the Device Inspection page.
  • Values are returned with their Protobuf or Preferences DSL types intact (boolean, string, int, etc.).

List all active coroutines in the process, grouped by scope, with their current state and stack trace.

What to ask your AI:

  • “show active coroutines”
  • “are there any stuck coroutines?”
  • “what coroutines are running right now?”

Parameters

NameTypeRequiredDefaultDescription
device_idstringNoauto-selectADB device serial

Tips

  • Requires the app to be built with kotlinx-coroutines-debug on the classpath (included transitively by the agent library in debug builds).
  • Look for coroutines in SUSPENDED state on a network dispatcher for longer than expected — a common sign of a missed timeout or a stuck retry loop.

Fire a deep-link URI at the running app via an intent.

What to ask your AI:

  • “fire deep link myapp://profile/123”
  • “navigate to the checkout screen via deep link”
  • “test the deep-link URI myapp://reset-password?token=abc”

Parameters

NameTypeRequiredDefaultDescription
uristringYesThe deep-link URI to fire (e.g. myapp://profile/123)
device_idstringNoauto-selectADB device serial

Tips

  • Equivalent to adb shell am start -a android.intent.action.VIEW -d "<uri>" but with automatic package targeting so the intent always lands in the correct app.
  • Combine with cp_take_device_screenshot immediately after to confirm the target screen rendered.

Kill the app process and relaunch it to verify that saved state and DataStore persistence survive a process death.

What to ask your AI:

  • “simulate process death”
  • “test state restoration after process kill”
  • “kill and relaunch the app”

Parameters

NameTypeRequiredDefaultDescription
device_idstringNoauto-selectADB device serial
package_namestringNoauto-detectApp package to kill; auto-detected from the project if omitted

Tips

  • This is the correct way to test rememberSaveable and SavedStateHandle — pressing the back button destroys the Activity but does not kill the process.
  • After relaunch, follow up with cp_inspect_navigation_graph to confirm the back stack was restored to the expected destination.