Update references to the ART APEX.
Test: Build & boot
Test: atest CtsJniTestCases CtsCompilationTestCases CtsSimpleperfTestCases CtsBionicTestCases
Bug: 135753770
Change-Id: I9635afaf7996407063a0d9ed474b95c0b0e4f890
Merged-In: I9635afaf7996407063a0d9ed474b95c0b0e4f890
diff --git a/build/apex/ld.config.txt b/build/apex/ld.config.txt
index c94437e..faad7cb 100644
--- a/build/apex/ld.config.txt
+++ b/build/apex/ld.config.txt
@@ -1,6 +1,6 @@
# Copyright (C) 2018 The Android Open Source Project
#
-# Bionic loader config file for the Runtime APEX.
+# Bionic loader config file for the ART APEX.
#
# There are no versioned APEX paths here - this APEX module does not support
# having several versions mounted.
@@ -31,12 +31,12 @@
namespace.runtime.visible = true
# Keep in sync with the "runtime" namespace in system/core/rootdir/etc/ld.config*.txt.
-namespace.runtime.search.paths = /apex/com.android.runtime/${LIB}
-namespace.runtime.asan.search.paths = /apex/com.android.runtime/${LIB}
+namespace.runtime.search.paths = /apex/com.android.art/${LIB}
+namespace.runtime.asan.search.paths = /apex/com.android.art/${LIB}
# JVMTI libraries used in ART testing are located under /data; dalvikvm
# has to be able to dlopen them.
# TODO(b/129534335): Move this to the linker configuration of the Test
-# Runtime APEX when it is available.
+# ART APEX when it is available.
namespace.runtime.permitted.paths = /data
# odex files are in /system/framework. dalvikvm has to be able to dlopen the
# files for CTS.
diff --git a/build/apex/runtests.sh b/build/apex/runtests.sh
index df53572..004e705 100755
--- a/build/apex/runtests.sh
+++ b/build/apex/runtests.sh
@@ -127,10 +127,10 @@
# Test all modules
apex_modules=(
- "com.android.runtime.release"
- "com.android.runtime.debug"
- "com.android.runtime.testing"
- "com.android.runtime.host"
+ "com.android.art.release"
+ "com.android.art.debug"
+ "com.android.art.testing"
+ "com.android.art.host"
)
# Build the APEX packages (optional).
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 9581947..91d6513 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -187,7 +187,7 @@
// Construct the final output.
if (command.size() <= 1U) {
- // It seems only "/apex/com.android.runtime/bin/dex2oat" is left, or not
+ // It seems only "/apex/com.android.art/bin/dex2oat" is left, or not
// even that. Use a pretty line.
return "Starting dex2oat.";
}
diff --git a/libartbase/base/file_utils.cc b/libartbase/base/file_utils.cc
index d74cc14..4f102b8 100644
--- a/libartbase/base/file_utils.cc
+++ b/libartbase/base/file_utils.cc
@@ -71,7 +71,7 @@
static constexpr const char* kAndroidDataEnvVar = "ANDROID_DATA";
static constexpr const char* kAndroidDataDefaultPath = "/data";
static constexpr const char* kAndroidRuntimeRootEnvVar = "ANDROID_RUNTIME_ROOT";
-static constexpr const char* kAndroidRuntimeApexDefaultPath = "/apex/com.android.runtime";
+static constexpr const char* kAndroidArtApexDefaultPath = "/apex/com.android.art";
static constexpr const char* kAndroidConscryptRootEnvVar = "ANDROID_CONSCRYPT_ROOT";
static constexpr const char* kAndroidConscryptApexDefaultPath = "/apex/com.android.conscrypt";
@@ -80,8 +80,7 @@
// located:
// - on host this "root" is normally the Android Root (e.g. something like
// "$ANDROID_BUILD_TOP/out/host/linux-x86/");
-// - on target this "root" is normally the Android Runtime Root
-// ("/apex/com.android.runtime").
+// - on target this "root" is normally the ART Root ("/apex/com.android.art").
// Return the empty string if that directory cannot be found or if this code is
// run on Windows or macOS.
static std::string GetRootContainingLibartbase() {
@@ -125,7 +124,7 @@
// information to infer the location of the Android Root (on host only).
//
// Note that this could change in the future, if we decided to install ART
- // artifacts in a different location, e.g. within a "Runtime APEX" directory.
+ // artifacts in a different location, e.g. within an "ART APEX" directory.
if (!kIsTargetBuild) {
std::string root_containing_libartbase = GetRootContainingLibartbase();
if (!root_containing_libartbase.empty()) {
@@ -187,7 +186,7 @@
static std::string GetAndroidRuntimeRootSafe(bool must_exist, /*out*/ std::string* error_msg) {
#ifdef _WIN32
- UNUSED(kAndroidRuntimeRootEnvVar, kAndroidRuntimeApexDefaultPath, GetRootContainingLibartbase);
+ UNUSED(kAndroidRuntimeRootEnvVar, kAndroidArtApexDefaultPath, GetRootContainingLibartbase);
UNUSED(must_exist);
*error_msg = "GetAndroidRuntimeRootSafe unsupported for Windows.";
return "";
@@ -206,20 +205,20 @@
// On target, libartbase is normally installed in
// "$ANDROID_RUNTIME_ROOT/lib(64)" (e.g. something like
- // "/apex/com.android.runtime/lib(64)". Use this information to infer the
- // location of the Android Runtime Root (on target only).
+ // "/apex/com.android.art/lib(64)". Use this information to infer the
+ // location of the ART Root (on target only).
if (kIsTargetBuild) {
// *However*, a copy of libartbase may still be installed outside the
- // Android Runtime Root on some occasions, as ART target gtests install
- // their binaries and their dependencies under the Android Root, i.e.
- // "/system" (see b/129534335). For that reason, we cannot reliably use
- // `GetRootContainingLibartbase` to find the Android Runtime Root.
- // (Note that this is not really a problem in practice, as Android Q devices
- // define ANDROID_RUNTIME_ROOT in their default environment, and will
- // instead use the logic above anyway.)
+ // ART Root on some occasions, as ART target gtests install their binaries
+ // and their dependencies under the Android Root, i.e. "/system" (see
+ // b/129534335). For that reason, we cannot reliably use
+ // `GetRootContainingLibartbase` to find the ART Root. (Note that this is
+ // not really a problem in practice, as Android Q devices define
+ // ANDROID_RUNTIME_ROOT in their default environment, and will instead use
+ // the logic above anyway.)
//
// TODO(b/129534335): Re-enable this logic when the only instance of
- // libartbase on target is the one from the Runtime APEX.
+ // libartbase on target is the one from the ART APEX.
if ((false)) {
std::string root_containing_libartbase = GetRootContainingLibartbase();
if (!root_containing_libartbase.empty()) {
@@ -229,12 +228,12 @@
}
// Try the default path.
- if (must_exist && !OS::DirectoryExists(kAndroidRuntimeApexDefaultPath)) {
- *error_msg = StringPrintf("Failed to find default Android Runtime Root directory %s",
- kAndroidRuntimeApexDefaultPath);
+ if (must_exist && !OS::DirectoryExists(kAndroidArtApexDefaultPath)) {
+ *error_msg = StringPrintf("Failed to find default ART Root directory %s",
+ kAndroidArtApexDefaultPath);
return "";
}
- return kAndroidRuntimeApexDefaultPath;
+ return kAndroidArtApexDefaultPath;
#endif
}
@@ -254,11 +253,11 @@
std::string GetAndroidRuntimeBinDir() {
// Environment variable `ANDROID_RUNTIME_ROOT` is defined as
- // `$ANDROID_HOST_OUT/com.android.runtime` on host. However, host ART binaries
- // are still installed in `$ANDROID_HOST_OUT/bin` (i.e. outside the Android
- // Runtime Root). The situation is cleaner on target, where
- // `ANDROID_RUNTIME_ROOT` is `$ANDROID_ROOT/apex/com.android.runtime` and ART
- // binaries are installed in `$ANDROID_ROOT/apex/com.android.runtime/bin`.
+ // `$ANDROID_HOST_OUT/com.android.art` on host. However, host ART binaries are
+ // still installed in `$ANDROID_HOST_OUT/bin` (i.e. outside the ART Root). The
+ // situation is cleaner on target, where `ANDROID_RUNTIME_ROOT` is
+ // `$ANDROID_ROOT/apex/com.android.art` and ART binaries are installed in
+ // `$ANDROID_ROOT/apex/com.android.art/bin`.
std::string android_runtime_root = kIsTargetBuild ? GetAndroidRuntimeRoot() : GetAndroidRoot();
return android_runtime_root + "/bin";
}
@@ -474,7 +473,7 @@
/* must_exist= */ kIsTargetBuild,
&error_msg);
const char* runtime_root = GetAndroidDirSafe(kAndroidRuntimeRootEnvVar,
- kAndroidRuntimeApexDefaultPath,
+ kAndroidArtApexDefaultPath,
/* must_exist= */ kIsTargetBuild,
&error_msg);
return (android_root != nullptr)
diff --git a/libartbase/base/file_utils.h b/libartbase/base/file_utils.h
index 7e1923a..776dc3d 100644
--- a/libartbase/base/file_utils.h
+++ b/libartbase/base/file_utils.h
@@ -41,15 +41,15 @@
// These methods return the Android Runtime Root, which is the location of the
// (activated) Android Runtime APEX module. On target, this is normally
-// "/apex/com.android.runtime". On host, this is usually a subdirectory of the
+// "/apex/com.android.art". On host, this is usually a subdirectory of the
// Android Root, e.g.
-// "$ANDROID_BUILD_TOP/out/host/linux-x86/com.android.runtime". The location of
+// "$ANDROID_BUILD_TOP/out/host/linux-x86/com.android.art". The location of
// the Android Runtime Root can be overriden using the ANDROID_RUNTIME_ROOT
// environment variable.
//
-// Find $ANDROID_RUNTIME_ROOT, /apex/com.android.runtime, or abort.
+// Find $ANDROID_RUNTIME_ROOT, /apex/com.android.art, or abort.
std::string GetAndroidRuntimeRoot();
-// Find $ANDROID_RUNTIME_ROOT, /apex/com.android.runtime, or return an empty string.
+// Find $ANDROID_RUNTIME_ROOT, /apex/com.android.art, or return an empty string.
std::string GetAndroidRuntimeRootSafe(/*out*/ std::string* error_msg);
// Return the path to the directory containing the Android Runtime binaries.
@@ -96,7 +96,7 @@
// ReplaceFileExtension("foo", "abc") == "foo.abc"
std::string ReplaceFileExtension(const std::string& filename, const std::string& new_extension);
-// Return whether the location is on /apex/com.android.runtime
+// Return whether the location is on /apex/com.android.art
bool LocationIsOnRuntimeModule(const char* location);
// Return whether the location is on /apex/com.android.conscrypt
diff --git a/libartbase/base/logging.h b/libartbase/base/logging.h
index 68ad9fc..9d83e51 100644
--- a/libartbase/base/logging.h
+++ b/libartbase/base/logging.h
@@ -75,7 +75,7 @@
// performed.
extern const char* GetCmdLine();
-// The command used to start the ART runtime, such as "/apex/com.android.runtime/bin/dalvikvm". If
+// The command used to start the ART runtime, such as "/apex/com.android.art/bin/dalvikvm". If
// InitLogging hasn't been performed then just returns "art".
extern const char* ProgramInvocationName();
diff --git a/tools/art b/tools/art
index ece4fc3..e08a79f 100644
--- a/tools/art
+++ b/tools/art
@@ -432,18 +432,18 @@
# This script is used on host and target (device). However, the (expected)
# default value `ANDROID_RUNTIME_ROOT` is not the same on host and target:
# - on host, `ANDROID_RUNTIME_ROOT` is expected to be
- # "$ANDROID_ROOT/com.android.runtime";
+ # "$ANDROID_ROOT/com.android.art";
# - on target, `ANDROID_RUNTIME_ROOT` is expected to be
- # "/apex/com.android.runtime".
+ # "/apex/com.android.art".
#
# We use the presence/absence of the `$ANDROID_ROOT/../apex` directory to
# determine whether we are on target or host (this is brittle, but simple).
if [ -d "$ANDROID_ROOT/../apex" ]; then
# Target case.
- ANDROID_RUNTIME_ROOT="/apex/com.android.runtime"
+ ANDROID_RUNTIME_ROOT="/apex/com.android.art"
else
# Host case.
- ANDROID_RUNTIME_ROOT="$ANDROID_ROOT/com.android.runtime"
+ ANDROID_RUNTIME_ROOT="$ANDROID_ROOT/com.android.art"
fi
fi
diff --git a/tools/common/common.py b/tools/common/common.py
index c80ebf5..93b014a 100755
--- a/tools/common/common.py
+++ b/tools/common/common.py
@@ -300,7 +300,7 @@
lib = 'lib64' if x64 else 'lib'
android_root = GetEnvVariableOrError('ANDROID_HOST_OUT')
android_i18n_root = android_root + '/com.android.i18n'
- android_runtime_root = android_root + '/com.android.runtime'
+ android_runtime_root = android_root + '/com.android.art'
android_tzdata_root = android_root + '/com.android.tzdata'
library_path = android_root + '/' + lib
path = android_root + '/bin'
diff --git a/tools/host_bcp.sh b/tools/host_bcp.sh
index bb12a02..1dea295 100755
--- a/tools/host_bcp.sh
+++ b/tools/host_bcp.sh
@@ -22,7 +22,7 @@
--runtime-arg -Xbootclasspath:...
--runtime-arg -Xbootclasspath-locations:...
arguments for many ART host tools based on the \$ANDROID_PRODUCT_OUT variable
-and existing \$ANDROID_PRODUCT_OUT/apex/com.android.runtime* paths.
+and existing \$ANDROID_PRODUCT_OUT/apex/com.android.art* paths.
If --use-first-dir is specified, the script will use the first apex dir instead
of resulting in an error.
EOF
@@ -51,20 +51,20 @@
fi
MANIFEST=/apex_manifest.json
-RUNTIME_APEX=/apex/com.android.runtime
-RUNTIME_APEX_SELECTED=
-for m in `ls -1 -d ${ANDROID_PRODUCT_OUT}{,/system}${RUNTIME_APEX}*${MANIFEST} 2>/dev/null`; do
+ART_APEX=/apex/com.android.art
+ART_APEX_SELECTED=
+for m in `ls -1 -d ${ANDROID_PRODUCT_OUT}{,/system}${ART_APEX}*${MANIFEST} 2>/dev/null`; do
d=${m:0:-${#MANIFEST}}
- if [[ "x${RUNTIME_APEX_SELECTED}" != "x" ]]; then
+ if [[ "x${ART_APEX_SELECTED}" != "x" ]]; then
if [[ $USE_FIRST_DIR == true ]]; then
break
fi
- echo "Multiple Runtime apex dirs: ${RUNTIME_APEX_SELECTED}, ${d}."
+ echo "Multiple Runtime apex dirs: ${ART_APEX_SELECTED}, ${d}."
exit 1
fi
- RUNTIME_APEX_SELECTED=${d}
+ ART_APEX_SELECTED=${d}
done
-if [[ "x${RUNTIME_APEX_SELECTED}" == "x" ]]; then
+if [[ "x${ART_APEX_SELECTED}" == "x" ]]; then
echo "No Runtime apex dir."
exit 1
fi
@@ -75,9 +75,9 @@
for COMPONENT in ${BCPL}; do
HEAD=${ANDROID_PRODUCT_OUT}
TAIL=${COMPONENT}
- if [[ ${COMPONENT:0:${#RUNTIME_APEX}} = ${RUNTIME_APEX} ]]; then
- HEAD=${RUNTIME_APEX_SELECTED}
- TAIL=${COMPONENT:${#RUNTIME_APEX}}
+ if [[ ${COMPONENT:0:${#ART_APEX}} = ${ART_APEX} ]]; then
+ HEAD=${ART_APEX_SELECTED}
+ TAIL=${COMPONENT:${#ART_APEX}}
fi
if [[ ! -e $HEAD$TAIL ]]; then
echo "File does not exist: $HEAD$TAIL"