1.搜索前台activity的指令:
2.启动微信
3.启动相机(huawei)
4.点击拍照事件
5.返回
6.播放音乐
adb shell "dumpsys window | grep mCurrentFocus"
adb shell am start "com.tencent.mm/com.tencent.mm.ui.LauncherUI"
adb shell am start com.huawei.camera/com.huawei.camera
adb shell input keyevent "KEYCODE_CAMERA"
adb shell input keyevent "KEYCODE_BACK"
adb shell am start -a "android.intent.action.VIEW" -t "audio/mp3" -d "file:///storage/sdcard0/200.mp3
7.播放视频
adb shell am start -a android.intent.action.VIEW -d "file:///mnt/sdcard/DCIM/Camera/test.3gp" -t "video/*"
其它
adbshell input keyevent "KEYCODE_ENTER"
adbshell input keyevent "KEYCODE_POWER"
//滑动
adbshell input swipe100100200200300 //从 100 100 经历300毫秒滑动到 200 200
//长按
adbshell input swipe1001001001001000 //在 100 100 位置长按 1000毫秒