adb_shell_read
Retrieve command output from an existing ADB shell session using its session ID, clearing the buffer after read to prevent stale data. Avoid concurrent calls to ensure output integrity.
Instructions
Read output from an ADB shell session. Do NOT call this concurrently with adb_shell_exec/adb_shell_write on the same session_id — concurrent access to the same ADB shell corrupts the output buffer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Buffer clear flag: 1 (default) = clear buffer after reading, 0 = keep buffer | |
| session_id | Yes | The session ID returned by adb_shell_open |