Fix flaky AVB test from late verity_update_state
CtsNativeVerifiedBootTestCases is currently flaky due to race conditions
between verity_update_state and the test running.
Moving the call to verity_update_state before zygote-start should fix
the test.
Bug: 253033920
Test: Boot Android and check that partitions.system.verified.hash_alg
has a non-empty value
Signed-off-by: Nathan Huckleberry <nhuck@google.com>
Change-Id: I9d252b0b6d74ed784ec2ffe091de2db53c5f45ba
diff --git a/rootdir/init.rc b/rootdir/init.rc
index ec760d3..d434e31 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -1037,6 +1037,9 @@
# Enable FUSE by default
setprop persist.sys.fuse true
+ # Update dm-verity state and set partition.*.verified properties.
+ verity_update_state
+
# It is recommended to put unnecessary data/ initialization from post-fs-data
# to start-zygote in device's init.rc to unblock zygote start.
on zygote-start && property:ro.crypto.state=unencrypted
@@ -1175,9 +1178,6 @@
# Define default initial receive window size in segments.
setprop net.tcp_def_init_rwnd 60
- # Update dm-verity state and set partition.*.verified properties.
- verity_update_state
-
# Start standard binderized HAL daemons
class_start hal