ui-input

Focus Android input fields and type ASCII or Unicode text via adb and uiautomator.

10|2|Updated Jul 9, 2026
One-click install
npx skills add https://github.com/xvxv-stack7/android-claude-agent --skill ui-input-xvxv-stack7
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ui-input
Source: https://github.com/xvxv-stack7/android-claude-agent/tree/main/skills/ui-input
Command: npx skills add https://github.com/xvxv-stack7/android-claude-agent --skill ui-input-xvxv-stack7

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Android's adb shell input text command only supports ASCII characters, so typing Chinese or emoji throws a NullPointerException, and text often lands in the wrong place when no input field is focused. This Skill locates and focuses the active input field first, then routes text through the correct input path automatically. ## Core Features & Use Cases - Input Field Discovery & Focus: Parses the uiautomator UI tree to find the focused=true node (falling back to EditText class elements) and taps it before typing. - Unicode/Chinese Input: Routes non-ASCII text through the ADBKeyBoard virtual keyboard using base64 broadcasts, then automatically restores the user's original input method. - Element Search: Finds on-screen controls by text, content-description, or resource-id and returns their tap coordinates. - Use Case: While automating a chat app on your phone, ask the AI to type "你好,晚上见" into the message box — the Skill focuses the field, switches to ADBKeyBoard, sends the Chinese text, and switches back to your normal keyboard. ## Quick Start Ask the AI to type "你好 Hello" into the currently focused input field on the phone screen.

Frequently Asked Questions about ui-input

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I type Chinese text with adb input text?▼

adb input text only supports ASCII and throws NullPointerException for Chinese. The standard workaround is installing the open-source ADBKeyBoard virtual keyboard and sending text via an `am broadcast -a ADB_INPUT_B64` base64 broadcast, which this script automates.

How to focus an Android input field before typing via adb?▼

Dump the UI tree with uiautomator, find the node with focused=true (or an EditText class as fallback), compute its center coordinates from the bounds attribute, and run `input tap x y`. The script performs this discovery and tap automatically before typing.

Does this work without root or a PC connection?▼

Yes. It runs entirely on the phone using either the adb TCP loopback at 127.0.0.1:5555 or Shizuku's rish shell, preferring rish and falling back to adb. Python 3 with only the standard library is required.

Why does input field detection fail on WeChat or Flutter apps?▼

Black-box apps like WeChat, some WebViews, and Flutter do not expose their widget tree to uiautomator, so no input field node can be read. In that case you must fall back to screenshot-based visual coordinate location instead of tapping blindly.

Does typing Unicode change my default keyboard permanently?▼

No. The script records the current default input method before switching to ADBKeyBoard and restores it immediately after sending the text. Pure ASCII input never touches the IME setting at all.