I have a problem with permissions on Android 6.0 and higher.
The game I'm working on was using the WRITE_EXTERNAL_STORAGE permission. On Android 6.0 and higher the alert which asks a user to allow it had to be displayed.
I've received a request to get rid of this alert, which means, the game cannot use WRITE_EXTERNAL_STORAGE anymore.
Technically the game is not writing and reading the external storage anywhere right now. All saves and cached files are stored in the application-specific directory (/storage/emulated/0/Android/data/com.company.productname)
But, the game has to read (and sometimes download) the OBB file, which is stored in /storage/emulated/0/Android/obb/com.company.productname directory.
The game has an access to this directory, even without WRITE_EXTERNAL_STORAGE or READ_EXTERNAL_STORAGE on devices:
int32 Handle = open(LocalPath, O_RDONLY);
Ok, it seems the issue was listed somewhere else, but I couldn't find because I didn't know it was the exact issue...
The API23 for some reason set's the user of the OBB to root, not the proper user and because of it the app has no access to it.
After rebooting the device everything works fine.
At this point there is no clear workaround for this.