androidmk is a tool to convert Makefile-style
Android.mk files to
Android.bp “blueprint” files, which look like json and are faster to parse.
YMMV, but they also seem more readable and largely prevent you from doing crazy if-else and convoluted stuff as you’d be drawn to if using makefiles.
As a downside, they’re an “Android-ism” and make it harder for people to port your software to a project that is not Android.
make blueprint_tools inside the AOSP tree to build the
You can then copy the binary from
~/.local/bin/ to use it outside the AOSP tree. Beware that the tool is
constantly being updated, so you might need to re-build it from time to time.
For the internal workings, and to get a mapping of make and soong variables, see the source code inside cmd/androidmk/android.go.
See this question about androidmk on StackOverflow.