I've successfully cross-compiled Ruby for Android and everything goes ok in the emulator.
But while I'm testing these funny things on my device (Nexus4) I noticed that
/storage/emulated/0) is a fuse mount with no execution permissions.
How can I execute something on the SD card?
I saw that on Linux you can pass it as argument to the linker. In Android this does not work:
/system/bin/linker wants a pointer to a special struct. I believe that I can write a small C program that creates that structure and run the linker to execute a readable program.
But what about shared libraries? Ruby load tens of shared libraries (every time you have a "require"), I bet that execute permissions are required for loading shared libraries.
Moving the executable to
/data/data/my.app.name/files/ or any other place is not a solution, my binaries are very fat (statically linked) and users should be free to specify any location where storing them.