adb start-server #启动adb server
adb kill-server #killadb server
netstat -ano|findstr "5037" #查看端口5037的占用状况
tasklist /fi "PID eq 5037" #查看占用的进程
taskkill /pid xxxx /f #干掉该进程python
摘自testerhome wut0n9shell
该参数用来指定待启动的活动。获取方法以下:
1,手机链接电脑,打开手机调试功能,并运行待测试APP,终端执行:windows
adb shell
2,接着,执行:app
dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp'
直接查看输出结果中mFocusedApp的值,好比测试
mFocusedApp=AppWindowToken{372f88d6 token=Token{3b7b14f1 ActivityRecord{20692498 u0 com.tencent.mm/.ui.LauncherUI t895}}}
那么,以上两个参数appPackage
和appActivity
的具体配置以下:ui
'appPackage': 'com.tencent.mm', 'appActivity': '.ui.LauncherUI',