diff options
-rw-r--r-- | libnativeloader/library_namespaces.cpp | 1 | ||||
-rw-r--r-- | libnativeloader/native_loader.cpp | 4 | ||||
-rw-r--r-- | libnativeloader/public_libraries.cpp | 35 | ||||
-rwxr-xr-x | test/etc/run-test-jar | 8 |
4 files changed, 2 insertions, 46 deletions
diff --git a/libnativeloader/library_namespaces.cpp b/libnativeloader/library_namespaces.cpp index 59369eee43..2360819987 100644 --- a/libnativeloader/library_namespaces.cpp +++ b/libnativeloader/library_namespaces.cpp @@ -28,7 +28,6 @@ #include <android-base/file.h> #include <android-base/logging.h> #include <android-base/macros.h> -#include <android-base/properties.h> #include <android-base/result.h> #include <android-base/strings.h> #include <nativehelper/scoped_utf_chars.h> diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp index 30c7b5a377..545d04b5c8 100644 --- a/libnativeloader/native_loader.cpp +++ b/libnativeloader/native_loader.cpp @@ -49,8 +49,8 @@ namespace { // NATIVELOADER_DEFAULT_NAMESPACE_LIBS is an environment variable that can be // used when ro.debuggable is true to list extra libraries (separated by ":") -// that libnativeloader will load from the default namespace. The libraries must -// be listed without paths, and then LD_LIBRARY_PATH is typically set to the +// that libnativeloader will load from the default namespace. The libraries +// must be listed without paths, and then LD_LIBRARY_PATH is typically set to the // directories to load them from. The libraries will be available in all // classloader namespaces, and also in the fallback namespace used when no // classloader is given. diff --git a/libnativeloader/public_libraries.cpp b/libnativeloader/public_libraries.cpp index b565133d6a..827be5b370 100644 --- a/libnativeloader/public_libraries.cpp +++ b/libnativeloader/public_libraries.cpp @@ -28,7 +28,6 @@ #include <android-base/file.h> #include <android-base/logging.h> -#include <android-base/properties.h> #include <android-base/result.h> #include <android-base/strings.h> #include <log/log.h> @@ -65,11 +64,6 @@ std::string root_dir() { return android_root_env != nullptr ? android_root_env : "/system"; } -bool debuggable() { - static bool debuggable = android::base::GetBoolProperty("ro.debuggable", false); - return debuggable; -} - std::string vndk_version_str(bool use_product_vndk) { if (use_product_vndk) { static std::string product_vndk_version = get_vndk_version(true); @@ -80,16 +74,6 @@ std::string vndk_version_str(bool use_product_vndk) { } } -// For debuggable platform builds use ANDROID_ADDITIONAL_PUBLIC_LIBRARIES environment -// variable to add libraries to the list. This is intended for platform tests only. -std::string additional_public_libraries() { - if (debuggable()) { - const char* val = getenv("ANDROID_ADDITIONAL_PUBLIC_LIBRARIES"); - return val ? val : ""; - } - return ""; -} - // insert vndk version in every {} placeholder void InsertVndkVersionStr(std::string* file_name, bool use_product_vndk) { CHECK(file_name != nullptr); @@ -175,12 +159,6 @@ static std::string InitDefaultPublicLibraries(bool for_preload) { return ""; } - std::string additional_libs = additional_public_libraries(); - if (!additional_libs.empty()) { - auto vec = base::Split(additional_libs, ":"); - std::copy(vec.begin(), vec.end(), std::back_inserter(*sonames)); - } - // If this is for preloading libs, don't remove the libs from APEXes. if (for_preload) { return android::base::Join(*sonames, ':'); @@ -189,11 +167,6 @@ static std::string InitDefaultPublicLibraries(bool for_preload) { // Remove the public libs provided by apexes because these libs are available // from apex namespaces. for (const auto& p : apex_public_libraries()) { - // TODO(b/167578583) remove this `if` block after fixing the bug - // Skip ART APEX to keep behaviors - if (p.first == "com_android_art") { - continue; - } auto public_libs = base::Split(p.second, ":"); sonames->erase(std::remove_if(sonames->begin(), sonames->end(), [&public_libs](const std::string& v) { return std::find(public_libs.begin(), public_libs.end(), v) != public_libs.end(); @@ -472,14 +445,6 @@ Result<std::map<std::string, std::string>> ParseApexLibrariesConfig(const std::s } entries[config_line->apex_namespace] = config_line->library_list; } - - // TODO(b/167578583) remove this `if` block after fixing the bug - if (tag == "public") { - std::string additional_libs = additional_public_libraries(); - if (!additional_libs.empty()) { - entries["com_android_art"] += ':' + additional_libs; - } - } return entries; } diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index ba3c4eb60f..105af41769 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -1172,14 +1172,6 @@ if [ "$HOST" = "n" ]; then # which generates `libhiddenapitest_*.so` libraries in `$DEX_LOCATION`). LD_LIBRARY_PATH="$DEX_LOCATION:$LD_LIBRARY_PATH" - # System libraries needed by libarttestd.so - PUBLIC_LIBS=libc++.so:libbacktrace.so:libbase.so:libnativehelper.so - if [ "$TEST_IS_NDEBUG" = "y" ]; then - PUBLIC_LIBS=$PUBLIC_LIBS:libart.so:libdexfile.so:libprofile.so:libartbase.so - else - PUBLIC_LIBS=$PUBLIC_LIBS:libartd.so:libdexfiled.so:libprofiled.so:libartbased.so - fi - # Prepend directories to the path on device. PREPEND_TARGET_PATH=$ANDROID_ART_BIN_DIR if [ "$ANDROID_ROOT" != "/system" ]; then |