Reputation: 6826
Is it possible to load a c library put into "A" package of a developer from a package called "B" of the same developer? (package = standalone application package on Play Store)
Basically, I want to check if "com.myapps.codecArmv6" exists from "com.myapps.mainapp" and if yes, I want to use System.loadLibrary on "com.myapps.codecArmv6"'s "abc.so" from a specific class of "com.myapps.mainapp".
Is this possible?
Upvotes: 0
Views: 215
Reputation: 57173
Yes, it is possible, even if the two apps are not signed by the same developer. Essentially, the native libs are unpacked by installer into /data/data/<app.package>/lib
or possibly elsewhere for Android version higher than 2.2, but with full read and execute permissions. You should use nativeLibraryDir method on 2.3 and higher to find the exact path.
Upvotes: 1