Kitkat save problem
Moderator: ScummVM Team
Kitkat save problem
Since Android 4.4 Google has implemented new rules for apps writing to external storage.
An app is only allowed to write to is own folder structure or to the internal storage device.
My save folder is actually in the designated folder for ScummVM so this new android policy shouldn't be any problem, however I am able to load previous saves, but ScummVM fails to write to this folder.
Is there any way or plan to fix this issue in the daily builds?? (or even the "official" Google play release)
A work around is to just put the saves to my internal storage, but I rather have them on my external storage card for easy transfer to other devices.
An app is only allowed to write to is own folder structure or to the internal storage device.
My save folder is actually in the designated folder for ScummVM so this new android policy shouldn't be any problem, however I am able to load previous saves, but ScummVM fails to write to this folder.
Is there any way or plan to fix this issue in the daily builds?? (or even the "official" Google play release)
A work around is to just put the saves to my internal storage, but I rather have them on my external storage card for easy transfer to other devices.
Hmm...
https://developer.android.com/about/ver ... d-4.4.html
"If your app reads from external storage...
Your app can not read shared files on the external storage when running on Android 4.4, unless your app has the READ_EXTERNAL_STORAGE permission. That is, files within the directory returned by getExternalStoragePublicDirectory() are no longer accessible without the permission. However, if you need to access only your app-specific directories, provided by getExternalFilesDir(), then you do not need the READ_EXTERNAL_STORAGE permission."
We can look at adding the READ_EXTERNAL_STORAGE permission to avoid this, but we may have another issue here, so best to investigate fully.
I have no idea why that would not work correctly to save..
Can you provide some debugging information as I have no Android 4.4 device (and having trouble setting up the VAD emulator):
http://wiki.scummvm.org/index.php/Debug ... VM#Android
Basically any warning or errors into the Android Debug Log when the save fails would allow us to investigate.
Also, ensure you are using the latest development master build from here:
http://buildbot.scummvm.org/builds.html
Important instructions for installing daily builds are given here:
http://wiki.scummvm.org/index.php/Android#Installation
https://developer.android.com/about/ver ... d-4.4.html
"If your app reads from external storage...
Your app can not read shared files on the external storage when running on Android 4.4, unless your app has the READ_EXTERNAL_STORAGE permission. That is, files within the directory returned by getExternalStoragePublicDirectory() are no longer accessible without the permission. However, if you need to access only your app-specific directories, provided by getExternalFilesDir(), then you do not need the READ_EXTERNAL_STORAGE permission."
We can look at adding the READ_EXTERNAL_STORAGE permission to avoid this, but we may have another issue here, so best to investigate fully.
I have no idea why that would not work correctly to save..
Can you provide some debugging information as I have no Android 4.4 device (and having trouble setting up the VAD emulator):
http://wiki.scummvm.org/index.php/Debug ... VM#Android
Basically any warning or errors into the Android Debug Log when the save fails would allow us to investigate.
Also, ensure you are using the latest development master build from here:
http://buildbot.scummvm.org/builds.html
Important instructions for installing daily builds are given here:
http://wiki.scummvm.org/index.php/Android#Installation
Have done a quick check through the relevant code in scummvm/dists/android and scummvm/backends/platform/android.
As far as I can see, comparing this to the Android documentation online, this should work fine.
The saves path will default to <External Storage>/ScummVM/Saves/. If this directory does not exist or can not be created, then it will switch to a directory under the application specific directory called "saves".
We ask for the WRITE_EXTERNAL_STORAGE permission in our manifest and this should implicitly grant READ_EXTERNAL_STORAGE as well according to:
https://developer.android.com/reference ... AL_STORAGE
This may be a subtle bug in your 4.4 implementation where we need to add the READ_EXTERNAL_STORAGE permission explicitly.
But the debug logs should make it clear what is happening when the save fails.. Thanks.
As far as I can see, comparing this to the Android documentation online, this should work fine.
The saves path will default to <External Storage>/ScummVM/Saves/. If this directory does not exist or can not be created, then it will switch to a directory under the application specific directory called "saves".
We ask for the WRITE_EXTERNAL_STORAGE permission in our manifest and this should implicitly grant READ_EXTERNAL_STORAGE as well according to:
https://developer.android.com/reference ... AL_STORAGE
This may be a subtle bug in your 4.4 implementation where we need to add the READ_EXTERNAL_STORAGE permission explicitly.
But the debug logs should make it clear what is happening when the save fails.. Thanks.
The biggest problem is that I can't find any scummVM files on my device.
It is clearly installed, since the app and all installed engines run perfectly.
I wouldn't mind using the main app folder for my saves, but I just can't find it.
The same goes for the debug files.
If someone could provide the standard installation path on Android, it wouldn't be any problem saving there since Android does allow an app to write to it's own installation folder.
It is clearly installed, since the app and all installed engines run perfectly.
I wouldn't mind using the main app folder for my saves, but I just can't find it.
The same goes for the debug files.
If someone could provide the standard installation path on Android, it wouldn't be any problem saving there since Android does allow an app to write to it's own installation folder.
jortlaban: As I said, I can't help you if you don't provide any further information.
Can you check the Android Debug Log, either using alogcat or adb as described here:
http://wiki.scummvm.org/index.php/Debug ... VM#Android
And can you indicate which development build you are using? The version will be v1.7.0git-xxxx . It is the xxxx value that we need. This should be the directory name after you unpacked the zip file of apks. If you no longer have this, then the version is written on the launcher screen below the ScummVM logo and above the games list, Add game button etc.
Can you check the Android Debug Log, either using alogcat or adb as described here:
http://wiki.scummvm.org/index.php/Debug ... VM#Android
And can you indicate which development build you are using? The version will be v1.7.0git-xxxx . It is the xxxx value that we need. This should be the directory name after you unpacked the zip file of apks. If you no longer have this, then the version is written on the launcher screen below the ScummVM logo and above the games list, Add game button etc.
OK. That build is from 2014-03-15, and no revelant Android fixes have been applied since, so this is not an "outdated" issue.
ScummVM installs to the internal Android storage as per other applications... I think this is a "secure" location (.android_secure IIRC) which is not available to user access unless you have rooted the device... but I am not an Android expert, so don't quote me on that.
Anyway, the point is to work out what the problem is with the external storage location as this should work fine... and even if we avoid it for now, it could come back to bite us again... hence my desire to see if there are any relevant details in the debug/error log.
I don't think that D/AbsListView debug is relevant... You should be able to filter it out with logcat or other tools.
I am specifically looking for any E/ (error) and W/ (Warning) lines associated after the information I/ lines for starting ScummVM.
Also, can you indicate exactly which games you are observing the save failures with? If you have only seen these with one game so far, try Flight of the Amazon Queen, Dreamweb and some of the other freeware games on our download page:
http://www.scummvm.org/games
to eliminate this being an engine specific issue.
ScummVM installs to the internal Android storage as per other applications... I think this is a "secure" location (.android_secure IIRC) which is not available to user access unless you have rooted the device... but I am not an Android expert, so don't quote me on that.
Anyway, the point is to work out what the problem is with the external storage location as this should work fine... and even if we avoid it for now, it could come back to bite us again... hence my desire to see if there are any relevant details in the debug/error log.
I don't think that D/AbsListView debug is relevant... You should be able to filter it out with logcat or other tools.
I am specifically looking for any E/ (error) and W/ (Warning) lines associated after the information I/ lines for starting ScummVM.
Also, can you indicate exactly which games you are observing the save failures with? If you have only seen these with one game so far, try Flight of the Amazon Queen, Dreamweb and some of the other freeware games on our download page:
http://www.scummvm.org/games
to eliminate this being an engine specific issue.
To be more precise, when the "save error" occurs, no error is present in the log. I tried to generate some other errors with some tinkering, that will show up just fine.
It looks like the save error is basically just and access denied issue which Android doesn't register as an error.
My library consists of basically the entire Scumm library, some SCI games and 7th Guest.
Or at least on my phone.
The problem seems to be solely connected to the permissions to write to the external storage. Android 4.3 doesn't have this issue.
The games want to write to the external storage because my phone already had the same folder present on the external storage. Will try to reinstall the app and delete the folder to see what happens
It looks like the save error is basically just and access denied issue which Android doesn't register as an error.
My library consists of basically the entire Scumm library, some SCI games and 7th Guest.
Or at least on my phone.
The problem seems to be solely connected to the permissions to write to the external storage. Android 4.3 doesn't have this issue.
The games want to write to the external storage because my phone already had the same folder present on the external storage. Will try to reinstall the app and delete the folder to see what happens
Hmm... OK, so if you have seen this with SCUMM, SCI and Groovie, it is unlikely to be an engine specific issue.
As far as I know, we have correctly asked for the permissions for this:
https://github.com/scummvm/scummvm/blob ... xml.in#L49
So not sure why this should be failing...
As far as I know, we have correctly asked for the permissions for this:
https://github.com/scummvm/scummvm/blob ... xml.in#L49
So not sure why this should be failing...
Hello,
Here you have an explanation of what is going on this:
http://www.androidpolice.com/2014/02/17 ... ting-them/
ScummVM is doing all it can.... Android is stopping it from saving
Here you have an explanation of what is going on this:
http://www.androidpolice.com/2014/02/17 ... ting-them/
ScummVM is doing all it can.... Android is stopping it from saving
OH hell... that is retarded.
@jortlaban: Use the fix suggested here. You will need to have rooted your device:
http://www.androidpolice.com/2014/03/21 ... -required/
@jortlaban: Use the fix suggested here. You will need to have rooted your device:
http://www.androidpolice.com/2014/03/21 ... -required/
For the first time ever I have rooted my phone.
Never needed it, never found it that usefull... until now.
Saves work fine now, some other apps that are non-scummvm related still seem to have some issues, but that is not something for this board.
Thanks for your efforts anyway. in someway it is reassuring that the problem lies solely with Android's stupid stance towards external SD-cards.
Never needed it, never found it that usefull... until now.
Saves work fine now, some other apps that are non-scummvm related still seem to have some issues, but that is not something for this board.
Thanks for your efforts anyway. in someway it is reassuring that the problem lies solely with Android's stupid stance towards external SD-cards.