From 222ffc59197a80b3a92e4755e14a570243b8bcbc Mon Sep 17 00:00:00 2001 From: Chun-Wei Wang Date: Fri, 15 Dec 2023 14:40:56 +0800 Subject: [PATCH] Disable DSU in recovery mode DSU (modifying mounting paths) will cause OTA update to fail in recovery mode Bug: 315887685 Test: 1. enter DSU mode 2. adb reboot recovery 3. select "Apply update from ADB" 4. adb sideload some-ota-update.zip Change-Id: I6aec86893b7f8aa9e34f158269ebe2fd9dd98b33 --- fs_mgr/libfstab/fstab.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/libfstab/fstab.cpp b/fs_mgr/libfstab/fstab.cpp index 32460b17b..443017a26 100644 --- a/fs_mgr/libfstab/fstab.cpp +++ b/fs_mgr/libfstab/fstab.cpp @@ -716,7 +716,7 @@ bool ReadFstabFromFile(const std::string& path, Fstab* fstab) { if (!ReadFstabFromFileCommon(path, fstab)) { return false; } - if (path != kProcMountsPath) { + if (path != kProcMountsPath && !InRecovery()) { if (!access(android::gsi::kGsiBootedIndicatorFile, F_OK)) { std::string dsu_slot; if (!android::gsi::GetActiveDsu(&dsu_slot)) {