From e34bbfc89b28209aaa26cd39be2c8e8e5aab1239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Gregorczyk?= Date: Mon, 20 Nov 2023 06:39:22 -0800 Subject: [PATCH] Back out "Back out "[soloader] add base apk paths from classloader into directAPK soSource"" Summary: Original commit changeset: 9ac080eac961 Reviewed By: simpleton, adicatana Differential Revision: D51447843 fbshipit-source-id: 5d2769d0fb31178784d41f458c09cf8825d85ad0 --- java/com/facebook/soloader/DirectApkSoSource.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/java/com/facebook/soloader/DirectApkSoSource.java b/java/com/facebook/soloader/DirectApkSoSource.java index 05b2a77..1a0492a 100644 --- a/java/com/facebook/soloader/DirectApkSoSource.java +++ b/java/com/facebook/soloader/DirectApkSoSource.java @@ -115,6 +115,17 @@ public String getLibraryPath(String soName) throws IOException { /*package*/ static Set getDirectApkLdPaths(Context context) { Set directApkPathSet = new HashSet<>(); + final String classLoaderLdLibraryPath = SysUtil.getClassLoaderLdLoadLibrary(); + if (classLoaderLdLibraryPath != null) { + LogUtil.w(SoLoader.TAG, "ClassLoader LdLibrary Path: " + classLoaderLdLibraryPath); + final String[] paths = classLoaderLdLibraryPath.split(":"); + for (final String path : paths) { + if (path.contains(".apk!/")) { + directApkPathSet.add(path); + } + } + } + final String apkPath = context.getApplicationInfo().sourceDir; final @Nullable String fallbackApkLdPath = getFallbackApkLdPath(apkPath); if (fallbackApkLdPath != null) {