app_state
Check app runtime state to diagnose ignored JS edits. Reports install/run status, foreground activity, Metro vs embedded bundle, dev server, and stale verdict with source_path.
Instructions
Report an app's RUNTIME state: installed?, running?, foreground?, top activity, pid(s), main-process uptime, install/update times, and — for React Native/Expo — whether it is serving a live METRO bundle or its baked-in EMBEDDED one. When it is on Metro it also identifies WHICH dev server: port, pid, and the project root that server is running in. That matters because "metro" does not mean the RIGHT metro — a dev server left running from another checkout still holds port 8081, so the app connects happily and runs that branch's code while this call looks healthy. Pass source_path to get an explicit stale_verdict (stale | current | undetermined) with its reason, never silence. Run this FIRST when JS edits seem to have no effect.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| package | Yes | Application package name. | |
| source_path | No | Optional host file or directory containing the app's source. When supplied, app_state ALWAYS returns a stale_verdict (stale | current | undetermined) with the reason — it compares the newest source mtime against the latest Metro/HMR marker, and checks that the dev server the app is connected to is rooted in this same checkout. |