我正在尝试读取xposed模块中的文件。该文件驻留在/data/data/<my package name>/files/中
我试过了-
File conf = new File(Environment.getDataDir()+"/data/<my package name>/files/filename");
BaseService baseService = SELinuxHelper.getAppDataFileService();
InputStream inputStream = baseService.getFileInputStream(conf.getName());然后使用inputStream读取文件。然而,它给了我Permission denied错误。
那么,我如何在xposed类中访问我的文件。
发布于 2016-12-31 04:08:03
在InputStream inputStream = baseService.getFileInputStream(conf.getName());中,您将文件名作为参数传递给BaseService.getFileInputStream(String),而根据XposedBridge应用编程接口,您应该传递文件的绝对路径。
0
https://stackoverflow.com/questions/41024722
复制相似问题