Call for Help: making free software builds of the Android SDK

I guess I haven’t tried doing the repository replacement before, it seems to have different rules than the system images. I guess we have to dig into the sdkmanager source code to figure what the requirements are for setting up a repository to replace Google’s. I see an error in the XML:

https://clbin.com/RkrPN

Warning: Errors during XML parse:                                                                                
Warning: cvc-elt.1: Cannot find the declaration of element 'sdk:sdk-repository'.                                                                                
Warning: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 70; cvc-elt.1: Cannot find the declaration of element 'sdk:sdk-repository'.                                                                                
Warning: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 70; cvc-elt.1: Cannot find the declaration of element 'sdk:sdk-repository'.]                                                                                
Warning: Additionally, the fallback loader failed to parse the XML.

I think the Google repositories are hard coded in. There used to be a way to be able to disable them in repositories.cfg, something like adding an entry for those URLs in the same style as I outlined above, but then adding something like enabled02=false.

@cdesai build the F-Droid system images, I think they are probably Apache-2.0 licensed.