From f14f8627bb30ea7d656f8a55c2aa4b3aedc48b80 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 17 Mar 2022 23:06:45 +0000 Subject: [PATCH] Fix check for whether metadata encryption is enabled metadata_key_dir controls whether metadata encryption is enabled, not metadata_encryption which is just the encryption options and can be empty if the default options are sufficient. Bug: 198405417 Fixes: 156d9d229378 ("Pre-create userdata metadata encryption device.") Change-Id: I98ee253c7e5e738ee087ec07ed60f4a376ca7cee --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 978db6673..42789c9d7 100644 --- a/main.cpp +++ b/main.cpp @@ -251,7 +251,7 @@ static int process_config(VolumeManager* vm, VoldConfigs* configs) { PLOG(FATAL) << "could not find logical partition " << entry.blk_device; } - if (entry.mount_point == "/data" && !entry.metadata_encryption.empty()) { + if (entry.mount_point == "/data" && !entry.metadata_key_dir.empty()) { // Pre-populate userdata dm-devices since the uevents are asynchronous (b/198405417). android::vold::defaultkey_precreate_dm_device(); }