如何获得路径lib文件夹中已安装包 [英] How to get the path to the lib folder for an installed package
问题描述
共享库.so文件放在LIB / armeabi在APK文件。
Shared libraries .so files are placed in lib/armeabi in an apk file.
我已阅读安装后的库被提取到/数据/数据/ application_package / lib目录
I have read after installation the libs gets extracted to /data/data/application_package/lib
我怎样才能让我的在运行时应用到该目录的确切路径? 这是目录应用程序可读?还是只executeable允许访问? 如果是可读的 - 这是仍然如此受版权保护的应用程序
How can I get the exact path to this directory in my application at run time? Is this directory readable by the application? Or is only executeable access allowed? If it is readable - Is this still true for copy protected applications?
推荐答案
您可以用确切的路径:
String libraryPath = getContext().getApplicationInfo().dataDir + "/lib";
目录及其文件是由应用程序读取。
The directory and its files are readable by the application.
Unix的权限设置为 rwxr-X - X
。因此,应用程序
同组可以读取文件
The unix permissions are set to rwxr-x--x
. So applications with
the same group can read the files.
这篇关于如何获得路径lib文件夹中已安装包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!