diff options
Diffstat (limited to 'fastboot/device/flashing.cpp')
-rw-r--r-- | fastboot/device/flashing.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fastboot/device/flashing.cpp b/fastboot/device/flashing.cpp index a5f12231eb..1bf4c9c9c3 100644 --- a/fastboot/device/flashing.cpp +++ b/fastboot/device/flashing.cpp @@ -163,7 +163,9 @@ int Flash(FastbootDevice* device, const std::string& partition_name) { CopyAVBFooter(&data, block_device_size); } WipeOverlayfsForPartition(device, partition_name); - return FlashBlockDevice(handle.fd(), data); + int result = FlashBlockDevice(handle.fd(), data); + sync(); + return result; } bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wipe) { @@ -193,6 +195,7 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip return device->WriteFail("Unable to flash new partition table"); } fs_mgr_overlayfs_teardown(); + sync(); return device->WriteOkay("Successfully flashed partition table"); } @@ -232,5 +235,6 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip return device->WriteFail("Unable to write new partition table"); } fs_mgr_overlayfs_teardown(); + sync(); return device->WriteOkay("Successfully updated partition table"); } |