From 5998c74d7a701274b37beb10882e359fcc45bfb8 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Thu, 21 Oct 2021 21:24:16 +0800 Subject: [PATCH] Sets 'verity_update_state' in init.rc This is required since Android 12, because CtsNativeVerifiedBootTestCases will read property "partition.${partition}.verified.hash_alg" to check that sha1 is not used. Also see https://r.android.com/1546980 for more details. Bug: 175236047 Bug: 203720638 Test: build and boot a device Change-Id: I300265f4af9c2781d40537f391bda9eaf62c27ba --- init/README.md | 5 ++++- rootdir/init.rc | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/init/README.md b/init/README.md index 64c6b1c72..6c29b0712 100644 --- a/init/README.md +++ b/init/README.md @@ -733,7 +733,10 @@ provides the `aidl_lazy_test_1` interface. `verity_update_state` > Internal implementation detail used to update dm-verity state and set the partition._mount-point_.verified properties used by adb remount - because fs\_mgr can't set them directly itself. + because fs\_mgr can't set them directly itself. This is required since + Android 12, because CtsNativeVerifiedBootTestCases will read property + "partition.${partition}.verified.hash_alg" to check that sha1 is not used. + See https://r.android.com/1546980 for more details. `wait [ ]` > Poll for the existence of the given file and return when found, diff --git a/rootdir/init.rc b/rootdir/init.rc index 383169318..7fea3a926 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -1097,6 +1097,9 @@ 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