On Android, it appears that creating a memory-mapped file with 'execute' permissions in a location accessible by multiple processes is not possible (without root). The Android platform seems to enforce strict W^X (Write XOR Execute) policies, which prevent memory from being simultaneously writable and executable in shared memory locations.
There's also another issue. To utilize common shared storage in Android, the requisite permissions must be set in AndroidManifest.xml
.
However, despite setting the appropriate permissions, creating a RWX memory mapped file on Android does not seem to work regardless. It may be possible if you memory map the file twice (non-writeable for executing, and writeable for writing, but I have not yet tested).
Current Behaviour
Currently on Android, library will not be able to detect existing LocatorHeader
(s) created by other instances of the library in the same process. A new LocatorHeader
will always be created.