一个ADB命令,在一个手机上可以正常运行,在另一个上不行;为什么

C:\Users\Administrator>adb shell monkey -p com.tddapp.main -v 400 --throttle 350

:Monkey: seed=1495479148292 count=400
:AllowPackage: com.tddapp.main
:IncludeCategory: android.intent.category.LAUNCHER
:IncludeCategory: android.intent.category.MONKEY
// Event percentages:
// 0: 15.0%
// 1: 10.0%
// 2: 2.0%
// 3: 15.0%
// 4: -0.0%
// 5: -0.0%
// 6: 25.0%
// 7: 15.0%
// 8: 2.0%
// 9: 2.0%
// 10: 1.0%
// 11: 13.0%
:Switch: #Intent;action=android.intent.action.MAIN;category=android.intent.categ
ory.LAUNCHER;launchFlags=0x10200000;component=com.tddapp.main/.module.welcome.St
artActivity;end
// Allowing start of Intent { act=android.intent.action.MAIN cat=[android.in
tent.category.LAUNCHER] cmp=com.tddapp.main/.module.welcome.StartActivity } in p
ackage com.tddapp.main
// Allowing start of Intent { act=android.intent.action.MAIN cat=[android.in
tent.category.LAUNCHER] cmp=com.tddapp.main/.module.welcome.StartActivity } in p
ackage com.tddapp.main
:Sending rotation degree=0, persist=false

C:\Users\Administrator>

成功运行的手机是魅蓝Note5;失败的事小米5

应该是参数配置问题,看monkey 的说明:
$ adb shell monkey
usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]
[-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]
[-s SEED] [-v [-v] ...]
[--throttle MILLISEC] [--randomize-throttle]
。。。。。。(中间省略掉)
COUNT
用法应该是$ adb shell monkey [参数] [要执行的次数]
比如你那个命令,包名为com.tddapp.main,输出级别为-v,事件间隔为350毫秒,运行400次,那么应该是这个顺序:
$ adb shell monkey -p com.tddapp.main --throttle 350 -v 400追问

不可能的,这个命令在其他手机上还是OK的
我现在按照你的命令,也是不行
C:\Users\Administrator>adb shell monkey -p com.tddapp.main --throttle 350 -v 400
此处省略,字数限制
:Sending rotation degree=0, persist=false

温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-08-11
遇到同样的问题

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网