android_devtools_evaluate
Evaluate a JavaScript expression in the context of a page running on the device via CDP. Enables Runtime, then calls Runtime.evaluate. Returns the result value, any exception details, and pageId/pageUrl identifying the tab it actually ran on — check those if a result looks like it came from the wrong page. Omit pageId to auto-select the active tab (after a navigate, that is the tab the navigate landed on).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Device serial number (UDID) | |
| pageId | No | Target page id from android_devtools_list_pages (auto-picked when omitted) | |
| socket | No | Abstract unix socket name (default: chrome_devtools_remote) | |
| expression | Yes | JavaScript expression to evaluate | |
| awaitPromise | No | Whether to await a returned Promise (default: true) | |
| returnByValue | No | Return the result as a serializable value (default: true) |