Adb 性能测试命令汇总

查看APP包名以及activity名

查看设备ID : adb devices

查看设备中说有的包:adb shell pm list packages

查看启动项:adb shell dumpsys activity | findstr "关键字" 

 adb shell dumpsys window w | findstr \/ | findstr name=

 adb shell dumpsys window w | findstr \/ | findstr name=

 adb shell dumpsys window w | findstr \/ | findstr name=

需要开启 app   写法最优

查看包名和activity

cmd命令输入:adb logcat>D:/log.log,即将日志存入D盘下的log文件中,运行手机上对应的app,然后停止logcat,停止使用ctrl+C,然后就可以从log.log文件中通过下图方式查找

 

adb shell "dumpsys window | grep mCurrentFocus"

adb shell "dumpsys window | grep mCurrentFocus"

adb shell "dumpsys window | grep mCurrentFocus"

注意:双引号千万不能省略

 

查看系统版本:adb shell getprop ro.build.version.release

查看APPpackage和activity: adb shell dumpsys window windows | findstr mFocusedApp

查看APP包名以及activity名:adb  logcat | find "Displayed"
查看APP启动时间:adb shell am start -W welab.bank.mobile.stage/com.welabfrontend.MainActivity
查看APP内存命令:adb shell dumpsys meminfo welab.bank.mobile.stage

查看APP CPU;adb shell dumpsyscpuinfo welab.bank.mobile.stage
单独查看一个APP: adb shell dumpsy scpuinfo welab.bank.mobile.stage | findstr welab.bank.mobile.stage
adb shell top -m -s | findstr packageName 
adb shell top
adb shell top -m 5 
adb shell top -m 5 -n3 
adb shell top -m 5 -n3 -s10
adb shell top -m 5 -n3 -s10 -d10
adb shell top  -n3 -s10 -d10 | findstr welab.bank.mob*
adb shell top -n10 -d2 -s9 |findstr welab.bank.mo* >D:\log.txt
查看APP FPS流畅度: adb shell dumpsys gfxinfo welab.bank.mobile.stage
monkey 性能测试: adb shell monkey -p welab.bank.mobile.stage -v -v -v 100
将log保存至本地文件:adb shell monkey -p welab.bank.mobile.stage -v -v -v 500 > D:/monkey.txt
adb shell 进入手机内部
从手机获取文件:adb pull 文件在手机的绝对路径 本地路径

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值