adb shell am broadcast -a ADB_INPUT_TEXT –es msg “你好嗎! Hello!”
Here is the github project: https://github.com/senzhk/ADBKeyBoard
Hope this little project would help.
Some useful extensions for comfortable usage:
Switch to ADBKeyBoard from adb:
adb shell ime set com.android.adbkeyboard/.AdbIME
Check your available le virtual keyboards:
ime list -a
Use simple quote characters -not double as in example above- if your shell not accepts “!” (explanation sign)
adb shell am broadcast -a ADB_INPUT_TEXT –es msg ‘Accented characters here’
Switch back to original virtual keyboard: (swype in my case…)
adb shell ime set com.nuance.swype.dtc/com.nuance.swype.input.IME
Use adb over wifi to simplify your life… :)