Android: about /data/data/package_name/lib directory
You cannot write to lib/, however you do not need to.
You can write to any non-reserved location within your your application‘s private storage area, and you can load a native library from any file on the device for which you have read and execute permission, using System.load() with the full pathname, rather than System.loadLibrary() with the short library name.
The external storage (sdcard) is mounted with a non-executable flag, but a file in your private storage directory would be a workable solution. Just be sure to make it only writable by your application, so that something else can‘t change it behind your back (it is because you cannot protect external storage files from such modification that the external storage is non-executable)
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。