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

Commit 09090946 authored by joker.yang's avatar joker.yang Committed by joker yang
Browse files

Unable to mount filesystem in fastbootd mode on the user build.

for GSI XTS self-test, we need to mount filesystem(/metadata) in fastbootd mode. so we add a qualification since there is no overlayfs on user build anyway.

bug: 181097763
Change-Id: Ie36bd2f5b3981e6774dc4a2123c33180cddb99d1
parent f5595061
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@

#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/strings.h>
#include <ext4_utils/ext4_utils.h>
#include <fs_mgr_overlayfs.h>
@@ -162,7 +163,9 @@ int Flash(FastbootDevice* device, const std::string& partition_name) {
                partition_name == "boot_b")) {
        CopyAVBFooter(&data, block_device_size);
    }
    if (android::base::GetProperty("ro.system.build.type", "") != "user") {
        WipeOverlayfsForPartition(device, partition_name);
    }
    int result = FlashBlockDevice(handle.fd(), data);
    sync();
    return result;