$ adb shell input Usage: input [<source>] <command> [<arg>...] The sources are: mouse keyboard joystick touchnavigation touchpad trackball stylus dpad touchscreen gamepad The commands and default sources are: text <string> (Default: touchscreen) keyevent [--longpress] <key code number or ...
滑动操作:input swipe <x1> <y1> <x2> <y2> 例如:input swipe 0 0 100 100 按下滚动球:input press(现在被废弃了) 移动滚动球:input roll <dx> <dy>(现在废弃了) 截屏:adb shell screencap <filename> 例如:adb shell screencap /sdcard/screen.png 其他对应的keyevent对应的key code: 0 --> "...
adb shell dumpsys window | grep mFocusedApp 或者 adb shell "dumpsys window | grep mCurrentFocus" 注:App的包名是唯一的,不可重复的。 adb模拟手机按键 在使用adb模拟手机按键之前,我们需要先做好设置,设置路径为:设置——开发者选项——指针位置,我们可以先运行adb shellinput命令来查看如何模拟手机按键: ...
importosclassinput(object):#输入文字deftext(self,text): adb='adb shell input text %s'%text os.popen(adb)#滑动defswipe(self,x,y,x1,y1): adb='adb shell input swipe %s %s %s %s'%(x,y,x1,y1) os.popen(adb)#模拟按键defkeyevent(self,k): adb='adb shell input keyevent %s'%k os....
adb shell input keyevent 26 1. 执行效果相当于按电源键。 菜单键 命令: adb shell input keyevent 82 1. HOME 键 命令: adb shell input keyevent 3 1. 返回键 命令: adb shell input keyevent 4 1. 音量控制 增加音量: adb shell input keyevent 24 ...
adb shell input Usage: input [<source>] <command> [<arg>...] The sources are: mouse keyboard joystick touchnavigation touchpad trackball stylus dpad touchscreen gamepad The commands and default sources are: text <string> (Default: touchscreen) ...
最近做LCD模组的gamma自动化测试过程中用到了input命令,于是也来了解一下该命令的使用。在运行adb shell 后输入input后运行就会输出input的使用方法,如下: Usage: input [<source>] <command> [<arg>...] The sources are: trackball joystick touchnavigation ...
adb shell input Usage: input [<source>] <command> [<arg>...] The sources are: mouse keyboard joystick touchnavigation touchpad trackball stylus dpad touchscreen gamepad The commands and default sources are: text <string> (Default: touchscreen) ...
adb shell input tap <x> <y>:模拟在屏幕上点击坐标(x, y)的操作。adb shell input swipe <...
$ adb shell input --help Error: Unknown command: --help Usage: input [<source>] <command> [<arg>...]The sources are:trackball joystick touchnavigation mouse keyboard gamepad touchpad dpad stylus touchscreen The commands and default sources are:text <string> (Default: touchscreen)keyevent [-...