From ceb07b3285eaab350a8cd12f7d74be3e40a255dd Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Thu, 10 Dec 2015 09:33:21 -0800 Subject: Revert "Revert "Add support for LZ4 compressed image files"" Needed to call compiler_driver_->SetSupportBootImageFixup(false). Bug: 22858531 This reverts commit 83d4d72aa0e4170209ab50c67ba22e46b71352c1. Change-Id: Iaed6a810a0c088f1f2c57cf2f12087f3978a3de1 --- patchoat/patchoat.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'patchoat/patchoat.cc') diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc index 723bb1762d..46ab34bea3 100644 --- a/patchoat/patchoat.cc +++ b/patchoat/patchoat.cc @@ -153,6 +153,12 @@ bool PatchOat::Patch(const std::string& image_location, off_t delta, return false; } + if (image_header.GetStorageMode() != ImageHeader::kStorageModeUncompressed) { + LOG(ERROR) << "Patchoat is not supported with compressed image files " + << input_image->GetPath(); + return false; + } + /*bool is_image_pic = */IsImagePic(image_header, input_image->GetPath()); // Nothing special to do right now since the image always needs to get patched. // Perhaps in some far-off future we may have images with relative addresses that are true-PIC. -- cgit v1.2.3-59-g8ed1b