Good news everybody! I now have the build-tools package for “linux” and “windows” building without the EULA being included! At least for SDK 15, but it probably will work for all of them - the affected files seem mostly unchanged since 2013…
Turns out only two files needed modification: prebuilts/sdk/tools/Android.bp and prebuilts/sdk/renderscript/Android.bp. The first is pretty much just the different clang/llvm-derived works, and the second is for renderscript. They both use default_applicable_licenses: ["prebuilts_sdk_license"] (which can be found defined here: Android.bp - platform/prebuilts/sdk - Git at Google the “it may not be entirely correct” line makes me chuckle).
I changed it to the already defined “Android-Apache-2.0”, (as defined here: licenses/Android.bp - platform//build/soong - Git at Google) which only pulls in “SPDX-license-identifier-Apache-2.0”, and no EULA (no license_text block). But it does claim “Copyright (C) The Android Open Source Project”, which I’m not happy with. It’s probably valid for the renderscript, but the rest is not their copyright. But it seemed like the smallest and cleanest solution, since it doesn’t seem to have any impact on the resulting packages outside of the EULA now not being included. All the copyrights and licenses in the NOTICE file remains unchanged, so it seems perfect.
I also tried changing it to “prebuilts_clang_host_linux-x86_license” as @alaskalinuxuser mentioned above, but it is not defined as visible globally. So it would have to be edited (“You may need to add “//prebuilts/sdk/tools” to its visibility”).
So, I propose simply adding the following line anywhere in the docker build.sh, before the make (and just to be safe, probably the lunch as well):
sed -i 's/prebuilts_sdk_license/Android-Apache-2.0/' prebuilts/sdk/tools/Android.bp prebuilts/sdk/renderscript/Android.bp
Also, I do apologize for the triple-post. I could add this to the previous post, but I’m worried it will all get too big and cluttered…