adb shell input keyevent 224 # 点亮屏幕 adb shell input keyevent 223 # 熄灭屏幕 # 点击屏幕 adb shell input tap <X> <Y> # x,y为坐标位置 # 滑屏 起始点x坐标 起始点y坐标 结束点x坐标 结束点y坐标。 adb shell input swipe 300 1000 300 500 # 向上滑动 adb shell input swipe 300 100 30...
它们可以在一定程度上替代ADB命令的功能。 尝试替代命令:如果input swipe失效,可以使用类似的命令如input touch来实现操作。 以下是一个使用adb shell input swipe的基本示例: adb shell input swipe3001000300500500 1. 以上命令的意义是从坐标(300, 1000)滑动到坐标(300, 500),持续时间为500毫秒。 如果上述命令无效...
rem 执行滑动操作 adb shell input swipe%startX%%startY%%endX%%endY%rem 等待一段时间 timeout/t2/nobreak>nul rem 检查是否还能继续滑动set/a checkY=startY-500adb shell input swipe%startX%%startY%%endX%%checkY%timeout/t2/nobreak>nul adb shell dumpsys input_method|findstr/c:"mInputShown=false"...
adb = 'adb shell input swipe %s %s %s %s '%(x,y,x1,y1) os.popen(adb) # 模拟按键 def keyevent(self,k): adb = 'adb shell input keyevent %s'%k os.popen(adb) if __name__ == '__main__': adb = input() adb.text(1111) adb.swipe(280,720,280,240) adb.keyevent(3) PS:...
如上,input后可以跟很多参数, text相当于输入内容,keyevent相当于手机物理或是屏幕按键,tap相当于touch事件,swipe相当于滑动。下面我们来学习相应的用法。 1、input text用法 [plain]view plaincopy C:\Documents and Settings\Administrator>adb shell [email protected]_66t_l1:/ $ input text OuyangPeng ...
input [touchscreen|touchpad] tap <x> <y> input [touchscreen|touchpad] swipe <x1> <y1> <x2> <y2> input trackball press input trackball roll <dx> <dy>1. adb shell input text向文本框中输入文本,如将光标定位到一个输入框后执行下面的命令:adb shell input text bcoder.com 1 adb shell in...
adb shell 命令 pm(包管理系列命令) am 系列:控制应用 input 系列,向安卓设备发送按键事件 screencap截图录像系列 uiautomator 获取当前界面的控件信息 ime 输入法系列: wm 获取设备分辨率 monkey :发送伪随机用户事件流 settings 更改系统设置中的参数 4. ADB查看设备信息–完整版 ...
二、input tap 作用:点击屏幕上的坐标 用法:adb shell input tap <int> <int> tap后输入位置的坐标 例如:点击屏幕上坐标为500,500的点 命令:adb shell input tap 500 500 运行结果: 原来的界面: 运行后的界面: 三、input swipe 作用:在屏幕上滑动 ...
input swipe模拟的是滑动事件,input swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen),需要将起始的坐标传进去。 如下面代码,将会向左滑动 [plain]view plaincopy shell@lentk6735_66t_l1:/ $ input swipe 600 800 300 800 ...
3. adb shell input touchscreen swipe命令中各个参数的含义和示例 坐标(<x1> <y1> 和<x2> <y2>): 这些参数指定了滑动操作的起始点和结束点在屏幕上的位置。坐标值基于屏幕的左上角为原点(0,0),向右为x轴正方向,向下为y轴正方向。 示例:300 500 300 1000 表示从屏幕...