platform_system_core/bootstat/bootstat.rc
James Hawkins eef069acc5 bootstat: Disambiguate boot time on encrypted devices.
This change introduces new metrics to discern boot time on encrypted devices:
* post_decrypt_time_elapsed
* boot_decryption_complete
* boot_complete_post_decrypt
* boot_complete_no_encryption

Bug: 27497357
Change-Id: I8d3a411029bd6a45f80589ff67c408593e133a87
(cherry picked from commit c08e996ac8)
2016-03-14 14:27:35 -07:00

31 lines
1.3 KiB
Text

# This file is the LOCAL_INIT_RC file for the bootstat command.
on post-fs-data
mkdir /data/misc/bootstat 0700 root root
# Record the time at which the user has successfully entered the pin to decrypt
# the device, /data is decrypted, and the system is entering the main boot phase.
#
# post-fs-data: /data is writable
# property:init.svc.bootanim=running: The boot animation is running
on post-fs-data && property:init.svc.bootanim=running
exec - root root -- /system/bin/bootstat -r post_decrypt_time_elapsed
# The first marker, boot animation stopped, is considered the point at which
# the user may interact with the device, so it is a good proxy for the boot
# complete signal.
#
# The second marker ensures an encrypted device is decrypted before logging
# boot time data.
on property:init.svc.bootanim=stopped && property:vold.decrypt=trigger_restart_framework
# Record boot_complete and related stats (decryption, etc).
exec - root root -- /system/bin/bootstat --record_boot_complete
# Record the boot reason.
exec - root root -- /system/bin/bootstat --record_boot_reason
# Record time since factory reset.
exec - root root -- /system/bin/bootstat --record_time_since_factory_reset
# Log all boot events.
exec - root root -- /system/bin/bootstat -l