bjornbytes / lovr

Lua Virtual Reality Framework
https://lovr.org
MIT License
1.97k stars 137 forks source link

no filesystem acces??? #796

Closed blenderman94 closed 2 months ago

blenderman94 commented 3 months ago

good day im trying to read some stuff from my sdcard on android but it fails. i gues you forgot to grant the android permission read / write . i tryed to grant it manualy with adb but since the app does not request it it fails. you key benefit of you app that is inerpreted but on oculus the android/data folder is no longer readable or writable from file_managers so it makes it very difficult to manage files without a pc.

bjornbytes commented 3 months ago

how does it fail?

bjornbytes commented 3 months ago

Also, which version of lovr are you using? v0.17.1 has the following fix for filesystem access on Android:

Change permissions for files and directories created by lovr.filesystem on POSIX (fixes ADB on Android 12+).

blenderman94 commented 3 months ago

its all fine when things are inside the org.lovr.app folder. i got adb running straight on my quest so its half way eliminating the issue. im using the latest release. im thinkering with the source code as well to add the permisions to your android maifest xml

bjornbytes commented 3 months ago

Oh I see, I didn't realize you were trying to access files outside the LÖVR save folder. For now you should add the various external storage permissions to the manifest (although it still may not work due to scoped storage in Android 11+). I'm not sure if LÖVR should add these by default, especially if they result in a permissions popup, I'd have to think about it. Another option would be to request permissions programmatically, like lovr.system.requestPermission('storage'), since that's supported from Java.