美文网首页
Android bootchart使用指南

Android bootchart使用指南

作者: csj_verson | 来源:发表于2021-02-19 09:33 被阅读0次

一、环境配置

1. 准备好Linux一台,用于生成最终的bootchart图片

2.  在linux主机上安装如下两个模块

        sudo apt-get install pybootchartgui

        sudo apt-get install bootchart

3. 说明:目前文档基于windows主机 + 远程linux编译器的环境

二、开启bootchart

1.      将车机连接到主机,检测adb是否能正常使用

2.      Adb shell后,执行touch

        /data/bootchart/enabled命令

3.      重启车机

三、抓取开机时间等日志信息

1.      待开机完成,即进入launhcer后,执行adb shell

2.      查看/data/bootchart/下是否有生成header文件,如果有则跳至4

3.      查看/data/bootchart/下是否有生成enabled文件,如果无则跳回二项2条开始执行,有则寻求NOBO支持。

4.      拷贝/data/bootchart/下的这4个文件到本地

            proc_diskstats.log

            proc_ps.log

            proc_stat.log

            header

四、生成png

1.     拷贝到linux上,进入到header文件的同级目录xxx,这的xxx在第3条会用到

2.      执行tar –czf bootchart.tgz *命令将这4个文件打包起来

3.      然后执行bootchart xxx/ bootchart.tgz 生成bootchart.png文件

4.     拷贝bootchart.png到你需要的地方,双击查看

相关文章

网友评论

      本文标题:Android bootchart使用指南

      本文链接:https://www.haomeiwen.com/subject/yxhzbktx.html