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

Commit 4469fb1c authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

fs_mgr_remount: support legacy devices (marlin)

Deal with first version of verity for legacy products.

Test: system/core/fs_mgr/tests/adb-remount-test.sh
Bug: 120448575
Bug: 123079041
Change-Id: I7a2dd8309cbb19751fdbb05d4efc30c486615e04
parent 1188ce4e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ cc_binary {
    shared_libs: [
        "libbootloader_message",
        "libbase",
        "libcrypto",
        "libfec",
        "libfs_mgr",
    ],
    header_libs: [
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@
#include <android-base/strings.h>
#include <bootloader_message/bootloader_message.h>
#include <cutils/android_reboot.h>
#include <fec/io.h>
#include <fs_mgr_overlayfs.h>
#include <fs_mgr_priv.h>
#include <fstab/fstab.h>
@@ -243,6 +244,9 @@ int main(int argc, char* argv[]) {
                            continue;
                        }
                        reboot(false);
                    } else if (fs_mgr_set_blk_ro(entry.blk_device, false)) {
                        fec::io fh(entry.blk_device.c_str(), O_RDWR);
                        if (fh && fh.set_verity_status(false)) reboot_later = true;
                    }
                }
            }
@@ -268,6 +272,7 @@ int main(int argc, char* argv[]) {
    }

    if (partitions.empty()) {
        if (reboot_later) reboot(false);
        LOG(WARNING) << "No partitions to remount";
        return retval;
    }