ScummVM not working with Android N?

Subforum for discussion and help with ScummVM's Android port

Moderator: ScummVM Team

The Avatar
Posts: 2
Joined: Sat Aug 27, 2016 7:44 pm

ScummVM not working with Android N?

Post by The Avatar » Sun Aug 28, 2016 8:47 pm

Hey everybody,

on both my Android devices (Huawei P9 and Google Pixel C) ScummVM has stopped working since installing the Android N beta.
When I try to add a game, it doesnt show any folders, the add game menu is completely blank, none of the butttons seem to do anything - it seems it cant access the file system?

Does anybody else have this problem? Could it be an incompatibility with Android N/7?
Last edited by The Avatar on Mon Aug 29, 2016 6:30 pm, edited 1 time in total.

The Avatar
Posts: 2
Joined: Sat Aug 27, 2016 7:44 pm

Post by The Avatar » Mon Aug 29, 2016 6:29 pm

Really no help on this issue?

Could it be a problem with the non-Snapdragon chips?

digitall
ScummVM Developer
Posts: 964
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall » Mon Aug 29, 2016 11:24 pm

*cough* Maybe you should try getting some debug information on why this is failing to start:
http://wiki.scummvm.org/index.php/Debug ... VM#Android

Then file a bug with this...

goetz
Posts: 111
Joined: Fri Dec 09, 2005 10:11 am

Workaround for Android N

Post by goetz » Thu Sep 08, 2016 8:27 pm

This seems indeed to be related to Android N and how access to the file system is handled. Recently upgraded my Nexus N to Android N, too. Accessing files in the internal memory (AKA "internal emulated SD-CARD") is fine, just the ScummVM launcher file browser does not get the permissions to display certain directories (same for all other apps). That way, once the file browser hits the "/" dir, it shows the empty list you see and you have no chance leaving this directory ever again.

Here is a workaround, which will probably take longer to describe than to perform:

With a an Android file browser/editor app navigate to the place, where the ScummVM data is stored, usually:

/storage/emulated/0/Android/data/org.scummvm.sdl

(might also simply be /sdcard/Android/data/org.scummvm.sdl)

This is the path for the SDL port of ScummVM, the non-SDL port might have a different path name, but IMHO the SDL port is better to use anyway. :)

ensure that the file editor shows hidden directories and navigate to the sub-directory:

files/.config/scummvm

In there, you find a "scummvm.ini". Edit it and change the following entry to a valid directory:

browser_lastpath=/sdcard

Then save the file, quit the editor and run ScummVM. Hit "Add game" and you should now see all folders of your (internal or external) SD card. Now you can find your games and add them.

Hope this works for you. :)

phunimator
Posts: 56
Joined: Mon Jun 01, 2009 1:03 pm
Location: London

Post by phunimator » Fri Oct 21, 2016 9:39 am

Hi all,

I have missed updates to this thread since my follow up message in August, and I'm really pleased that this has been incorporated finally :)

I have downloaded the latest build directly from the Google Play store on my Google Pixel phone today, and I'm happy to report that MT-32 is working pretty well! I've noticed there is a tiny bit of crackling, but I haven't messed with the audio buffer yet (which is set to very small by default).

I had to do the changes described by goetz to get the files to show in the ScummVM file browser, but then it works a treat. Can't wait to replay everything again with great audio :)

Cheers!!

-P

v11che
Posts: 5
Joined: Thu Dec 01, 2016 10:22 am

Post by v11che » Thu Dec 01, 2016 10:38 am

Just as a note, this work around doesnt seem to work. Or at least not for me. I made a reddit thread about it last night before I found the bug tracker.
Whilst this tells me to change a config file. I've changed said config file, but changing it to "browser_lastpath=/sdcard" doesn't work as the 6p (and every phone on 7 I know at the moment) doesn't have an sd card or work like that.
I then went into a file browser app and yep, file commander says the root is "/storage/emulated/0/" So my scummvm.ini file says :
browser_lastpath=/storage/emulated/0/
When I open the scummvm file browser, clicking add game, it still takes me to the "/storage" path, showing only "emulated/" and "self/" Both emulated and self are empty.
Does anyone here have any idea what to put here to get it working? Or what else to do?

goetz
Posts: 111
Joined: Fri Dec 09, 2005 10:11 am

Post by goetz » Thu Dec 01, 2016 11:11 am

Thanks for the detailed description. This is interesting, as the workaround with setting browser_lastpath=/sdcard indeed works on a Nexus 5X. It has no SD card and it runs on Android 7. The directory name "/sdcard" is probably there for historic or compatibility reasons, it exists and points to the common files for all apps with storage read permissions.

Just had a look at ScummVM and the workaround and found the problem elsewhere. To make it work, please do the following:

0. Make sure ScummVM has the permission to access files
1. Start ScummVM
2. Hit the "Change Device Configuration" button quickly
3. Change "Data installation location" to "SD-Card storage" (remember, this is only a name, not a physic al card here!)
4. Confirm settings with "OK"
5. quit ScummVM
6. Perform workaround from above:
6a. With a an Android file browser/editor app navigate to the place, where the ScummVM data is stored, usually:
/storage/emulated/0/Android/data/org.scummvm.scummvm
(might also simply be /sdcard/Android/data/org.scummvm.scummvm)
6b. ensure that the file editor shows hidden directories and navigate to the sub-directory: files/.config/scummvm
6c. In there, you find a "scummvm.ini". Edit it and change the following entry to a valid directory:browser_lastpath=/sdcard
6d. Then save the file, quit the editor
7. Start ScummVM and wait for the launcher to appear.
8. Hit "Add game" and you should now see all folders of your accessible files on the device. Now you can find your games and add them.



