Tangentially related, I've written a barebones assembler for Android .apk files once (strictly speaking, the assembler is for .dex files, but it also comes with a set of tools to package and sign .apk files). It showed up to be surprisingly easy. I expected to stumble upon some blocker issue any time that would make it impossible for me to continue — but one just never materialized! It's written mainly in Nim and provides enough primitives to allow creating Java "stubs" for native .so libraries, so that .apk-s can be built in Nim WITHOUT JDK AT ALL. The Android NDK is still kinda needed/useful, though IIRC mainly for access to <i>adb</i>, and especially <i>adb logcat</i> (which you'll need A LOT for debugging if you try to use this contraption).<p>I'd love to One Day™ <i>Rewrite It In Rust</i>, so that we could write .apk-s purely using the Rust toolchain, just using a JNI library as appropriate, sprinkling the code with some proc-macro annotations where needed by the assembler (for stubs), and possibly adding some lines in a <i>build.rs</i> (for .apk packaging).<p>The .dex assembler itself is at: <a href="https://github.com/akavel/dali">https://github.com/akavel/dali</a> — you may like to check out the tests at: <a href="https://github.com/akavel/dali/tree/master/tests">https://github.com/akavel/dali/tree/master/tests</a> to see how using it looks like.<p>An example project with a simple .apk written purely in Nim (NO JDK) is at: <a href="https://github.com/akavel/hellomello/tree/flappy">https://github.com/akavel/hellomello/tree/flappy</a> (unfortunately, given Nim's poor packaging story, it's most probably already bitrotten to the extent that it can't be quickly and easily built & used out of the box). I recorded a presentation about this for an online Nim conference — see: <a href="https://www.youtube.com/watch?v=wr9X5NCwPlI&list=PLxLdEZg8DRwTIEzUpfaIcBqhsj09mLWHx&index=11&t=0s">https://www.youtube.com/watch?v=wr9X5NCwPlI&list=PLxLdEZg8DR...</a>