Merge "Unable to mount filesystem in fastbootd mode on the user build." am: 7723c72cab

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

Change-Id: I1093e922d7251b9a30bc5b450f1ed924892f5cac
This commit is contained in:
David Anderson 2021-04-14 00:09:39 +00:00 committed by Automerger Merge Worker
commit 0b14b02240
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}
WipeOverlayfsForPartition(device, partition_name);
if (android::base::GetProperty("ro.system.build.type", "") != "user") {
WipeOverlayfsForPartition(device, partition_name);
}
int result = FlashBlockDevice(handle.fd(), data);
sync();
return result;