SDK packages are usually installed via a HTTP repository (as opposed to: bundles).

The sdkmanager does not seem to accept overriding Google's repository URLs, we probably need to patch it (some early discussion).

When generating the repository-xx.xml naming is not entirely consistent, here are a few notes:

<sdk:xxx>
  s/doc/docs/
  s/build-tool/build-tools/
  s/platform-tool/platform-tools/

name[-%d]_r[%02d].zip
  revision:text
name[-%d]_r[%02d][.%d][.%d][-rc%d][-%s].zip
  api-level major minor micro preview host-os

sys-img:
%s_%d-r%02d
sdk:abi api-level revision

Here's how repository.xml is generated for API 28 by the SDK build system:

/bin/bash -c "development/build/tools/mk_sdk_repo_xml.sh                    out/host/linux-x86/sdk/sdk_x86_64/repository.xml prebuilts/devtools/repository/sdk-repository-10.xsd  build-tools linux out/host/linux-x86/sdk/sdk_x86_64//sdk-repo-linux-build-tools-userdebug.9.0.0_r33.zip:sdk-repo-linux-build-tools-userdebug.9.0.0_r33.zip platform-tools linux out/host/linux-x86/sdk/sdk_x86_64//sdk-repo-linux-platform-tools-userdebug.9.0.0_r33.zip:sdk-repo-linux-platform-tools-userdebug.9.0.0_r33.zip docs linux out/host/linux-x86/sdk/sdk_x86_64//sdk-repo-linux-docs-userdebug.9.0.0_r33.zip:sdk-repo-linux-docs-userdebug.9.0.0_r33.zip platforms linux out/host/linux-x86/sdk/sdk_x86_64//sdk-repo-linux-platforms-userdebug.9.0.0_r33.zip:sdk-repo-linux-platforms-userdebug.9.0.0_r33.zip samples linux out/host/linux-x86/sdk/sdk_x86_64//sdk-repo-linux-samples-userdebug.9.0.0_r33.zip:sdk-repo-linux-samples-userdebug.9.0.0_r33.zip sources linux out/host/linux-x86/sdk/sdk_x86_64//sdk-repo-linux-sources-userdebug.9.0.0_r33.zip:sdk-repo-linux-sources-userdebug.9.0.0_r33.zip"

Maybe we need to re-use mk_sdk_repo_xml.sh, or maybe we can aggregate the generated repository.xml directly.