ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.26k stars 2.27k forks source link

Interactions with external storage are broken on Android #11911

Open PercyDan54 opened 3 years ago

PercyDan54 commented 3 years ago

Describe the bug: Seems related to #6507 ? The file selector's default path is /data/user/0/{package name}/files And it can't access any file, even its own file Already gave osu permission to access storage Screenshots or videos showing encountered issue: https://user-images.githubusercontent.com/50285552/109299776-9a941b80-7870-11eb-9ad0-44a80bb64a30.mp4 (rotate 90 degress to watch after 0:32) osu!lazer version: 2021.212.0 (not sure if it's still a issue in the latest version because it's removed) Logs: runtime.log

honguyenminh commented 3 years ago

The file selector on default should point to emulated storage of current user on android instead of appdata folder. The current default is, as you said, /data/user/0/{package name}/files, which is accessible by osu, but not by any other app, so moving files there is impossible without root. And the only way to navigate to emulated storage is to go back to root, then to /storage/emulated/<current user index> which is also impossible, because root is required to go back to root dir (obviously). Just set init directory to Android.OS.Environment.ExternalStorageDirectory and we should be fine

honguyenminh commented 3 years ago

So... Android deprecated the function to get emulated storage of current user on API 29+ (which is Android 10+) We either have to drop support for newer apis, or force user to move files that need to be imported to app data folder (Android/data/<app>/files) Or use one of their "alternatives", like

uwuclxdy commented 8 months ago

is there any progress for this? it's really annoying that i cant import replays and skins

PercyDan54 commented 8 months ago

is there any progress for this? it's really annoying that i cant import replays and skins

You can now select a file in a file browser and in the "Share" menu select osu!

axurios-d commented 8 months ago

Being able to share audio files into osu would be a fix for this aswell even if you would have to change the file extension name it would work better than nothing at all.

bdach commented 7 months ago

Expanding scope of this to cover any and all storage-related breakage.