Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Errors writing savedata to SD-card on Android 9 #16590

Open
hrydgard opened this issue Dec 15, 2022 · 9 comments
Open

Android: Errors writing savedata to SD-card on Android 9 #16590

hrydgard opened this issue Dec 15, 2022 · 9 comments
Labels
Saving issue Prevents or obstructs saving game (not save states.)

Comments

@hrydgard
Copy link
Owner

hrydgard commented Dec 15, 2022

Karmenos on Discord reports issues with Monster Hunter randomly reporting disk full if he keeps savedata on an SD card. Apparently it used to work, but randomly after upgrading to 1.14 and then back down to 1.13.2, no dice.

It's reporting the error code SCE_UTILITY_SAVEDATA_ERROR_SAVE_MS_NOSPACE but we only return that if WritePSPFile returns an error, or if param is null in SavedataParam::Save, the latter of which seems unlikely.

He's running on Android 9, Redmi Note 7

Android 9PKQ1.180904.001

He is using memstick paths like these:

/storage/3FCE-1710/PSP
/storage/3FCE-1710/GuildHall/Archives/Emu/Sony/PSP
/storage/3FCE-1710/GuildHall/Archives/CleanTest

@hrydgard hrydgard added the Saving issue Prevents or obstructs saving game (not save states.) label Dec 15, 2022
@hrydgard hrydgard added this to the v1.15.0 milestone Dec 15, 2022
@hrydgard hrydgard changed the title Android: Free space reporting possibly broken on SD cards on Android 9? Android: Errors writing savedata to SD-card on Android 9 Dec 15, 2022
@ghost
Copy link

ghost commented Dec 15, 2022

Redmi Note 7 related issue #12066

@hrydgard
Copy link
Owner Author

Good find, may very well be related!

@leoxxx
Copy link
Contributor

leoxxx commented Dec 16, 2022

#15532
Maybe related the issue. Maybe related the TF card write/read permission.
The real path is "/mnt/m_external_sd" (Android 7, I am not sure if it's same or not in Android 9).

@Snake161
Copy link

Snake161 commented Dec 16, 2022

I don't think it's a permission problem, as every file on my SD card has read / write / execute permissions for the group they all belong to, that being "everybody" ; which PPSSPP should be part of
Furthermore, the emulator COULD create folders and other files (so the whole memory stick + ini files inside) so it's not a permission problem I suppose

@ghost
Copy link

ghost commented Dec 16, 2022

#15532 Maybe related the issue. Maybe related the TF card write/read permission. The real path is "/mnt/m_external_sd" (Android 7, I am not sure if it's same or not in Android 9).

Maybe your tf card is lock to read only I also encounter that issue #14544

@leoxxx
Copy link
Contributor

leoxxx commented Dec 16, 2022

#15532 Maybe related the issue. Maybe related the TF card write/read permission. The real path is "/mnt/m_external_sd" (Android 7, I am not sure if it's same or not in Android 9).

Maybe your tf card is lock to read only I also encounter that issue #14544

But my device no permission notification when I click delete iso. Just remove it from "Recent"

@anr2me
Copy link
Collaborator

anr2me commented Dec 16, 2022

It's strange if reverting from 1.14 to 1.13.2 (said to be working) still have the same issue.

If it was permission, it should've been reset the moment 1.14 got uninstalled, right?

May be there is something wrong with the memory card itself? since there are a lot of memory cards with faked size/capacity out there (ie. looked like 64/128GB sdcard while the actual capacity was only 4/8GB, and trying to use sectors beyond the real size will result to strange behaviors)

@Snake161
Copy link

Oh no the card I'm sure is original, it's 256GB - and only 14 free
I have accessed old content without problems though, and it was bought from a reliable market - also verified provenience so yeah
also, other apps do just fine - hence why it can't be the card - I tried other emulators and they all save correctly

@unknownbrackets
Copy link
Collaborator

As noted in #15532, I used some app - maybe it was a video or music playing app? It's been a while now - and sometimes deleted files using it. At some point after an Android update to maybe Android 8 or 9, it stopped being able to delete files. I had to switch to another app (Files) to delete them (MTP also worked.) Everything else seemed to work (well, I had no way to replace files in the app, but I think I could edit metadata in some way just fine), just deleting for some reason didn't.

After some other update (I think Android 10 or so) I happened to try deleting again and it magically worked. I don't know if there was any app update though.

This doesn't seem unique to PPSSPP:
koreader/koreader#4872
TeamNewPipe/NewPipe#8017
wkh237/react-native-fetch-blob#236

Maybe that last one is related and it doesn't release the file until media scans it again or something?

Do these file deletions / saves work if you delete them manually? And do they stay working after that, or they're broken next time?

-[Unknown]

@hrydgard hrydgard removed this from the v1.15.0 milestone Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Saving issue Prevents or obstructs saving game (not save states.)
Projects
None yet
Development

No branches or pull requests

5 participants