blob: 489936973a0b629942af17cbdd6200ca1ff5ba21 [file] [log] [blame]
The Android Open Source Project4f6e8d72008-10-21 07:00:00 -07001this version of init contains code to perform "bootcharting", i.e. generating log
2files that can be later processed by the tools provided by www.bootchart.org.
3
4to activate it, you need to define build 'init' with the INIT_BOOTCHART environment
5variable defined to 'true', then create a file on the /data partition with a command
6like the following:
7
8 adb shell 'echo 1 > /data/bootchart'
9
10if the '/data/bootchart' file doesn't exist, or doesn't contain a '1' in its first
11byte, init will proceed normally.
12
13by default, the bootchart log stops after 2 minutes, but you can stop it earlier
14with the following command while the device is booting:
15
16 adb shell 'echo 1 > /data/bootchart-stop'
17
18note that /data/bootchart-stop is deleted automatically by init at the end of the
19bootcharting. this is not the case of /data/bootchart, so don't forget to delete it
20when you're done collecting data:
21
22 adb shell rm /data/bootchart
23
24the log files are placed in /tmp/bootchart/. you must run the script tools/grab-bootchart.sh
25which will use ADB to retrieve them and create a bootchart.tgz file that can be used with
26the bootchart parser/renderer, or even uploaded directly to the form located at:
27
28 http://www.bootchart.org/download.html
29
30technical note:
31
32this implementation of bootcharting does use the 'bootchartd' script provided by
33www.bootchart.org, but a C re-implementation that is directly compiled into our init
34program.