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

Commit 3babd848 authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

fs_mgr: remount: pull root device from fstab

For devices that do not support overlayfs that are system as root,
need to pull /dev/root device from / mount point in fstab.

Test: adb-remount-test.sh
Bug: 126256072
Change-Id: I198c0e8c60770508737318afde95db2966294ff5
parent 448fc978
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -346,11 +346,15 @@ int main(int argc, char* argv[]) {
                break;
            }
            if ((mount_point == "/") && (rentry.mount_point == "/system")) {
                if (blk_device != "/dev/root") blk_device = rentry.blk_device;
                blk_device = rentry.blk_device;
                mount_point = "/system";
                break;
            }
        }
        if (blk_device == "/dev/root") {
            auto from_fstab = GetEntryForMountPoint(&fstab, mount_point);
            if (from_fstab) blk_device = from_fstab->blk_device;
        }
        fs_mgr_set_blk_ro(blk_device, false);

        // Now remount!