In the Android source code
STEP 1. ----------
In the device side
1. enable bootchart flag
$ export INIT_BOOTCHART=true
2. and build the Android source code
3. After flashing binary
$ adb shell
$ mkdir /data/bootchart
$ echo 60 > /data/bootchart-start
(It means that bootchart log will be saved until 60 seconds)
$ exit
(exit adb)
4. reboot device
$ adb reboot
You can find some log files in the /data/bootchart/ directory
Tip.
- You can find "bootchart.c & bootchart.h" under the ../init/ directory.
- In the same directory there is a Android.mk file.
INIT_BOOTCHART is used in this make file.
STEP 2. ----------
In the linux system side
install bootchart
$ sudo apt-get install bootchart
STEP 3. ----------
after getting bootchart log files
1. copy log files from the Android device to Linux system
$ adb push /data/bootchart/.
2. compress the all log files
$ tar -czf bootchart.tgt *
3. run bootchart
$ bootchart bootchart.tgz
$ ls
bootchart.png bootchart.tgz
* If you meet the error message,
" ZeroDivisionError: flat division by zero"