ClassiCube icon indicating copy to clipboard operation
ClassiCube copied to clipboard

Cannot write to game folder on Android 11

Open UnknownShadow200 opened this issue 3 years ago • 6 comments

Can't write or read anything to the internal data folder anymore, probably something to do with Android/Data being restricted now

image

UnknownShadow200 avatar Apr 20 '21 21:04 UnknownShadow200

Application does not request permissions from the specific file system android 5+

lord-nt avatar Oct 10 '21 17:10 lord-nt

Which permissions are required? I don't have this issue on my android 9 device, nor was I successful in reproducing this issue in android 11 emulator

UnknownShadow200 avatar Oct 10 '21 20:10 UnknownShadow200

https://developer.android.com/about/versions/10/privacy/changes External storage access scoped to app files and media

By default, apps targeting Android 10 and higher are given scoped access into external storage https://developer.android.com/training/data-storage/files/external-scoped, or scoped storage. Such apps can see the following types of files within an external storage device without needing to request any storage-related user permissions:

To learn more about scoped storage, as well as how to share, access, and modify files that are saved on external storage devices, see the guides on how to manage files in external storage https://developer.android.com/training/data-storage/files/external and access and modify media files https://developer.android.com/training/data-storage/files/media.

On Sun, Oct 10, 2021 at 4:12 PM UnknownShadow200 @.***> wrote:

Which permissions are required? I don't have this issue on my android 9 device, nor was I successful in reproducing this issue in android 11 emulator

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/UnknownShadow200/ClassiCube/issues/834#issuecomment-939545494, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOXULQDER2AUYEIFGJNACYTUGHXT5ANCNFSM43JB7BDA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

lord-nt avatar Oct 10 '21 21:10 lord-nt

Such apps can see the following types of files within
an external storage device without needing to request any storage-related
user permissions:

   - Files in the app-specific directory, accessed using
   getExternalFilesDir().

ClassiCube only stores data within sub-directories of getExternalFilesDir() folder

UnknownShadow200 avatar Oct 10 '21 21:10 UnknownShadow200

The app may be able to write to its own app folder fine but saving external to that folder requires permissions from the system to write to the sdcard or even the internal memory. (android 10/11 specific) that may be causing the issue?

lord-nt avatar Oct 10 '21 23:10 lord-nt

yep that's true, but ClassiCube only writes to its own app folder

I'm still not sure what caused the problem for the user in this issue, although as far as I know, it hasn't happened to anyone else

UnknownShadow200 avatar Oct 11 '21 13:10 UnknownShadow200