CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.26k stars 4.11k forks source link

Android13 denies access to android/data. #60740

Open T5idr3 opened 2 years ago

T5idr3 commented 2 years ago

Describe the bug

Android13 doesn't allow access to android/data and android/obb using the file manager. This makes it impossible to install user mods or sound.

Steps to reproduce

  1. install cdda.
  2. Launch app to extract files.
  3. Access android/data with file manager.
  4. there is nothing there.

Expected behavior

Find com.cleverraven.cataclysmdda.*/files and customize your game.

Screenshots

No response

Versions and configuration

Additional context

It is advisable to change the game data reference to out of the android/data/* folder.

RelMayers commented 2 years ago

It already uses shared storage i think, it has permission for it. Have you started game to have it extract files?

T5idr3 commented 2 years ago

It already uses shared storage i think, it has permission for it. Have you started game to have it extract files?

I cleaned up and started the game. But the extracted files are nowhere to be found. 'All files access' and requested permissions are already set to allowed

T5idr3 commented 1 year ago

I have tried several file managers and cannot find one with the desired permissions.

I-am-Erk commented 1 year ago

If we cannot resolve this core issue for stable, we should at least try to establish a workaround for some of the issues like fonts that can be gamebreaking without folder access.

Inglonias commented 1 year ago

You can access the folder by hooking your phone to a computer. You may also need to enable USB debugging on your phone, but don't quote me on that.

image

Zireael07 commented 1 year ago

That's a workaround, not a fix for the core issue.

Inglonias commented 1 year ago

Doesn't the game have a command line option to separate the user data and core data folders? Can we use that? I know the Catapult launcher does that

kevingranade commented 1 year ago

We are using SDL_AndroidGetExternalStoragePath() to set our base path. See https://github.com/CleverRaven/Cataclysm-DDA/blob/1c67d46dec06d402b8b1ed7630adfff5a83631cf/src/main.cpp#L632

AFAIK that is our best bet for making the game data as accessible as possible, if you have an alternative to propose that will make the situation better, I'd like to hear it, but we don't know where is accessable on your system, so there is not enough information to go on here.

There are some "wrong" options we could pursue like storing this data in the "documents" folder, but the status quo is that android does not want to allow what you are describing.

Another option is adding workflows where you place fonts/mods/tilesets somewhere in the media directories, and cataclysm finds and imports them at startup.

Zireael07 commented 1 year ago

Another option is adding workflows where you place fonts/mods/tilesets somewhere in the media directories, and cataclysm finds and imports them at startup.

I suspect this is the way to go going forward (my favorite writing app moved the working files to some folder only it can access, because Android 11 forced them to, in the name of "security" - it seems that Android is getting more and more restrictive with each successive release as to what folders apps can access)

I-am-Erk commented 1 year ago

That import option seems to make sense to me as a workaround (speaking as someone who occasionally plays on android, not as a dev there), and I agree that it's probably more than we can manage a day or two before string freeze.