Including external executables gives W^X violation since Android API 29. #5827
RendersJens
started this conversation in
Platforms
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all!
I am making an app using Godot that includes some chess variants. To offer a computer opponent and to provide game anaylsis, I want to include this fork of stockfish. It is an command line executable that analyses a chess position that you pass to it as an argument. I use OS.execute for this.
The first problem I encountered was that I cannot call an executable from res:// after exporting the project, because that path (after globalization) does not exist according to the OS. I solved it by copying the executable to user://. This works fine on linux and android API level <=28, but it is no longer allowed since API level 29:
So I am forced to copy the file to a writable directory before I can run it, but I am also not allowed to run files from a writable directoy... This is a problem ;)
In this question they discuss a solution and state that what I am trying to achieve is still allowed:
If I understand it correctly, the executable should be extracted to a specific directory upon installation, and from there it is allowed to call it. However, I don't think Godot provides me with this option. I think it would be valuable to add this. An alternative is to integrate the source code using GDExtention. This is currently undocumented so I'm not using it yet. But apart from this, including precompiled executables has other advantages: it's easy and it can use closed source binaries too.
Let me know what you guys think!
Beta Was this translation helpful? Give feedback.
All reactions