Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove some code to fix a reboot bug #2307

Open
wants to merge 1 commit into
base: celadon/s/mr0/stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From 06f05a718d5ae579440d7d2dfdfc20c5c8928e2b Mon Sep 17 00:00:00 2001
From: "Guo, Jade" <jade.guo@intel.com>
Date: Thu, 7 Sep 2023 16:44:54 +0800
Subject: [PATCH] remove some code to fix a reboot bug

System will boot twice after flashing images if we keep this piece of code. Safely remove it to bypass
the bug.

The code removed is part of the commit a7635718 "Pass wiped and fs_type to vold to format encrypted partition".

Tracked-On: OAM-111863
Signed-off-by: Guo, Jade <jade.guo@intel.com>
---
fs_mgr/fs_mgr.cpp | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp
index 8896ec33c..8b482c106 100644
--- a/fs_mgr/fs_mgr.cpp
+++ b/fs_mgr/fs_mgr.cpp
@@ -1550,29 +1550,10 @@ MountAllResult fs_mgr_mount_all(Fstab* fstab, int mount_mode) {
crypt_footer = true;
}

- // EncryptInplace will be used when vdc gives an error or needs to format partitions
- // other than /data
- if (should_use_metadata_encryption(current_entry) &&
- current_entry.mount_point == "/data") {
-
- // vdc->Format requires "ro.crypto.type" to set an encryption flag
- encryptable = FS_MGR_MNTALL_DEV_IS_METADATA_ENCRYPTED;
- set_type_property(encryptable);
-
- if (!call_vdc({"cryptfs", "encryptFstab", current_entry.blk_device,
- current_entry.mount_point, "true" /* shouldFormat */,
- current_entry.fs_type},
- nullptr)) {
- LERROR << "Encryption failed";
- } else {
- userdata_mounted = true;
- continue;
- }
- }
-
if (fs_mgr_do_format(current_entry, crypt_footer) == 0) {
// Let's replay the mount actions.
i = top_idx - 1;
+ wiped = false;
continue;
} else {
LERROR << __FUNCTION__ << "(): Format failed. "
--
2.42.0

Loading