關於abd的幾個命令(使用頻率較高的)

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}}}

那麼,以上兩個參數appPackageappActivity的具體配置以下:ui

'appPackage': 'com.tencent.mm', 'appActivity': '.ui.LauncherUI',
相關文章
相關標籤/搜索