adb 控制手机动作

下载adb​​工具包,解压即可  https://download.csdn.net/download/kai402458953/10784310

各种事件说明:https://blog.csdn.net/jlminghui/article/details/39268419

连接USB,设置手机开发者选项,安装手机助手

cmd进入adb.exe的安装目录,执行以下命令

  1. adb kill-server  关闭adb服务

  2. adb start-server 开启adb服务

  3. adb devices  查看连接的设备

滑动

1.命令:adb input swipe 600 800 300 800(向右滑动)

2.命令:adb input swipe 300 800 600 800(向左滑动)

3.命令:adb input swipe 300 80 300 800(向下滑动)

扫描二维码关注公众号,回复: 4460691 查看本文章

4.命令:adb input swipe 300 800 300 80(向上滑动)

5.命令:adb input swipe 300 800 300 80 1000(向上滑动1000)

点击

此x、y坐标对应的是真实的屏幕分辨率,所以要根据具体手机具体看,比如你想点击屏幕(x, y) = (250, 250)位置:

adb shell input tap 250 250

adb shell input tap 600 600  点击商家位置(mt)

adb shell input keyevent 4    返回键

cmd /c  f:\\adb\\adb.exe shell input tap 500 500  运行cmd 执行指定文件夹下的命令

猜你喜欢

转载自blog.csdn.net/kai402458953/article/details/84066295