Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 626c6188 authored by Eric Biggers's avatar Eric Biggers Committed by Automerger Merge Worker
Browse files

Merge "fs_mgr: allow FDE options in recovery mode" am: d0ed71dc am: f14c9248

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1891237

Change-Id: I9d116d9a16dec8e7310a76d26ada17fd35b33164
parents cabfce57 f14c9248
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -306,7 +306,13 @@ bool ParseFsMgrFlags(const std::string& flags, FstabEntry* entry) {
        }
    }

    if (entry->fs_mgr_flags.crypt && !entry->fs_mgr_flags.vold_managed) {
    // FDE is no longer supported, so reject "encryptable" when used without
    // "vold_managed".  For now skip this check when in recovery mode, since
    // some recovery fstabs still contain the FDE options since they didn't do
    // anything in recovery mode anyway (except possibly to cause the
    // reservation of a crypto footer) and thus never got removed.
    if (entry->fs_mgr_flags.crypt && !entry->fs_mgr_flags.vold_managed &&
        access("/system/bin/recovery", F_OK) != 0) {
        LERROR << "FDE is no longer supported; 'encryptable' can only be used for adoptable "
                  "storage";
        return false;