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

Commit fe4e86c7 authored by Sami Tolvanen's avatar Sami Tolvanen Committed by Gerrit Code Review
Browse files

Merge "Error correction: Use block_image_recover in block OTAs"

parents aabff90b f0a7c76b
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -1284,7 +1284,20 @@ class BlockDifference(object):
    else:
      ranges = self.src.care_map.subtract(self.src.clobbered_blocks)
      ranges_str = ranges.to_string_raw()
      if self.version >= 3:
      if self.version >= 4:
        script.AppendExtra(('if (range_sha1("%s", "%s") == "%s" || '
                            'block_image_verify("%s", '
                            'package_extract_file("%s.transfer.list"), '
                            '"%s.new.dat", "%s.patch.dat") || '
                            '(block_image_recover("%s", "%s") && '
                            'block_image_verify("%s", '
                            'package_extract_file("%s.transfer.list"), '
                            '"%s.new.dat", "%s.patch.dat"))) then') % (
                            self.device, ranges_str, self.src.TotalSha1(),
                            self.device, partition, partition, partition,
                            self.device, ranges_str,
                            self.device, partition, partition, partition))
      elif self.version == 3:
        script.AppendExtra(('if (range_sha1("%s", "%s") == "%s" || '
                            'block_image_verify("%s", '
                            'package_extract_file("%s.transfer.list"), '