Merge "first_stage_mount: Bind mount /system after switch root" am: 53f1fab6ac
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2146960 Change-Id: I6f8029284650238dcca3727cb9be81d486a9d314 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
c3e43e63fe
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue