ubuntu linux通过adb命令行"复制粘贴"内容到android

假如你像我一样在寻找android下通过命令复制粘贴的方法,来对地方了,不过android上是没有直接进行复制粘贴剪切板的命令,只有间接实现:在电脑上直接adb输入信息到android设备上

首先android设备上,要把光标焦点定位到需要输入的文本框,比如当你输入用户名密码的时候
电脑上adb连接好android设备
电脑上执行adb命令如下,比如你的用户名是hello,密码是world
adb shell input text hello
#输入tab键定位到下一输入框,tab键的key code是61 --> "KEYCODE_TAB"
adb shell input keyevent 61
#然后输入密码
adb shell input text world
#回车确认登录,回车键的key code是66
adb shell input keyevent 66


扩展阅读,假如你的密码比较复杂有但引号之类,比如为 wor"ld
adb shell input text wor\\\"ld


参考:[url]http://blog.rungeek.com/post/42456936947/sending-keyboard-input-via-adb-to-your-android-device[/url]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值