RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

[Android]Request: Change default directory for save/savestate

Open Raijinili opened this issue 11 years ago • 15 comments

The current default is in the app's folder, which, as far as I know, is inaccessible to a normal (non-root) user, as well as being deleted when the app is deleted. This can cause issues if such a user enables the use of the custom folder without changing the custom folder.

Additionally, the current PCSX with a BIOS always uses the specified folder instead of the ROM's folder, despite the settings. So this will stop cores from accidentally writing to a user-inaccessible folder.

Raijinili avatar Jan 08 '15 23:01 Raijinili

Seems like the default folder for saving configs is also in the app's folder, so saving configs in the green menus will result in configs that can't be loaded? I can't seem to get at the saved configs from within RetroArch, since it starts looking for them in / and can't get to its data folder from there. Maybe I'm severely misunderstanding something.

Raijinili avatar Jan 09 '15 17:01 Raijinili

You can manually change the save file / save state directory and that works fine, so I don't think it's much of an issue. I can confirm the second one though. Without root, one can not list the contents of /data/ directory, which makes it impossible to load previously saved configurations, because as you said, it starts looking in the topmost directory /. The path used for storing these can still be changed though, so it definitely is usable with non-default settings.

micechal avatar Jan 10 '15 08:01 micechal

Default is harmful to nonroot user (unless I misunderstand Android): if you don't know that you have to change your default, you will lose your saves upon changing the folder, or upgrading OS. You also can't back up saves. And if you try to set the folder, you can't change it back to the original, so

