I am loading the dex file from an APK dynamically using DexClassLoader
and the APK contains native libraries also packaged in the following paths,
library.apk
├── classes.dex
├── lib
├── armeabi-v7a
├── libNativeLib.so
The DexClassLoader
accepts an filePath to search for native libraries to load,
DexClassLoader (String dexPath,
String optimizedDirectory,
String librarySearchPath,
ClassLoader parent)`
librarySearchPath String: the list of directories containing native libraries, delimited by File.pathSeparator; may be null
But this search path only seems to accept the filesystem path.
Is there a way to provide a native library search path inside the APK directly or should I manually extract the native libraries to some location and provide the extracted path?