From 6bff639c1999a392e15a35e62d84337441db9fe0 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Thu, 21 Jan 2016 15:16:36 -0800 Subject: [PATCH] bootstat: Hook up bootstat to record the boot complete signal and log boot events in the LOCAL_INIT_RC file, bootstat.rc. This change also creates the /data/misc/bootstat dir during the filesystem creation block in init.rc. Bug: 21724738 Change-Id: I2ad6913c0235d5f926c6ef8b3c65d650159c6ed7 --- bootstat/Android.mk | 1 + bootstat/bootstat.rc | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 bootstat/bootstat.rc diff --git a/bootstat/Android.mk b/bootstat/Android.mk index 348db8851..198866c29 100644 --- a/bootstat/Android.mk +++ b/bootstat/Android.mk @@ -104,6 +104,7 @@ LOCAL_CPPFLAGS := $(bootstat_cppflags) LOCAL_C_INCLUDES := $(bootstat_c_includes) LOCAL_SHARED_LIBRARIES := $(bootstat_shared_libs) LOCAL_STATIC_LIBRARIES := libbootstat +LOCAL_INIT_RC := bootstat.rc LOCAL_SRC_FILES := $(bootstat_src_files) include $(BUILD_EXECUTABLE) diff --git a/bootstat/bootstat.rc b/bootstat/bootstat.rc new file mode 100644 index 000000000..2c37dd260 --- /dev/null +++ b/bootstat/bootstat.rc @@ -0,0 +1,14 @@ +# This file is the LOCAL_INIT_RC file for the bootstat command. + +on post-fs-data + mkdir /data/misc/bootstat 0700 root root + +# This marker, boot animation stopped, is considered the point at which the +# the user may interact with the device, so it is a good proxy for the boot +# complete signal. +on property:init.svc.bootanim=stopped + # Record boot_complete timing event. + exec - root root -- /system/bin/bootstat -r boot_complete + + # Log all boot events. + exec - root root -- /system/bin/bootstat -l