Improve error message when hitting checksum mismatch am: 88d1069f50 am: fbc46a7bbb
Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1355944
Change-Id: I30981ea11d8c830735ed998ba209a040ed212f40
diff --git a/payload_consumer/delta_performer.cc b/payload_consumer/delta_performer.cc
index 4690d85..19d1297 100644
--- a/payload_consumer/delta_performer.cc
+++ b/payload_consumer/delta_performer.cc
@@ -1152,7 +1152,8 @@
}
if (read_ok && expected_source_hash == source_hash)
return true;
-
+ LOG(WARNING) << "Source hash from RAW device mismatched, attempting to "
+ "correct using ECC";
if (!OpenCurrentECCPartition()) {
// The following function call will return false since the source hash
// mismatches, but we still want to call it so it prints the appropriate
@@ -1165,7 +1166,6 @@
<< ", expected "
<< base::HexEncode(expected_source_hash.data(),
expected_source_hash.size());
-
if (should_optimize) {
TEST_AND_RETURN_FALSE(fd_utils::ReadAndHashExtents(
source_ecc_fd_, operation.src_extents(), block_size_, &source_hash));