Skip to content

Restore Full Storage Access for XR devices - #22

Merged
syntaxerror247 merged 1 commit into
godotengine:mainfrom
syntaxerror247:xr-issue
Apr 20, 2026
Merged

syntaxerror247 merged 1 commit into
godotengine:mainfrom
syntaxerror247:xr-issue

Conversation

@syntaxerror247

Copy link
Copy Markdown
Member

This PR restores the MANAGE_EXTERNAL_STORAGE logic on XR devices (picoOS and horizonOS) to fix the issue caused after migration to SAF because notification isn't being triggered on these devices.

@syntaxerror247
syntaxerror247 requested a review from m4gr3d April 18, 2026 21:12
@syntaxerror247 syntaxerror247 added bug Something isn't working needs testing labels Apr 18, 2026
@syntaxerror247 syntaxerror247 added this to the 1.0.0 milestone Apr 18, 2026
Comment thread app/build.gradle
}
horizonos {
dimension "android_distribution"
applicationIdSuffix ".horizonos"

@syntaxerror247 syntaxerror247 Apr 18, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to add this suffix then we'd also need to add logic to detect the OS here https://github.com/godotengine/godot/blob/caf16709af9f08bb430ddb8cffc10cbf66c62437/platform/android/java/editor/src/main/java/org/godotengine/editor/buildprovider/GradleBuildEnvironmentClient.kt#L113-L114

But this would break the backward compatibility.

I think it's fine to ommit the applicationIdSuffix, we have versionNameSuffix to differenciate between builds.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me! I don't think we want to have to synchronize platform specific ids between Godot and GABE

@syntaxerror247 syntaxerror247 changed the title Restore Full Storage Access for XR devices to fix build issue Restore Full Storage Access for XR devices Apr 19, 2026

@dsnopek dsnopek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on Meta Quest 3 and it seems to work with Godot 4.6 from the Horizon store!

(I did hit an error in the Gradle build about it being unable to connect to "services.gradle.org", but it succeeded in copying the Gradle files from the project, so for the purposes of this PR, I think it's working. I'll keep poking at it and see if I can get it actually building, but I don't want to hold this up)

@syntaxerror247

Copy link
Copy Markdown
Member Author

I did hit an error in the Gradle build about it being unable to connect to "services.gradle.org", but it succeeded in copying the Gradle files from the project, so for the purposes of this PR, I think it's working. I'll keep poking at it and see if I can get it actually building, but I don't want to hold this up

It was due to an error during copying file after rootfs download (regression from #10)

kotlin.io.FileAlreadyExistsException: /data/user/0/org.godotengine.godot_gradle_build_environment/files/rootfs/alpine-android-35-jdk17/etc/resolv.conf.override -> /data/user/0/org.godotengine.godot_gradle_build_environment/files/rootfs/alpine-android-35-jdk17/etc/resolv.conf: The destination file already exists.

@dsnopek Can you test again? Make sure to delete the rootfs and re-download.

@dsnopek dsnopek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I was able to complete a build on HorizonOS with the latest change :-)

@syntaxerror247

Copy link
Copy Markdown
Member Author

I also tested this on the Pico 4 Ultra, and it fixes the issues there as well.

@syntaxerror247
syntaxerror247 merged commit 7790b4c into godotengine:main Apr 20, 2026
1 check passed
@syntaxerror247
syntaxerror247 deleted the xr-issue branch April 20, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants