adb_shell_write
Send a command to an active ADB shell session, with an option to clear the output buffer before collecting results. Use sequentially per session to avoid output corruption.
Instructions
Send a command to an ADB shell session. Do NOT call this concurrently with adb_shell_exec/adb_shell_read 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 before collecting, 0 = append to buffer | |
| command | Yes | The command to send to the shell | |
| session_id | Yes | The session ID returned by adb_shell_open |