diff options
author | Wei Wang <wvw@google.com> | 2019-02-08 02:55:13 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-02-08 02:55:13 +0000 |
commit | 575996837cde17a6e8f80d2c45adf17bdcea5fe6 (patch) | |
tree | 968a5751d41600f0792fac38ac4626c156a7c8ca | |
parent | 708d45979ccecd6b541740d2b8dc0fe4d6db138c (diff) | |
parent | 4e9c653c932cf2dc7638ab2de58b5bb85a1c0c47 (diff) |
Merge "bootstat: Update boot reason property earlier"
-rw-r--r-- | bootstat/bootstat.rc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/bootstat/bootstat.rc b/bootstat/bootstat.rc index 1300a277a..85caf25ca 100644 --- a/bootstat/bootstat.rc +++ b/bootstat/bootstat.rc @@ -1,7 +1,9 @@ # This file is the LOCAL_INIT_RC file for the bootstat command. -# mirror bootloader boot reason to system boot reason -on property:ro.boot.bootreason=* +# Mirror bootloader boot reason to system boot reason +# ro.boot.bootreason should be set by init already +# before post-fs trigger +on post-fs && property:ro.boot.bootreason=* setprop sys.boot.reason ${ro.boot.bootreason} on post-fs-data @@ -66,11 +68,16 @@ on boot on property:init.svc.zygote=stopping setprop sys.logbootcomplete 0 +# Set boot reason +on zygote-start + # Converts bootloader boot reason and persist.sys.boot.reason to system boot reason + # Need go after persist peroperties are loaded which is right before zygote-start trigger + exec_background - system log -- /system/bin/bootstat --set_system_boot_reason + # Record boot complete metrics. on property:sys.boot_completed=1 && property:sys.logbootcomplete=1 - # Converts bootloader boot reason to system boot reason # Record boot_complete and related stats (decryption, etc). # Record the boot reason. # Record time since factory reset. # Log all boot events. - exec_background - system log -- /system/bin/bootstat --set_system_boot_reason --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l + exec_background - system log -- /system/bin/bootstat --record_boot_complete --record_boot_reason --record_time_since_factory_reset -l |