一、aapt dump badging apk名稱android
二、adb logcat | grep START 或者 adb shell "logcat | grep START"shell
而後在模擬器中點擊要獲取package的app,查找cmp,cmp中前面是package name後面是activity name安全
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.browser/.BrowserActivity bnds=[149,158][290,388] (has extras)} from pid 712
三、adb shell dumpsys activity | grep "Run #"
或者adb shell dumpsys activity | grep -i run
app
一、經過monkey 點擊 某個appspa
adb shell monkey -p com.android.browser 10 點擊次數10次日誌
PS D:\Program Files\nox\Nox\bin> adb shell monkey -p com.android.browser 10
Events injected: 10
## Network stats: elapsed time=557ms (0ms mobile, 0ms wifi, 557ms not connected)code
adb shell monkey -p com.android.browser --throttle 500 10 點擊10次每次間隔500msblog
PS D:\Program Files\nox\Nox\bin> adb shell monkey -p com.android.browser --throttle 500 10
Events injected: 10
## Network stats: elapsed time=648ms (0ms mobile, 0ms wifi, 648ms not connected)事件
adb shell monkey -p com.android.browser -s 123456 10 點擊10次,同時保存一個執行的序列,it
monkey 後面接 -s經常使用在復現問題,兩次執行步驟同樣
monkey 經常使用的參數
adb shell monkey -p packagename --throttle 500
--ignore-crashes 忽略app崩潰
--ignore-timeouts 忽略超時
--ignore-security-exceptions 忽略安全的異常
--ignore-native-crashes 忽略本地crash
--monitor-native-crashes 忽略所有的crash
-v -v -v 10000>c:\monkey_log 三個-v最高級別日誌,而後重定向到文件中
adb shell monkey -p packagename --throttle 500 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --monitor-native-crashes -v -v 10000>c:\monkey_log
-p package name
-v 日誌等級
50 事件數
-- throttle 200 事件間隔時間200ms
--pct-touch 50 設置整個操做中所佔的百分比