33 lines
1.2 KiB
Diff
33 lines
1.2 KiB
Diff
From d69f9a1231d08fd6508e7219b3298cdbc3158796 Mon Sep 17 00:00:00 2001
|
|
From: Pierre-Hugues Husson <phh@phh.me>
|
|
Date: Mon, 16 Sep 2019 13:49:05 +0200
|
|
Subject: [PATCH] Check needsCheckpoint only if checkpoint is supported
|
|
|
|
This is needed because some devices (Xiaomi MiPad 4, uncertified)
|
|
declares a bootctrl HAL in manifest, but doesn't have it.
|
|
vold will then hang in needsCheckpoint waiting for bootctrl
|
|
|
|
Change-Id: I2dafcbca7e994d7a3ac36ef3698590db2ab482fa
|
|
---
|
|
cryptfs.cpp | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/cryptfs.cpp b/cryptfs.cpp
|
|
index 33f0913..7db1ef6 100644
|
|
--- a/cryptfs.cpp
|
|
+++ b/cryptfs.cpp
|
|
@@ -1963,7 +1963,9 @@ static int cryptfs_restart_internal(int restart_main) {
|
|
SLOGE("Failed to setexeccon");
|
|
return -1;
|
|
}
|
|
- bool needs_cp = android::vold::cp_needsCheckpoint();
|
|
+ bool supportsCheckpoint = false;
|
|
+ android::vold::cp_supportsCheckpoint(supportsCheckpoint);
|
|
+ bool needs_cp = supportsCheckpoint && android::vold::cp_needsCheckpoint();
|
|
#ifdef CONFIG_HW_DISK_ENCRYPTION
|
|
while ((mount_rc = fs_mgr_do_mount(&fstab_default, DATA_MNT_POINT, blkdev.data(), 0,
|
|
needs_cp, false)) != 0) {
|
|
--
|
|
2.25.1
|
|
|