diff options
author | Andreas Gampe <agampe@google.com> | 2018-10-03 11:27:09 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2018-10-03 11:29:16 -0700 |
commit | 3ad80d20cff4e77968994151c5fc47ca4e7f2db3 (patch) | |
tree | 07389503e5468ce44c1f86efd77a900b2feca2a9 | |
parent | cd1ce760e8109eb91ce9d3e91fdaabb866262045 (diff) | |
download | native-3ad80d20cff4e77968994151c5fc47ca4e7f2db3.tar.gz |
Otapreopt: Remove patchoat step
Corresponds to ART commit a497a39fe8830fe7b1c1c23b413753fe4e12923b.
Bug: 77856493
Test: installd_otapreopt_test
Test: manual
Change-Id: I0c1b37f78570f306a8bbc50a9a9c54126bb3865e
-rw-r--r-- | cmds/installd/otapreopt.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/cmds/installd/otapreopt.cpp b/cmds/installd/otapreopt.cpp index 73098f80e4..28c7658d6e 100644 --- a/cmds/installd/otapreopt.cpp +++ b/cmds/installd/otapreopt.cpp @@ -361,12 +361,11 @@ private: } std::string preopted_boot_art_path = StringPrintf("/system/framework/%s/boot.art", isa); - if (access(preopted_boot_art_path.c_str(), F_OK) == 0) { - return PatchoatBootImage(isa_path, isa); - } else { + if (access(preopted_boot_art_path.c_str(), F_OK) != 0) { // No preopted boot image. Try to compile. return Dex2oatBootImage(boot_classpath_, art_path, oat_path, isa); } + return true; } static bool CreatePath(const std::string& path) { @@ -431,29 +430,6 @@ private: CHECK_EQ(0, closedir(c_dir)) << "Unable to close directory."; } - bool PatchoatBootImage(const std::string& output_dir, const char* isa) const { - // This needs to be kept in sync with ART, see art/runtime/gc/space/image_space.cc. - - std::vector<std::string> cmd; - cmd.push_back("/system/bin/patchoat"); - - cmd.push_back("--input-image-location=/system/framework/boot.art"); - cmd.push_back(StringPrintf("--output-image-directory=%s", output_dir.c_str())); - - cmd.push_back(StringPrintf("--instruction-set=%s", isa)); - - int32_t base_offset = ChooseRelocationOffsetDelta(art::GetImageMinBaseAddressDelta(), - art::GetImageMaxBaseAddressDelta()); - cmd.push_back(StringPrintf("--base-offset-delta=%d", base_offset)); - - std::string error_msg; - bool result = Exec(cmd, &error_msg); - if (!result) { - LOG(ERROR) << "Could not generate boot image: " << error_msg; - } - return result; - } - bool Dex2oatBootImage(const std::string& boot_cp, const std::string& art_path, const std::string& oat_path, |