From 8f6fcd19afd08cdf3a29184846592da209ae0fc9 Mon Sep 17 00:00:00 2001 From: Nathan Huckleberry Date: Fri, 21 Oct 2022 00:45:05 +0000 Subject: [PATCH] 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 Change-Id: I9d252b0b6d74ed784ec2ffe091de2db53c5f45ba --- rootdir/init.rc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rootdir/init.rc b/rootdir/init.rc index ec760d3f6..d434e31bc 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -1037,6 +1037,9 @@ on post-fs-data # 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 @@ on boot # 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