Python或Java执行adb shell input swipe出现错误

论坛 期权论坛 脚本     
匿名技术用户   2021-1-5 16:57   11   0

1.在确保adb成功连接后

2.检查android系统版本

android 5.0以下版本的swipe命令应该没有duration 这个参数。可使用cmd 确认,检查swipe 是否有 duration 这个参数:

adb shell input swipe -h

若没有则去掉这个参数,只保留start point(x,y) 和 end point(x,y)

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> [duration(ms)]
input trackball press
input trackball roll <dx> <dy>

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP