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

Commit 307a41fe authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

fastboot: call fs_mgr_overlayfs_teardown() in UpdateSuper

When the update-super command is issued, we want overlayfs overrides
to disappear without a doubt, which includes non-A/B utilizing
/cache/overlay/ tree.  Call fs_mgr_overlayfs_teardown() on successful
return.

Test: adb-remount-test.sh
Bug: 120034852
Change-Id: Ia5cdb797f7e8350b5591a51fc8ae5f323901aee4
parent 9040aa56
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip
        if (!FlashPartitionTable(super_name, *new_metadata.get())) {
            return device->WriteFail("Unable to flash new partition table");
        }
        fs_mgr_overlayfs_teardown();
        return device->WriteOkay("Successfully flashed partition table");
    }

@@ -186,5 +187,6 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip
    if (!UpdateAllPartitionMetadata(super_name, *new_metadata.get())) {
        return device->WriteFail("Unable to write new partition table");
    }
    fs_mgr_overlayfs_teardown();
    return device->WriteOkay("Successfully updated partition table");
}