It is surprising, and is irreversible for nonrooted users (i.e. can't retrieve created saves) once you learn about it. Isn't that enough reason to call it an issue?

Raijinili avatar Jan 10 '15 12:01 Raijinili

It seems that, on first run, it looks in the ROM path for state/save files. Upon editing any configs in the GUI, it changes to the /data/... path. If I try to change it, it just resets back to the data directory. :(

Qard avatar Jan 14 '15 05:01 Qard

I've just installed the latest v1.2 from the Play store and i'm getting the behavior described here. Actually i don't mind about the default paths, but why resetting the paths when the Android UI is started?

eadmaster avatar Jul 14 '15 20:07 eadmaster

Are you asking why it happens or what's it good for? It is not good, and the issue you reference points out that the Android UI will be removed (invalidating its bugs), and how to deal with the change in folders.

As for why, if I remember correctly, the Android UI loads its own config when launching RetroArch, and it doesn't ever read back RetroArch's config. So for the settings that the Android UI has, it pretty much thinks it owns them.

Raijinili avatar Jul 15 '15 08:07 Raijinili

That's not true anymore the Android ui doesn't do anything to the settings.

Most of these issues are fixed now Andrea. Just make sure you quit retroarch cleanly

On Wed, Jul 15, 2015, 3:06 AM Raijinili [email protected] wrote:

Are you asking why it happens or what's it good for? It is not good, and the issue you reference points out that the Android UI will be removed (invalidating its bugs), and how to deal with the change in folders.

As for why, if I remember correctly, the Android UI loads its own config when launching RetroArch, and it doesn't ever read back RetroArch's config. So for the settings that the Android UI has, it pretty much thinks it owns them.

— Reply to this email directly or view it on GitHub https://github.com/libretro/RetroArch/issues/1328#issuecomment-121523421 .

andres-asm avatar Jul 15 '15 13:07 andres-asm

Basically i would like to have the savepath set as the "content dir". I've found i can set this in the RGUI by pressing "Start" after selecting savepath in the Directory settings menu. It actually works, but when i exit RA and start it again the savepath goes back to its default value. In the Android GUI i can only set a custom path, not the content dir...

eadmaster avatar Jul 15 '15 15:07 eadmaster

That is not like that anymore. First, there is no Android settings. Second the default is now content dir unless RA can't write to the internal SD AND to the folder returned. By getExternalFiles for some reason. Only in that case it defaults to the app dir.

andres-asm avatar Jul 15 '15 15:07 andres-asm

Should be fixed by now

andres-asm avatar Oct 09 '15 19:10 andres-asm

I just lost hours due to this "non-issue". There's no way I should have known I had to change the default directories for saves/states, and there's no way to root my phone without wiping it clean apparently (Galaxy S7). I simply cannot access my savestates, and it didn't save the saves on exit, so there's nothing I can do but start over from hours ago.

Calling this a non-issue is legitimately angering.

(Edited out edit, was mistaken about something, above is still true and upsetting.)

Aeroxia avatar Jan 02 '17 02:01 Aeroxia

The default is not the internal APP dir, it's the rom folder so what you way about root makes no sense whatsoever. Only if RA can't write to the internal user storage it defaults to the internal dir. Basically if RA can save settings it can save states as long as they are in the internal SD.

andres-asm avatar Jan 02 '17 03:01 andres-asm

The game defaulted to the content database directory (or changed somehow by normal usage), which is internal, and I can save states but not load them. It fails to load, I cannot access them even to just copy them out by file explorers or adb or anything else it seems. And I know it's there now, because I did a convoluted thing with adb backup and extracted it, and got the savestates, but they didn't work on my desktop version.

Edit: The thing I edited out was right afterall, I think. There is an external data folder with empty saves, state, and system folders, and I can load states out of them, but they were not set to default. The retroarch.cfg seems to be there just fine, though.

Edit 2: It said <Content dir> and I lost my save progress (probably didn't save on exit, wasn't set to save on intervals yet), but I also did a savestate and it just wouldn't load when I went to do it. (I hadn't messed with directories at all yet, not even to look at them in the menu.) The rest I'm not even sure about anymore, I've been playing with it so much I've confused myself at this point. (The savestates I extracted from the backup didn't include the older one I wanted with my progress, so I don't even know anymore.)

Edit 3: I also have an earlier save from 1 hour in, which also isn't here. I think maybe the adb backup is just not including things, maybe because I don't have root.

Aeroxia avatar Jan 02 '17 06:01 Aeroxia

Content Database or content dir?

On Mon, Jan 2, 2017, 1:18 AM Aeroxia [email protected] wrote:

The game defaulted to the content database directory (or changed somehow by normal usage), which is internal, and I can save states but not load them. It fails to load, I cannot access them even to just copy them out by file explorers or adb or anything else it seems. And I know it's there now, because I did a convoluted thing with adb backup and extracted it, and got the savestates, but they didn't work on my desktop version.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/libretro/RetroArch/issues/1328#issuecomment-269937331, or mute the thread https://github.com/notifications/unsubscribe-auth/ABpC0ECxARQaxIME2o0ZoqHt-SMapTTFks5rOJaugaJpZM4DQIyb .

andres-asm avatar Jan 02 '17 08:01 andres-asm

Sorry, it ate the <>. It said <Content dir>, and the only thing I could find with that word was content database directory. I don't know how to put it back, so I set it to content database (/data/user/0/com.retroarch/database/rdb) after the fact and made things extra confusing for myself. (But this was after I had issues with failing loading state.)

Edit: Alright, I see part of what happened, I feel so dumb. I didn't understand content dir meant "where the rom is". I found the old save 1 hour in (still lost a lot of progress from not saving on exit, but whatever.) I'm not sure what happened with the savestate, but I sync'd the roms with desktop PC, so maybe something happened with that (although it shouldn't have deleted it, only copied it over, and the PC's are stored elsewhere).

Edit 2: I got the savestate with the full progress, it was just there in the content dir afterall. Sorry for wasting your time! I'm still not sure why it failed to load in the first place and set this all off, but it's working when I tell it to go straight to the rom folder. (Saved again after loading state, and copied save over.)

tl;dr: Resolved, my bad. (But I still don't know how to return it to <Content dir>, I don't think you can in the android UI, but on second thought, the other place is still better for it.)

Aeroxia avatar Jan 02 '17 10:01 Aeroxia