diff options
author | 2023-05-12 13:05:43 +0000 | |
---|---|---|
committer | 2023-05-12 13:05:43 +0000 | |
commit | ff9684269df824f7eb2709b5b5b6ec8386f67d2f (patch) | |
tree | 24a5522a6370d2e9f24a4202af492e0428773d3d /libartbase/base/file_utils.cc | |
parent | ac5afa19bdd77e1676db5a06d350f2fd6e72743d (diff) | |
parent | 2d3ed25967284dc1368de5885b1c01b792221692 (diff) |
Use the full boot image on U and above. am: 1b8a7838e9 am: 3bf4150ce4 am: 2d3ed25967
Original change: https://android-review.googlesource.com/c/platform/art/+/2585519
Change-Id: I6113c97199ea73fa8180223b2b1792aa762fa03a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'libartbase/base/file_utils.cc')
-rw-r--r-- | libartbase/base/file_utils.cc | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/libartbase/base/file_utils.cc b/libartbase/base/file_utils.cc index 8ef8ce1e1a..b4d8440ef3 100644 --- a/libartbase/base/file_utils.cc +++ b/libartbase/base/file_utils.cc @@ -64,6 +64,10 @@ #include <linux/unistd.h> #endif +#ifdef ART_TARGET_ANDROID +#include "android-modules-utils/sdk_level.h" +#endif + namespace art { using android::base::StringPrintf; @@ -473,23 +477,36 @@ std::string GetDefaultBootImageLocationSafe(const std::string& android_root, } } - // Boot image consists of three parts: - // - the primary boot image (contains the Core Libraries) - // - the boot image framework extension (contains framework libraries) + // Boot image consists of two parts: + // - the primary boot image (contains the Core Libraries and framework libraries) // - the boot image mainline extension (contains mainline framework libraries) - // Typically "/system/framework/boot.art!/apex/com.android.art/etc/boot-image.prof: - // /system/framework/boot-framework.art!/system/etc/boot-image.prof: + // Typically "/system/framework/boot.art + // !/apex/com.android.art/etc/boot-image.prof!/system/etc/boot-image.prof: // /system/framework/boot-framework-adservices.art". - std::string location = StringPrintf("%s/%s.art!%s/%s:%s/framework/%s-framework.art!%s/%s", + std::string location = StringPrintf("%s/%s.art!%s/%s!%s/%s", GetPrebuiltPrimaryBootImageDir(android_root).c_str(), kBootImageStem, kAndroidArtApexDefaultPath, kEtcBootImageProf, android_root.c_str(), - kBootImageStem, - android_root.c_str(), kEtcBootImageProf); + +#ifdef ART_TARGET_ANDROID + // Prior to U, there was a framework extension. + if (!android::modules::sdklevel::IsAtLeastU()) { + location = StringPrintf("%s/%s.art!%s/%s:%s/framework/%s-framework.art!%s/%s", + GetPrebuiltPrimaryBootImageDir(android_root).c_str(), + kBootImageStem, + kAndroidArtApexDefaultPath, + kEtcBootImageProf, + android_root.c_str(), + kBootImageStem, + android_root.c_str(), + kEtcBootImageProf); + } +#endif + if (!MaybeAppendBootImageMainlineExtension(android_root, /*deny_system_files=*/false, deny_art_apex_data_files, |