[solved] scummvm.ini change path?

Subforum for discussion and help with ScummVM's Android port

Moderator: ScummVM Team

Post Reply
EctoOne
Posts: 32
Joined: Sun Apr 18, 2021 6:18 pm

[solved] scummvm.ini change path?

Post by EctoOne »

Hi,

I have a question about the scummvm.ini location on a non rooted device and the none sdl version. As far as I know it is currently not possible to change the path to the ini file which makes it impossible to edit it manually on a non rooted device.

Would it be possible to implement a function which, either allows to change the path freely or check if there is a scummvm.ini file in the sdl path? :

Code: Select all

Android/data/org.scummvm.scummvm/files/.config/scummwm
Especially with the latest addition of the ags engine I'm now changing the names of all the games in my library to include a prefix with the engine.
Something like:

Code: Select all

[ags] The Tale of Lonkey Island (English)
[scumm] The Secret of Monkey Island (English)
But adding those using the ScummVM GUI is kinda tedious and would be much easier if I could use a search/replace function in a text editor.
And it would also be great to make a backup of that file.

In any case, thanks for the great support over the years.
Last edited by EctoOne on Mon Apr 19, 2021 6:55 pm, edited 1 time in total.
User avatar
Praetorian
ScummVM Developer
Posts: 782
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: scummvm.ini change path?

Post by Praetorian »

One way it might work, would be to use the LAN file server feature from the Andoird app (from the launcher go to Options... -> LAN tab). Set the server "/root/" path to be the ScummVM internal folder, which is the "ScummVM data (int)/" shortcut option if you go all the way up the directories with the ScummVM File Manager.

For the new Android port, scummvm.ini resides directly in there --and not under a .config subfoler path.

The LAN server functionality will allow you to retrieve it using a web browser (which should work better if done from another device in the same LAN), back it up and change it -- and then copy it back. At least in theory that *might* work -- I haven't tried to do massive changes to it in that way and re-upload it, and the LAN server feature was not really meant to support updating the configuration file.
Anyway, you should restart scummvm after changing the ini file in that manner.

More info on the LAN feature here:
https://docs.scummvm.org/en/latest/use_scummvm/LAN.html

Changing the ini path to a custom is probably not happening, not by me anyway. I personally spent way too much time last year trying to sort the mess from allowing too much freedom in that regard, which bit us in the butt when Google changed their security policies regarding where apps can and cannot store and related stuff.

It's too much hassle to keep up with all the options and what older Android versions allowed, and I wouldn't want to create the same nightmare for the future developer who'll maintain the mod.

Honestly the fix-up code just to support upgrading from the old Android versions was a nightmare to produce and test, and the end result is far from a beauty too (and has a heavy impact on startup performance).

Sorry for the rant above. Just felt that I should explain where I'm coming from on this issue.
EctoOne
Posts: 32
Joined: Sun Apr 18, 2021 6:18 pm

Re: scummvm.ini change path?

Post by EctoOne »

Ahh, yeah the whole android security thing was something I have not considered. It's been too long since I have tried to root any of my newer devices that I gave up on that whole topic.

I will look into that LAN server thing. But once more question about that which isn't quite clear to me, even after looking at the link you provided.
Do I need to keep the server running all the time or can I just turn it on/off whenever I want to edit the file?
User avatar
Praetorian
ScummVM Developer
Posts: 782
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: scummvm.ini change path?

Post by Praetorian »

EctoOne wrote: Sun Apr 18, 2021 11:19 pm Ahh, yeah the whole android security thing was something I have not considered. It's been too long since I have tried to root any of my newer devices that I gave up on that whole topic.

I will look into that LAN server thing. But once more question about that which isn't quite clear to me, even after looking at the link you provided.
Do I need to keep the server running all the time or can I just turn it on/off whenever I want to edit the file?
You shouldn't have to keep it running all the time. The LAN server can only be running if you also keep that specific ScummVM LAN tab open anyway. Otherwise it will automatically close.

You only need the LAN server to transfer files (here, the ini file) from and to the device. The rest of the time, you can have the server off.
EctoOne
Posts: 32
Joined: Sun Apr 18, 2021 6:18 pm

Re: scummvm.ini change path?

Post by EctoOne »

Yeah, I just noticed that. Thanks for reply though. Anyway, I just tried it but I seems to that is is not possible to overwrite a file.

I get the message:

Code: Select all

There is a file with that name in the parent directory! 
Too bad. :cry:
User avatar
Praetorian
ScummVM Developer
Posts: 782
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: scummvm.ini change path?

Post by Praetorian »

EctoOne wrote: Sun Apr 18, 2021 11:37 pm Yeah, I just noticed that. Thanks for reply though. Anyway, I just tried it but I seems to that is is not possible to overwrite a file.

I get the message:

Code: Select all

There is a file with that name in the parent directory! 
Too bad. :cry:
Huh, sorry to read that.
But you where able to retrieve the file and change it, correct?

I *think* you could make use of the "upgrade" process to update your ScummVM.ini.
Just change the version string in the scummvm.ini to be a bit greater than the existing one, and place the scummvm.ini in one of the locations that the code expects the old ini files to be. Then restart ScummVM. Keep in mind that if this scummvm.ini is found and is deemed higher version of the existing one, the existing one will be replaced by this one -- and also this scummvm.ini will then be deleted (so as to not to repeat the process upon next relaunch of ScummVM).

I have not tested this either.
An easy expected location would be on external storage (or I suppose the emulated external storage), go to its root path and place the file there, named "scummvm.ini".
Or a more appropriate (and perhaps without read access issues on recent Android versions) would be to put it in the app's own external storage -- place the file there directly, but named "scummvmrc" without an extension.
EctoOne
Posts: 32
Joined: Sun Apr 18, 2021 6:18 pm

Re: scummvm.ini change path?

Post by EctoOne »

Praetorian wrote: Mon Apr 19, 2021 11:01 am Or a more appropriate (and perhaps without read access issues on recent Android versions) would be to put it in the app's own external storage -- place the file there directly, but named "scummvmrc" without an extension.
Yes, that worked! Awesome. That makes things so much easier for me. Thanks again.
User avatar
Praetorian
ScummVM Developer
Posts: 782
Joined: Tue May 08, 2007 8:54 am
Location: Greece
Contact:

Re: scummvm.ini change path?

Post by Praetorian »

EctoOne wrote: Mon Apr 19, 2021 4:27 pm
Praetorian wrote: Mon Apr 19, 2021 11:01 am Or a more appropriate (and perhaps without read access issues on recent Android versions) would be to put it in the app's own external storage -- place the file there directly, but named "scummvmrc" without an extension.
Yes, that worked! Awesome. That makes things so much easier for me. Thanks again.
Nice! Thank you for reporting back. It's an easy enough workaround to suggest to users, for anyone who wants to do the manual editing process. At least until we have something else in place.
Post Reply