Skip to content

yrzroger/bootchart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

bootchart

Android Boot Time 分析工具

使用方法

  1. 下载工具到Linux平台 git clone git@github.com/bootchart.git bootchart
  2. cd bootchart
  3. adb 连接到Android设备
  4. 执行 adb shell 'touch /data/bootchart/enabled'
  5. 重启 adb reboot
  6. 检查设备的 /data/bootchart/ 目录下生成的资料 image
  7. Linux平台执行 ./grab-bootchart.sh 会自动把设备上的bootchart抓下来并生成 bootchart.png image
  8. 分析 bootchart.png 的时间信息 比如模拟上的开机时间 image

完成后,请删除 /data/bootchart/enabled 以防止每次开机都收集数据。

对比两次开始时间的差异

  1. 第一次开机后执行./grab-bootchart.sh 后开机资料抓到了log目录下,重命名为log1
  2. 第二次开机后执行./grab-bootchart.sh 后开机资料抓到了log目录下,重命名为log2
  3. 执行 ./compare-bootcharts.py log1 log2 比较开机时间差异 image

参考

https://source.android.com/docs/core/perf/boot-times?hl=zh-cn#bootchart

  1. 脚本工具都在原生代码目录下: system/core/init/grab-bootchart.sh system/core/init/compare-bootcharts.py
  2. 高版本的ubuntu没法用apt直接安装bootchart,所以需要自己git clone,并设置grab-bootchart.sh中pybootchartgui的路径,而此工程中提供的正式基于此做了调整,直接下载后有使用。

About

Android Boot Time 分析工具

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published