diff --git a/fastboot/device/flashing.cpp b/fastboot/device/flashing.cpp index 333ca50fb..ee0aa582b 100644 --- a/fastboot/device/flashing.cpp +++ b/fastboot/device/flashing.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -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;