Android 8.0 启动速度优化工具

在Android 8.0上面,google进行了启动速度的优化,但是对于开发者来说,追求更快的速度是必须的。
这边就介绍一个android启动速度优化的工具,bootchart。
bootchart在5.0的时候就以推出,但是现在的使用方式有了一些调整,下面就简单介绍一下.

首先,bootchart在8.0上面已经编译进了boot的image中,需要我们激活使用。
详细步骤如下:
1. 在ubuntu上面,需要安装bootchart:
sudo apt-get install bootchart
2.  连一个userdebug的手机
adb root
adb remount
adb shell touch /data/bootchart/enable
这样就激活了bootchart的应用。
3. 重启一下手机
adb reboot
4. 将bootchart给导出到本地Ubuntu
adb pull /data/bootchart/
5. 使用bootchart的脚本合成分析的启动过程图
system/core/init/grab-bootchart.sh
6. 打开bootchart图即可分析启动的耗时分析。




猜你喜欢

转载自blog.csdn.net/c_z_w/article/details/83544610