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