Problem
There is no dedicated tool for managing the Android input method (IME/keyboard). This is a critical pre-flight check — android_type relies on ADBKeyboard (com.android.adbkeyboard/.AdbIME) for Unicode input, but if the IME is disabled or not set as default, typing silently fails or falls back to the hardware keyboard with broken Unicode handling.
Currently the only way to manage this is raw adb shell ime commands via android_shell, which:
- Requires the operator to know the exact IME ComponentName strings
- Has no guardrails or validation
- Is not documented as a required pre-flight step in any skill
- Silently breaks typing flows when ADBKeyboard gets unset (OEM updates, reboots, package manager clearing defaults)
Proposed tool: android_ime
Actions
list — List all installed IMEs with enabled/disabled status (ime list -s + ime list -s -a)
state — Return the current default input method (settings get secure default_input_method) + whether ADBKeyboard is enabled and set as default
enable — Enable an IME by ComponentName (ime enable <cn>). Shortcuts: adbkeyboard auto-resolves to the full CN
disable — Disable an IME by ComponentName (ime disable <cn>)
set — Set the default IME (ime set <cn>). This is the most common operation — switching to ADBKeyboard before a typing session
ensure — Convenience: checks if ADBKeyboard is the current default; if not, enables + sets it. Returns the previous default so it can be restored later. This should be the recommended pre-flight call
Key parameters
component (string, optional): Full ComponentName (e.g., com.android.adbkeyboard/.AdbIME) or a shortcut alias (adbkeyboard, gboard, swiftkey)
restore (boolean, optional): For set/ensure — if true, also save the previous default IME so a later restore can switch back
Shortcut aliases
To avoid requiring the operator to memorize ComponentNames, the tool should ship with a built-in alias map:
{
"adbkeyboard": "com.android.adbkeyboard/.AdbIME",
"gboard": "com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME",
"samsung": "com.samsung.android.honeyboard/.HoneyboardInputMethodService"
}
Users can extend this with a config file or the tool can auto-discover installed IMEs and fuzzy-match.
Why this matters
- Pre-flight critical: Before any
android_type call, the agent should verify ADBKeyboard is active. Without this tool, there is no clean way to do it.
- Unicode correctness:
android_type uses ADBKeyboard for Unicode text injection. If the wrong IME is active, emoji, accented characters, and non-Latin scripts break silently.
- Session hygiene: After automation, the operator often wants to restore the original keyboard so the phone is usable normally again. The
ensure/restore pattern handles this.
- Discovery: The
list action makes it obvious what keyboards are available without shelling out to adb shell ime list -s -a.
Suggested skill update
The android-device-basics skill should be updated to include an IME pre-flight section:
Before any android_type call, call android_ime action=ensure component=adbkeyboard. This is especially important after device reboots, app updates, or package manager operations that may reset IME defaults.
Priority
High. This is a silent failure mode that breaks one of the most fundamental primitives (android_type) with no diagnostic feedback. Every flow that types text is affected.
Problem
There is no dedicated tool for managing the Android input method (IME/keyboard). This is a critical pre-flight check —
android_typerelies on ADBKeyboard (com.android.adbkeyboard/.AdbIME) for Unicode input, but if the IME is disabled or not set as default, typing silently fails or falls back to the hardware keyboard with broken Unicode handling.Currently the only way to manage this is raw
adb shell imecommands viaandroid_shell, which:Proposed tool:
android_imeActions
list— List all installed IMEs with enabled/disabled status (ime list -s+ime list -s -a)state— Return the current default input method (settings get secure default_input_method) + whether ADBKeyboard is enabled and set as defaultenable— Enable an IME by ComponentName (ime enable <cn>). Shortcuts:adbkeyboardauto-resolves to the full CNdisable— Disable an IME by ComponentName (ime disable <cn>)set— Set the default IME (ime set <cn>). This is the most common operation — switching to ADBKeyboard before a typing sessionensure— Convenience: checks if ADBKeyboard is the current default; if not, enables + sets it. Returns the previous default so it can be restored later. This should be the recommended pre-flight callKey parameters
component(string, optional): Full ComponentName (e.g.,com.android.adbkeyboard/.AdbIME) or a shortcut alias (adbkeyboard,gboard,swiftkey)restore(boolean, optional): Forset/ensure— if true, also save the previous default IME so a laterrestorecan switch backShortcut aliases
To avoid requiring the operator to memorize ComponentNames, the tool should ship with a built-in alias map:
{ "adbkeyboard": "com.android.adbkeyboard/.AdbIME", "gboard": "com.google.android.inputmethod.latin/com.android.inputmethod.latin.LatinIME", "samsung": "com.samsung.android.honeyboard/.HoneyboardInputMethodService" }Users can extend this with a config file or the tool can auto-discover installed IMEs and fuzzy-match.
Why this matters
android_typecall, the agent should verify ADBKeyboard is active. Without this tool, there is no clean way to do it.android_typeuses ADBKeyboard for Unicode text injection. If the wrong IME is active, emoji, accented characters, and non-Latin scripts break silently.ensure/restorepattern handles this.listaction makes it obvious what keyboards are available without shelling out toadb shell ime list -s -a.Suggested skill update
The
android-device-basicsskill should be updated to include an IME pre-flight section:Priority
High. This is a silent failure mode that breaks one of the most fundamental primitives (
android_type) with no diagnostic feedback. Every flow that types text is affected.