Skip to content

Commit

Permalink
Back out "Back out "[soloader] add base apk paths from classloader in…
Browse files Browse the repository at this point in the history
…to directAPK soSource""

Summary: Original commit changeset: 9ac080eac961

Reviewed By: simpleton, adicatana

Differential Revision: D51447843

fbshipit-source-id: 5d2769d0fb31178784d41f458c09cf8825d85ad0
  • Loading branch information
michalgr authored and facebook-github-bot committed Nov 20, 2023
1 parent 0ec7298 commit e34bbfc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions java/com/facebook/soloader/DirectApkSoSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ public String getLibraryPath(String soName) throws IOException {
/*package*/ static Set<String> getDirectApkLdPaths(Context context) {
Set<String> 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) {
Expand Down

0 comments on commit e34bbfc

Please sign in to comment.