C:\Documents and Settings\Administrator>adb shell
root@NX403A:/ # input
input
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 [--longpress] <key code number or name> ... (Default: keyboard)
tap <x> <y> (Default: touchscreen)
swipe <x1> <y1> <x2> <y2> [duration(ms)] (Default: touchscreen)
press (Default: trackball)
roll <dx> <dy> (Default: trackball)
1,模拟输入文本信息:input text HelloWorld
2.模拟物理按键操作: input keyevent KEYCODE_VOLUME_DOWN
3.模拟点击操作:input tap 500 500
4.模拟滑动操作:input swipe 200 500 400 500
5.模拟轨迹球操作