I have an .so file that I packed into an obb expansion. It's about 20 megabytes.
I'm trying to use
System.load("/storage/emulated/0/Android/obb/com.mypackage.myapp/libtest.so");
to load the library. But I get the error:
dlopen("/storage/emulated/0/Android/obb/com.mypackage.myapp/libtest.so", RTLD_LAZY) failed: dlopen failed: couldn't map "/storage/emulated/0/Android/obb/com.mypackage.myapp/libtest.so" segment 2: Permission denied
type=1400 audit(0.0:8): avc: denied { execute } for path="/storage/emulated/0/Android/obb/com.mypackage.myapp/libtest.so" dev="fuse" ino=367663176224 scontext=u:r:untrusted_app:s0 tcontext=u:object_r:fuse:s0 tclass=file permissive=0
So I realized that we're not permitted to have an executable there.
So my question is,
1- Where should extract the file to be able to do this?
2- What function call should I make?
Thank you.