After some experiments I compiled Mono 4.4.2 for Android x86_64 (Marshmallow) using Android NDK r13b. I had to do some tricks, but after all I had these folders in my build directory:
bin etc include lib share
The bin folder looks like :
The lib folder is:
The lib folder contains only unmanaged libs, e.g. the 'mono' subfolder doesn't contain managed BCL for each version of the framework, I couldn't figure out how to tell to 'configure' script to do this. So I've compiled the same version of Mono for Linux and simply copied the lib/mono folder with all .net managed assemblies. Here goes my first question: am I allowed to do so, and if not, how can I build them in the same android build? Anyway I suppose since they are all 100% managed code, this should work.
They are really Android native binaries, I simply copy them to some place on Android, set LD_LIBRARY_PATH for libmonosgen-2.0.so and MONO_PATH for the libraries and it works. I can compile simple binaries, run .exe files from lib/mono/4.5 but I still have a feeling that I did something wrong. How should I set up this installation? What's the difference between 4.5 and 4.5-api, where should I point MONO_PATH to? What about GAC? Is there any tests I could run to check if I really have working mono installation? Is there anything I can read? Am I right that it looks that I have most of the parts and they are working? :) My main problem for now is that I don't have any tools to investigate any issues, the --trace option is silent and I have no idea why mono-sgen sometimes doesn't work.
Any help would be awesome :) Thanks!