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

Commit 53f1fab6 authored by Yi-yo Chiang's avatar Yi-yo Chiang Committed by Gerrit Code Review
Browse files

Merge "first_stage_mount: Bind mount /system after switch root"

parents 4bc52771 d7e6353a
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -518,6 +518,12 @@ bool FirstStageMount::TrySwitchSystemAsRoot() {


    SwitchRoot("/system");
    SwitchRoot("/system");


    // Make /system a mountpoint so that adb-remount can move submounts under /system.
    if (access("/system", F_OK) == 0 &&
        mount("/system", "/system", nullptr, MS_BIND, nullptr) != 0) {
        PLOG(WARNING) << "Failed to bind mount /system for overlayfs";
    }

    return true;
    return true;
}
}