查看包名的adb命令以及批处理循环的一点东东

上一篇 / 下一篇  2015-11-09 14:10:13 / 个人分类:ADB



adb shell pm list packages:列出所有的包名。
adb shell dumpsys package:列出所有的安装应用的信息
dumpsys package com.android.XXX:查看某个包的具体信息
adb shell dumpsys activity |findstr mFocusedActivity 查看当前的Activity 

把changhong box中的10个游戏分别看看,可以用monkey去遍历一遍,把这10个的包名拿出来:

1.将10个的包名写进白名单:whitelist:
adb push E:\01_AutomationTest\01_Monkey\05_NbBank\whitelist.txt data/local/tmp/

2.运行monkey:
adb shell
monkey --pkg-whitelist-file /data/local/tmp/whitelist.txt --throttle 500 -s 100 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --ignore-native-crashes --monitor-native-crashes -v -v -v 15000 > 这个你自己会~

比如总共1w次你就一共跑了这10个包1w次,最好是一个包2000次?
批处理大神来帮忙,写一个循环,把10个包名放进一个list中,依次取之~
这个不错,今天来搞搞试试

for /f %c in (e:\abc.txt) do @echo %c

for /f %c in (e:\abc.txt) do adb shell monkey -p %c --pct-touch 65 --pct-motion 30 --pct-appswitch 5 --ignore-crashes --ignore-timeouts --ignore-security-exceptions --monitor-native-crashes --throttle 200 -v -v 5000  

abc.txt文件里放要跑的包名
现在很奇怪的是跑文件不行,但是可以把这个命令扔进cmd命令进去让它跑起来,总的来说,要的基本实现了,就是对这

个abc这个txt文件里的11个包名依次拿出来跑,

卸载白名单中所有apk的批处理命令:
for /f %c in (e:\whitelist.txt) do adb uninstall %c




for /r \\10.9.201.11\test_group_files\3第三方软件\APPS测试用 %i in (*.apk)  do echo %i 



TAG:

 

评分:0

我来说两句

Open Toolbar