From af12c94e79a724e8c9edb07963a97e9b078f3e79 Mon Sep 17 00:00:00 2001 From: Victor Chang Date: Mon, 11 Feb 2019 19:35:24 +0000 Subject: Redirect /system/lib/libicuuc.so regardless of duplication in /system The change is a workaround of app compat issue until the app fixes the issue. Likely, the app does not only dlopen(), but open() the libicuuc.so with the absolute path. Note that platform uses the stub libandroidicu.so, not libicuuc directly. This CL topic moves (not duplicates) libandroidicu from /system to /apex. Even though /system/lib/libicuuc.so is kept in the default namespace, but no one should be using it. Some debug info after this CL: $ adb shell cat /proc//maps | grep libicuuc $ adb shell cat /proc//maps | grep libicuuc Only /apex/com.android.runtime/lib64/libicuuc.so is found, not the /system. Bug: 124218500 Test: The app can be launched successfully Test: CtsJniTestCases Change-Id: I67a50f0ad934be567a63d4038215546c9b4e5f7e --- linker/linker.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'linker/linker.cpp') diff --git a/linker/linker.cpp b/linker/linker.cpp index e12a28c2b..fafead467 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -2165,9 +2165,13 @@ void* do_dlopen(const char* name, int flags, new_name); // Some APEXs could be optionally disabled. Only translate the path // when the old file is absent and the new file exists. + // TODO(b/124218500): Re-enable it once app compat issue is resolved + /* if (file_exists(name)) { LD_LOG(kLogDlopen, "dlopen %s exists, not translating", name); - } else if (!file_exists(new_name)) { + } else + */ + if (!file_exists(new_name)) { LD_LOG(kLogDlopen, "dlopen %s does not exist, not translating", new_name); } else { -- cgit v1.2.3