Can you use ADB to type directly on an android device from a computer? If so, how?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
As Manuel said, you can use
adb shell input text
, but you need to replace spaces with%s
, as well as handle quotes. Here's a simple bash script to make that very easy:Save as, say,
atext
and make executable. Then you can invoke the script without quotes......unless you need to send quotes, in which case you do need to put them between the other type of quotes (this is a shell limitation):
To avoid expansion/evaluation of the text parameter (i.e. for special characters like '$' or ';'), you could wrap them into quotes like this:
Although this question is rather old, I'd like to add this answer:
You may use
adb shell input keyevent KEYCODE
resp.adb shell input text "mytext"
. A list of all keycodes can be found hereYou can see how it's done in talkmyphone.
They are using
Jabber
, but it might be useful for you.