monkey调试类命令

来源:互联网 发布:数据库第六版pdf 编辑:程序博客网 时间:2024/05/21 21:34
1. 监视应用程序所调用的包之间的切换:
    adb shell monkey --dbg-no-events <event-count>
初始化monkey,进入到某个测试activity而不会进一步生成事件,一般会与-v -p -throttle(至少30s)等一起使用

2. 在事件前后生成profiling report:
    adb shell monkey --hprof <event-count>
    使用此命令将在data/misc中生成5MB左右大小的文件

3. 崩溃后继续发送事件:
    adb shell monkey --ignore-crashes <event-count>

4. 超时后(如ANR)继续发送事件:
     adb shell monkey --ignore-timeouts <event-count>

5. 出现权限错误后继续发送事件:
    adb shell monkey --ignore-security-exceptions <event-count>

6. 程序出错后,通知系统停止发生错误的进程:
    adb shell monkey --kill-process-after-error <event-count>
    如不设置,发生错误的应用程序仍然处于运行状态
    
7. 监控并报告系统的native code的崩溃事件:
    adb shell monkey --monitor-native-crashes <event-count>
    如果同时设置了--kill-process-after-error,此类崩溃也将被停止运行

8. 暂停执行中的monkey,直到有调试器与它连接:
    adb shell monkey --wait-dbg <event-count>
0 0