" 1"的含义在猴子命令

时间:2016-05-17 04:40:05

标签: android command-line adb monkey adb-shell

我最近读了一本关于android的书。在那本用于运行猴子脚本的书中,bellow命令介绍了:

adb shell monkey -f myscript.txt 1

我搜索了这个命令,找出了什么意思。但当我搜索" 1"时,我找不到任何关于它的信息。这是什么" 1"意思?

1 个答案:

答案 0 :(得分:2)

root@droid:/ # monkey
monkey
usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
          [-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
          [--ignore-crashes] [--ignore-timeouts]
          [--ignore-security-exceptions]
          [--monitor-native-crashes] [--ignore-native-crashes]
          [--kill-process-after-error] [--hprof]
          [--pct-touch PERCENT] [--pct-motion PERCENT]
          [--pct-trackball PERCENT] [--pct-syskeys PERCENT]
          [--pct-nav PERCENT] [--pct-majornav PERCENT]
          [--pct-appswitch PERCENT] [--pct-flip PERCENT]
          [--pct-anyevent PERCENT] [--pct-pinchzoom PERCENT]
          [--pkg-blacklist-file PACKAGE_BLACKLIST_FILE]
          [--pkg-whitelist-file PACKAGE_WHITELIST_FILE]
          [--wait-dbg] [--dbg-no-events]
          [--setup scriptfile] [-f scriptfile [-f scriptfile] ...]
          [--port port]
          [-s SEED] [-v [-v] ...]
          [--throttle MILLISEC] [--randomize-throttle]
          [--profile-wait MILLISEC]
          [--device-sleep-time MILLISEC]
          [--randomize-script]
          [--script-log]
          [--bugreport]
          [--periodic-bugreport]
          COUNT

1COUNT。意思是只有1"随机"命令将被执行。 monkey运行的第一个命令是默认活动的开始。通过仅提供包名称而不必指定确切的活动名称,此技巧用于启动应用程序。