2009-03-04 04:32:55 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2015-03-06 22:25:32 +01:00
|
|
|
# This script is used to retrieve a bootchart log generated by init.
|
2015-02-24 17:28:07 +01:00
|
|
|
# All options are passed to adb, for better or for worse.
|
2015-03-06 22:25:32 +01:00
|
|
|
# See the readme in this directory for more on bootcharting.
|
|
|
|
|
2009-03-04 04:32:55 +01:00
|
|
|
TMPDIR=/tmp/android-bootchart
|
|
|
|
rm -rf $TMPDIR
|
|
|
|
mkdir -p $TMPDIR
|
|
|
|
|
|
|
|
LOGROOT=/data/bootchart
|
|
|
|
TARBALL=bootchart.tgz
|
|
|
|
|
2016-11-11 02:43:47 +01:00
|
|
|
FILES="header proc_stat.log proc_ps.log proc_diskstats.log"
|
2009-03-04 04:32:55 +01:00
|
|
|
|
|
|
|
for f in $FILES; do
|
2015-02-24 17:28:07 +01:00
|
|
|
adb "${@}" pull $LOGROOT/$f $TMPDIR/$f 2>&1 > /dev/null
|
2009-03-04 04:32:55 +01:00
|
|
|
done
|
|
|
|
(cd $TMPDIR && tar -czf $TARBALL $FILES)
|
2018-10-31 21:58:14 +01:00
|
|
|
pybootchartgui ${TMPDIR}/${TARBALL}
|
|
|
|
xdg-open ${TARBALL%.tgz}.png
|
2015-03-06 22:25:32 +01:00
|
|
|
echo "Clean up ${TMPDIR}/ and ./${TARBALL%.tgz}.png when done"
|