I didn't want to frabkenstein the 2.7.0 beta thread: would it be possible for ScummVM to request MANAGE_EXTERNAL_STORAGE instead of using SAF? I understand that this permission enables apps to use the File API again. Google has a special policy for this permission, but mentions that it is "not restricted to file managers only".
I recently started playing Gabriel Knight and this reminded me how painfully slow SAF is.
MANAGE_EXTERNAL_STORAGE instead of SAF?
Moderator: ScummVM Team
- Praetorian
- ScummVM Developer
- Posts: 862
- Joined: Tue May 08, 2007 8:54 am
- Location: Greece
- Contact:
Re: MANAGE_EXTERNAL_STORAGE instead of SAF?
We have considered the option and yes, we dropped it because the policy heavily implies that ScummVM does not fall in the permitted use cases and thus our app would then be rejected from the Play Store.Vardion wrote: ↑Mon Apr 08, 2024 4:19 pm would it be possible for ScummVM to request MANAGE_EXTERNAL_STORAGE instead of using SAF? I understand that this permission enables apps to use the File API again. Google has a special policy for this permission, but mentions that it is "not restricted to file managers only".
I recently started playing Gabriel Knight and this reminded me how painfully slow SAF is.
But, we have not actually tested implementing, building and submitting such a variation of the app. May be something for a new Android porter to try; although my personal estimation is that few would want to spend their spare time on something that in all likelihood will end up getting rejected.
Ideally, of course, Google would or will optimize SAF so that it gets the much needed performance boost, because yeah, it is terrible.
The current alternative (which may or may not be viable depending on your device and free space) is to use the ScummVM app's storage folders (I suppose the "external" one is more appropriate) to put your games' data files in. This will allow ScummVM to access them without going through SAF, but it will have the drawback that these folders will be erased too when uninstalling the app -- which may or may not be something the user wants.
Re: MANAGE_EXTERNAL_STORAGE instead of SAF?
Is there any builtin function in ScummVM to "import" a game into app's storage? Or do I need to manually copy the game to /storage/emulated/0/Android/data/org.scummvm.scummvm/files/... ?Praetorian wrote: ↑Mon Apr 08, 2024 5:03 pm The current alternative (which may or may not be viable depending on your device and free space) is to use the ScummVM app's storage folders (I suppose the "external" one is more appropriate) to put your games' data files in. This will allow ScummVM to access them without going through SAF, ...
Storage is not a problem, most current devices got 128 or 256GB of internal storage - the games run by ScummVM are "small" im comparison, even the bigger ones.
- Praetorian
- ScummVM Developer
- Posts: 862
- Joined: Tue May 08, 2007 8:54 am
- Location: Greece
- Contact:
Re: MANAGE_EXTERNAL_STORAGE instead of SAF?
There's no import feature, no.Vardion wrote: ↑Sun Sep 15, 2024 7:37 pmIs there any builtin function in ScummVM to "import" a game into app's storage? Or do I need to manually copy the game to /storage/emulated/0/Android/data/org.scummvm.scummvm/files/... ?Praetorian wrote: ↑Mon Apr 08, 2024 5:03 pm The current alternative (which may or may not be viable depending on your device and free space) is to use the ScummVM app's storage folders (I suppose the "external" one is more appropriate) to put your games' data files in. This will allow ScummVM to access them without going through SAF, ...
Storage is not a problem, most current devices got 128 or 256GB of internal storage - the games run by ScummVM are "small" im comparison, even the bigger ones.
The possible ways I can think of is to:
- Use something like the Device Explorer in Android Studio to "upload" the game data folders from your PC (or such) to your connected Android device. The path would look something like the one you've written above (although probably may differ for some devices).
- Use ScummVM's LAN feature (Global Options -> LAN), set the root path to the "ScummVM data (External)" shortcut (on the top level of the ScummVM file explorer), and then run the LAN server to upload your game folders there via a browser running on your remote desktop PC (or such). Edit: The proper order may be to first start the LAN server and then set the root path and press "Apply". If you set the root path properly, you should see a "File system root" shortcut link as well as a "Saved games" link when you connect from your remote browser. You will then need to follow the File system root link and upload your games data in there (or first create a "games" folder in there to better organize your files).
- I suppose the Cloud Saving feature could also be used to synch game folders over to your Android device from a configured Cloud storage, but that seems (to me) like an ugly way to do things and I haven't really tried it.