Get Device Logs
mobile_get_device_logsCapture live Android logcat or iOS unified logs as JSON lines to debug app behavior. Filter by process, tag, or level; set a small limit or save large captures to a file.
Instructions
Collect live device logs (logcat on Android, unified log on iOS) as one JSON object per line. Only logs emitted after the call starts are captured, so trigger the behavior you want to observe right before or during the call. Stops after limit entries or after 30 seconds of silence. Each line of a stack trace counts as one entry, so filter by process or tag to avoid filling the limit with noise. Start with a small limit (20-50) for a quick look. For large captures, pass saveTo to write logs to a file and only the entry count is returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Stop after this many log entries | |
| device | Yes | The device identifier to use. Use mobile_list_available_devices to find which devices are available to you. | |
| filter | No | Filters, ANDed together. key=value includes, key!=value excludes. Keys: pid, process, tag, level, subsystem, category, message. Example: ["tag=ActivityManager", "level=Error", "process!=SpringBoard"] | |
| saveTo | No | Path to write the logs to instead of returning them. Filename must end with .log, .txt, or .jsonl |