Shared libraries .so files are placed in lib/armeabi in an apk file.
I have read after installation the libs gets extracted to /data/data/application_package/lib
String libraryPath = context.getFilesDir().getParentFile().getPath() + "/lib";
For better compatibility, use the following function:
@TargetApi(Build.VERSION_CODES.GINGERBREAD)
public static String getLibraryDirectory(Context context) {
int sdk_level = android.os.Build.VERSION.SDK_INT;
if (sdk_level >= Build.VERSION_CODES.GINGERBREAD) {
return context.getApplicationInfo().nativeLibraryDir;
}
else if (sdk_level >= Build.VERSION_CODES.DONUT) {
return context.getApplicationInfo().dataDir + "/lib";
}
return "/data/data/" + context.getPackageName() + "/lib";
}