1.下载adb shell
http://adbshell.com/downloads/
2.配置环境环境变量
3.查找正在打开的引用
单个设备 直接adb shell
多个设备 adb devices 查看设备 adb -s 设备名 shell 进入指定设备
adb shell dumpsys activity activities | findstr "Run" 查看正在运行的Activity
打开手机qq的命令
adb shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n com.tencent.mobileqq/com.tencent.mobileqq.activity.SplashActivity
模拟点击的命令
adb shell input tap 200 300 点击200,300的点
adb shell 输入文字
adb shell input text "你想往edittext输入的内容,webview 网址的什么的都可以,非常方便"
//这条命令相当于按了设备的Backkey键
adb shell input keyevent 4
//可以解锁屏幕
adb shell input keyevent 82
//在屏幕上做划屏操作,前四个数为坐标点,后面是滑动的时间(单位毫秒)
adb shell input swipe 50 250 250 250 500
//在屏幕上点击坐标点x=50 y=250的位置。
adb shell input tap 50 250
//输入字符abc
adb shell input text abc