Android 13 dropped support for Full Disk Encryption (FDE) entirely, as
it has been replaced by File Based Encryption (FBE). Therefore, the
FDE-specific boot events are never emitted. Remove them from the code:
* boot_decryption_complete
* boot_complete_post_decrypt
* factory_reset_boot_complete_post_decrypt
* ota_boot_complete_post_decrypt
* post_decrypt_time_elapsed
Bug: 208476087
Change-Id: Id7a3bbd4f273693bd37b0cd27542dc6080d1c4f4
Userspace reboot can be treated as extension of runtime restart: instead
of restarting just system_server, it restarts all post-data services.
Test: adb reboot userspace
Test: checked bootstat didn't run again.
Test: system/core/bootstat/boot_reason_test.sh
Bug: 135984674
Change-Id: Ieda4b201f9b9294a3a54b7f0118ee769f5dd2065
bootstat updates boot reason upon boot_complete, however users of the
updated properties e.g. getLastShutdownReason from PowerManager could
be called before boot_complete. This introduces a inconsistency and
racing for those APIs.
In this CL, we change boot reason to be updated at the same time when
zygote starts where persist properties have been loaded already. Also
the initialization of bootloader's boot reason is pulled into post-fs
where all kernel command line arguments have been parsed in init already.
Bug: 122696730
Bug: 119509425
Test: trigger thermal shutdown and see warnings
Test: verify boot reason properties updated correctly post boot
Change-Id: Ia393b98ea072bc0ae6e4110d111393b34be0ee5d
Signed-off-by: Wei Wang <wvw@google.com>
(partial cherry pick from commit fe3e762b6d)
Adding the boot sequence reported atom in ag/3518079 caused the duration
of bootstat to increase, as seen in b/72864061. I isolated the cause
down to calling BootReasonStrToReason. However, this function also gets
called in ReportBootReason, so I created another function that does the
parsing and sets the system boot reason property, and made
RecordBootReason and statsd logging get that property.
Bug: 72864061
Test: rebooted phone, verified boot events were received in adb shell
logcat -b stats and verified adb shell bootstat -p printed correct
values. Ran timing tests as well on walleye with 20 boots: before this
change, the average was ~150-160ms. After, it was ~80ms.
Change-Id: I92dbc9880328835647be7d9d50c7861b42f27bdb
Merged-In: I92dbc9880328835647be7d9d50c7861b42f27bdb
Run bootstat as a oneshot service rather than as a series of inline
exec commands. exec commands impact boot time.
Test: cts-tradefed run cts-dev --module CtsBootStatsTestCases
system/core/bootstat/boot_reason_test.sh all
(make sure it filters out new init reports)
Bug: 65736247
Change-Id: Ic9d509a8cbee4bc1e278081de1001e25ae0915fd
Adding functionality to bootstat --record_boot_complete and
--record_boot_reason to initialize sys.boot.reason, the canonical
system boot reason.
Filter out ro.boot.bootreason oem noise into sys.boot.reason. Add
heuristics to determine what the boot reason is, when otherwise would
be defaulting to the blunt and relatively devoid of detail catch-all
reboot reasons ("reboot", "shutdown", "cold", "warm", "hard").
boot_reason_test.sh is also a compliance test.
Test: boot_reason_test.sh all
Bug: 63736262
Change-Id: Ic9a42cccbcfc89a5c0e081ba66d577a97c8c8c76
bootstat does not need root uid and root gid permissions to perform
its tasks. It appears that system uid and log gid are adequate and
appropriate.
Test: manual
Bug: 63736262
Change-Id: I094c2cb054e441562fa8717a4d3dc0086fb70a7a
Use a flag to enable/disable logging metrics, set to false during soft
reboots.
Bug: 32807863
Change-Id: Ib1359327af4e18d40400c29961c454f7be1b8d0c
Test: None
FBE devices suffice with bootanim=stopped, but must be gated on
ro.crypto.type=file.
Bug: 33049941
Test: adb reboot && adb logcat | grep bootstat < Has output
Change-Id: I346d47aaf9d1d4b40f05906056849630b922a20d
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
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