Type text
android_input_textTypes ASCII text into the focused input field on an Android device; optionally presses Enter. Rejects non-ASCII input and the literal '%s' to prevent corruption.
Instructions
Type text into the focused input field.
Two limitations come from Android's 'input text' command itself, not from this tool. Both are rejected up front with an explanation rather than silently mangling the text:
ASCII only. Korean, Japanese, Chinese, emoji and accented letters cannot be injected at all. Use an IME that accepts adb broadcasts (ADBKeyBoard is the usual one), or set the value directly in the app under test.
The literal sequence '%s' cannot be typed. Spaces are transmitted as '%s', and Android's decoder has no escape for a real one — even '%%s' decodes to '% '.
Tap the field first (android_tap) so it has focus.
Args:
text (string): ASCII text to type
serial (string, optional): target device
submit (boolean): press Enter afterwards (default: false)
Returns: { "typed": string, "submitted": boolean, "serial": string }
Examples:
Use when: filling a login form -> text="user@example.com"
Use when: entering a search term and running it -> text="pizza", submit=true
Don't use when: the text contains non-ASCII characters (see the limitation above)
Error Handling:
Rejects non-ASCII input, and text containing a literal '%s', with an explanation instead of mangling it
Text going nowhere means no field has focus; tap the field first
Text appended to existing content means the field was not empty; clear it first
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ASCII text to type. | |
| serial | No | Device serial from android_list_devices. Optional when exactly one device is connected; required when several are. | |
| submit | No | Press Enter after typing. |