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) {