asd Android SDK Downloader — offline-friendly SDK component installer

Getting Started

asd is a single Bash script plus a setup installer. It needs a handful of standard command-line tools already on most Linux systems.

1. Install dependencies

Dependency Purpose
aria2c Multi-threaded HTTP download
unzip Archive extraction
awk CSV parsing
curl Registry updates
sha1sum Checksum verification

Arch Linux:

sudo pacman -S aria2 unzip gawk curl coreutils

Debian / Ubuntu:

sudo apt install aria2 unzip gawk curl coreutils

macOS (Homebrew):

brew install aria2 unzip gawk curl coreutils

2. Get the source and run setup

git clone https://github.com/psdkjoon/asd.git
cd asd
sudo ./setup

This installs the asd binary to /usr/local/bin and the CSV registry directory to /opt. The setup script auto-detects whether sudo is actually needed for the target directories, so if you point it at user-owned paths (see below) it will skip privilege escalation entirely.

Prefer not to touch system directories? Install to your user profile instead — no password prompt required:

./setup ~/.local/bin ~/.local/share/asd
export PATH="$HOME/.local/bin:$PATH"
export ASD_CSV=~/.local/share/asd/myket.csv

Add the export lines to your ~/.bashrc or ~/.zshrc to make them permanent. See Configuration for every environment variable asd understands, and Bypassing sudo for the full no-root setup.

3. Download the package registry

asd resolves package names and versions from a local CSV file rather than querying the network on every lookup. Fetch it once before installing anything:

asd -up

This downloads sdk-archives.csv from maven.myket.ir, filters it down to Linux-only entries, and stores it at $ASD_CSV (/opt/myket.csv by default).

4. Install your first component

asd platform-tools

asd looks up platform-tools in the registry, downloads it with aria2c, verifies its SHA-1 checksum, extracts it under $ANDROID_HOME (~/Android/Sdk by default), and writes a package.xml so the Android SDK tooling recognizes it as installed.

Check that it worked:

asd --installed

Next steps

  • Read Configuration to point asd at a custom SDK location or registry path.
  • Browse the Guides for common workflows like installing the NDK, repairing broken packages, and verifying checksums.
  • Look up any command’s exact syntax in the Command Reference.