Lemuroid icon indicating copy to clipboard operation
Lemuroid copied to clipboard

Feature request: export saves to a selected folder

Open evilsh3ll opened this issue 3 years ago • 3 comments

Hello, I'd like to backup my saves on android in order to export them to my linux computer. Could you implement a button/function to copy saves from internal memory to a selected folder? If you will consider to make this feature automatic (for example: silent backup each time Lemudroid is closed), it should be easy to auto-export them with syncthing to other device (respecting privacy, unlike gdrive).

evilsh3ll avatar Sep 03 '21 19:09 evilsh3ll

Very related to these currently open issues:

  • https://github.com/Swordfish90/Lemuroid/issues/158
  • https://github.com/Swordfish90/Lemuroid/issues/159
  • https://github.com/Swordfish90/Lemuroid/issues/264

hhromic avatar Sep 07 '21 14:09 hhromic

@Swordfish90 I have started working on switching the savegamefolder to SAF.

I made some progress, though i am now at a point where i would have to completely rewrite the google drive sync and other parts to use DocumentFile instead of File

I would now like to remove the google drive sync, in favor of the SAF which can provide the exact same functionality except we would then have more providers.

I'd like your input on that before i continue

newhinton avatar Sep 10 '22 12:09 newhinton

Hi @newhinton thank you for taking a look into this. I'm afraid it's not the easiest feature to implement. The save folder is sometimes directly written by cores (ppsspp, citra and melonds are good examples), so they would not be able to access a SAF directory.

I see two options:

  • Update all the upstream cores that access the save directory so they always go through libretro vfs (which is another protocol that abstracts the filesystem). We'll later need to implement writing to DocumentFile in LibretroDroid on the cpp side (currently only reading is implemented there)
  • Perform a sync from the internal save directory to an external SAF one (basically something similar to what the Google Drive integration does)

The first one is definitely harder and requires a lot of upstream work to make it happen, the second one is easier and completely under our control, but has the cost of duplicating data.

Hope this helps you on your quest!

Swordfish90 avatar Sep 10 '22 13:09 Swordfish90