Can you let us know if that worked for you?

v11che
Posts: 5
Joined: Thu Dec 01, 2016 10:22 am

Post by v11che » Thu Dec 01, 2016 11:33 am

Thanks goetz, yeah, it is weird.

I did all you said and scummvm now crashes on startup.

I pasted the logcat around the time it happened.

http://pastebin.com/USjxYM9e

Not a lot of help there though as far as I can see.

goetz
Posts: 111
Joined: Fri Dec 09, 2005 10:11 am

Post by goetz » Thu Dec 01, 2016 11:56 am

Weird, indeed! :)

I had a look into the logcat output you provided. Seems ScummVM dies the moment it tries to access the directory /storage/emulated/0/Android/data/org.scummvm.scummvm/files during startup, which looks correct to me.

Can you please go into the devices system preferences, apps, open ScummVM settings, permissions, and there check if "Storage" (or "Files", or whatever the English label is) is checked? If the permissions are not set, can you please activate the storage permissions?

This may be due to the new permissions model on Android N and new SDK, so that ScummVM did not ask you for these permissions explicitly.

Then please restart the updated workaround from step 1 on and let us know if it works?

v11che
Posts: 5
Joined: Thu Dec 01, 2016 10:22 am

Post by v11che » Thu Dec 01, 2016 12:07 pm

Yeah, the permissions was already in the 'on' position. I did do it again just to be sure to no avail :(

For the record, further playing :

I tried setting the "Data installation location" to "specify directory" and I tried both "/sdcard/" and "/storage/self/primary" With this the app runs, but just like on first run, it has no directories.

goetz
Posts: 111
Joined: Fri Dec 09, 2005 10:11 am

Post by goetz » Thu Dec 01, 2016 4:49 pm

In my configuration, ScummVM shows the following for "Specify Directory": /storage/emulated/0/Android/data/org.scummvm.scummvm/files

Maybe that will work when you try it, but I doubt so. Seems to be a different problem, but I don't have an idea what it might be.

It is surprising how different ScummVM seems to behave on Nexus 5X and Nexus 6P with the same OS (Android 7.0). When even those devices released by Google at the same time behave differently, I am not surprised that it takes some software developing companies ages to test until an Android version of an app is ready. :(

v11che
Posts: 5
Joined: Thu Dec 01, 2016 10:22 am

Post by v11che » Sat Dec 03, 2016 12:14 pm

Interesting point:

I was trying to set it up on another phone and the exact same issue was happening on a Sony Xperia z5 running Android 6.0.1

Not just Android N issue. Probably just an issue with the fact nothing ever works for me. :(

monkeymadness
Posts: 19
Joined: Tue Jan 13, 2015 6:13 pm

Post by monkeymadness » Wed Jan 25, 2017 12:54 am

goetz wrote:Thanks for the detailed description. This is interesting, as the workaround with setting browser_lastpath=/sdcard indeed works on a Nexus 5X. It has no SD card and it runs on Android 7. The directory name "/sdcard" is probably there for historic or compatibility reasons, it exists and points to the common files for all apps with storage read permissions.

Just had a look at ScummVM and the workaround and found the problem elsewhere. To make it work, please do the following:

0. Make sure ScummVM has the permission to access files
1. Start ScummVM
2. Hit the "Change Device Configuration" button quickly
3. Change "Data installation location" to "SD-Card storage" (remember, this is only a name, not a physic al card here!)
4. Confirm settings with "OK"
5. quit ScummVM
6. Perform workaround from above:
6a. With a an Android file browser/editor app navigate to the place, where the ScummVM data is stored, usually:
/storage/emulated/0/Android/data/org.scummvm.scummvm
(might also simply be /sdcard/Android/data/org.scummvm.scummvm)
6b. ensure that the file editor shows hidden directories and navigate to the sub-directory: files/.config/scummvm
6c. In there, you find a "scummvm.ini". Edit it and change the following entry to a valid directory:browser_lastpath=/sdcard
6d. Then save the file, quit the editor
7. Start ScummVM and wait for the launcher to appear.
8. Hit "Add game" and you should now see all folders of your accessible files on the device. Now you can find your games and add them.



Can you let us know if that worked for you?
Ever since the update to 1.9 I had this problem, but never had a chance to look into it. This worked for me. Once I changed the path and device configuration I was able to load all of the games. (Nexus 6P)

v11che
Posts: 5
Joined: Thu Dec 01, 2016 10:22 am

Post by v11che » Wed Feb 01, 2017 3:21 pm

monkey, would you mind putting a pastebin of your ini file that works so I can make sure mine is right, I've got a 6p too and still no luck.

monkeymadness
Posts: 19
Joined: Tue Jan 13, 2015 6:13 pm

Post by monkeymadness » Fri Feb 03, 2017 7:44 am

v11che wrote:monkey, would you mind putting a pastebin of your ini file that works so I can make sure mine is right, I've got a 6p too and still no luck.
It's complicated, but I don't have a way to paste my ini file right now. :oops: I'll try and get it up there. Basically if I remember right I uninstalled ScummVM and redownloaded it. After accepting permissions I put "/sdcard" for the browser_lastpath= and I made sure that the "Data installation location" was set to "SD-Card storage" like goetz recommended.
Last edited by monkeymadness on Sat Feb 04, 2017 5:38 am, edited 1 time in total.

Post Reply