I have a C++ library compiled for Android (*.so) and need to implement functionality in Flutter using it. The library connected normally using standard ffi tools. Along with the library there is a configuration file, which must be located in the same directory as the library. The library should read and write it regularly.
The compiled application for Android prevents the library from working with the configuration file.
Current permissions of application:
Here's the solution: don't have it read/write to the same directory as the dynamic library.
Instead, you have two options:
I can't remember exactly where dynamic libraries are put, but think of it this way: if an app is able to read/write to that folder, what is stopping arbitrary code execution from taking place? You could have some malicious code write to a new .so file, and load that into the app, and bingo, you just got around Google Play's restrictions and malware protections. This probably isn't going to be possible without a rooted phone and distributing outside of one of the stores.