Based on the documentation from http://android-rebuilds.beuc.net/, I setup fully-automated recipes to rebuild the Android SDK, including setting up the reference distro environment and dependencies, with help from Docker.
For instance, to rebuild a complete Android SDK 6.0.1, checkout
https://gitlab.com/android-rebuilds/auto/tree/master/sdk-6.0.1
and type:
make
That's all !