AdbPaste
uses the Android adb tool to send input. StdIn will be massaged to go trhu all the hops adb uses unchanged. Require python, but after that, it's as cross-platform as it goes, while using adb directly, you will have problems like not being able to send spaces in windows.
Install / Use
/learn @gcb/AdbPasteREADME
AdbPaste
uses the Android adb tool to send input. StdIn will be massaged to go trhu all the hops adb uses unchanged. Require python, but after that, it's as cross-platform as it goes, while using adb directly, you will have problems like not being able to send spaces in windows.

Usage
--help,-h Show usage information
--notab Changes tabs into single spaces
-s Serial number of the device adb should use. Analogous to -s flag of adb (use adb devices to see a list). Only needed if more than one device are available.
--file Next argument must be a filename. Content will be sent.
If --file is not used, all the next arguments will be sent. If no arguments are passed, input is read from stdin.
the problem
Can not use spaces in win32. Even with escaping.
C:\CODE\AdbPaste>adb shell input text "simple test"
Error: Invalid arguments for command: text
usage: input ...
input text <string>
input keyevent <key code number or name>
input [touchscreen|touchpad|touchnavigation] tap <x> <y>
input [touchscreen|touchpad|touchnavigation] swipe <x1> <y1> <x2> <y2> [d
uration(ms)]
input trackball press
input trackball roll <dx> <dy>
More on the above: https://web.archive.org/web/20210724065902/https://www.wietzebeukema.nl/blog/windows-command-line-obfuscation
Can not use bash keywords (i am sure i am using the word wrongly here), without escaping.
C:\CODE\AdbPaste>adb shell input text "simple("
/system/bin/sh: syntax error: '(' unexpected
Can not send a huge string as the emulator timesout and drop much of it.
Common solution to use a SMS and copy/paste is faster on an actual device, but less practical for running automated tests in the emulator. On automated tests it is easier to wait a few seconds than to deal with application switching and copy paste.
Solution
Converts all characters into hexadecimal interpretation using the bash $'\x00' string literal format. Additionally splits the string on % to prevent adb shell input from replacing %s by spaces.
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
