Trying to access file using native code. Error:filesystem error: in directory_iterator::directory_iterator(...): Permission denied [.]

43 views Asked by At

I'm trying to get access to a file in my app's data folder form native code. It is not able to access because of some SE Linux Policy. I also have all files access permission too.

This is the code used to load the file: std::ifstream f(modelPath, std::ios::binary);

filesystem error: in directory_iterator::directory_iterator(...): Permission denied [.] Trying to access file in "/storage/emulated/0/Android/data/appname/files/Documents/model.bin".

I tried using different directories etc, but still get the same error.

0

There are 0 answers