Well done.. I'm curious about whether this would be possible in Android. I'm not talking about OpenGL and using the ndk but creating Android activities. Would it be much much more difficult?
I'm not really sure what you mean. Any program for Android which is 100% C code is going to be using the NDK in most cases. Including ones creating an activity natively ( http://developer.android.com/reference/android/app/NativeAct... ).
Seemly what it do is compile a valid ARM code using arm abi (not even the linux abi), and then there is a component that do use android OS stuff to load in the memory the code you compiled for arm abi...
Funky stuff. And patended. (Marmalade website make VERY CLEAR that their "Secret sauce" is their loaders, that are also very much patended...)