From 9cb248617d7eddfdd2f0e43a3e653eeb1f8e4c27 Mon Sep 17 00:00:00 2001 From: me-cafebabe Date: Tue, 4 Oct 2022 12:41:16 +0000 Subject: [PATCH] first_stage_mount: Skip dm-verity setup if AVB is not enabled Change-Id: Ia06e94e91cf5fdce14ce37eb85fdd95df1d059bc --- init/first_stage_mount.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/init/first_stage_mount.cpp b/init/first_stage_mount.cpp index 5d3a27354..6e0895c6e 100644 --- a/init/first_stage_mount.cpp +++ b/init/first_stage_mount.cpp @@ -441,9 +441,14 @@ bool FirstStageMountVBootV2::MountPartition(const Fstab::iterator& begin, bool e return false; } } - if (!SetUpDmVerity(&(*begin))) { - PLOG(ERROR) << "Failed to setup verity for '" << begin->mount_point << "'"; - return false; + + if (begin->fs_mgr_flags.avb) { + if (!SetUpDmVerity(&(*begin))) { + PLOG(ERROR) << "Failed to setup verity for '" << begin->mount_point << "'"; + return false; + } + } else { + LOG(INFO) << "AVB is not enabled, skip verity setup for '" << begin->mount_point << "'"; } bool mounted = (fs_mgr_do_mount_one(*begin) == 0);