asd Android SDK Downloader — offline-friendly SDK component installer

install

Part of the Command Reference.

asd <name> [version]

The default action — running asd with a bare package name (no leading -) installs it. This is the only command without an explicit flag.

Arguments

  • name — the package path from the registry, e.g. ndk, build-tools, platform-tools, or a ;-qualified path like platforms;android-34.
  • version (optional) — an exact version string, e.g. 27.0.12077973. If omitted, the first matching entry in the registry is used.

Examples

asd ndk                          # latest matching NDK entry
asd ndk 27.0.12077973            # a specific NDK version
asd build-tools 37.0.0-rc2
asd platform-tools
asd "platforms;android-34"

What it does

  1. Ensures $ASD_CSV exists, downloading the registry first if needed.
  2. Looks up name (and version, if given) in the registry.
  3. Downloads the archive with aria2c, using $ASD_ARIA2C_OPTS.
  4. Verifies the download’s SHA-1 against the checksum in the registry, if one is present.
  5. Extracts the archive under $ANDROID_HOME/<package-path>.
  6. Flattens the result if the archive contained a single wrapping subdirectory.
  7. Writes a package.xml describing the component, so the Android SDK tooling (and asd --installed) recognizes it.

Errors

Error: Package 'foo' (Version: latest) not found.

The name (and version, if given) didn’t match anything in the registry — double check with asd --list.