Hi,
I am checking on permissive and Enforcing mechanism of selinux(SE Linux) in
Android 5.0. I have placed .so file in
/data/data/packageName/files/libtestcalc.so.
when the device is in permissive mode,
System.load("/data/data/packageName/files/libtestcalc.so"); - works fine
and I am able to access the methods of .so file with out any exceptions.
The same, System.load("/data/data/packageName/files/libtestcalc.so"); is
not working when the device is in Enforcing mode and I am getting exception
as follows.
java.lang.UnsatisfiedLinkError: dlopen failed: couldn't map
"/data/data/packageName/files/libtestcalc.so" segment 1: Permission denied
I guess in both the modes, same call flow will occur. I mean
System.load(..)->Runtime.getRuntime().load(..)->Runtime.getRuntime(..).doload(..)->Runtime.getRuntime().nativeLoad(..)
@Runtime.java->doLoad(..) documentation mentioned as "nativeLoad should be
synchronized so there's only one LD_LIBRARY_PATH in use regardless..."
When this LD_LIBRARY_PATH will get updated?
How android is differentiating the load files by modes? Want to know other
ways to load .so file from "/data/data/packageName/files/".
Regards,
Skore
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.