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

Commit f55eab6d authored by Yi-yo Chiang's avatar Yi-yo Chiang Committed by Automerger Merge Worker
Browse files

Merge "first_stage_mount: Bind mount /system after switch root" am: 53f1fab6...

Merge "first_stage_mount: Bind mount /system after switch root" am: 53f1fab6 am: c3e43e63 am: e3976090

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



Change-Id: Ied075867ced373f0a07a155176d0013b60cd5d44
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 4bb5aef0 e3976090
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -518,6 +518,12 @@ bool FirstStageMount::TrySwitchSystemAsRoot() {

    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;
}