0

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?

frankish
  • 6,738
  • 9
  • 49
  • 100

1 Answers1

1

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.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307
  • Thanks! Can I find an alternative for 2.2? I want to support 2.2 and newer devices. – frankish Aug 15 '13 at 08:05
  • On 2.2, the path is fixed as described in http://stackoverflow.com/questions/2603648/how-to-get-the-path-to-the-lib-folder-for-an-installed-package – Alex Cohn Aug 15 '13 at 09:24