# Android SDK mirror (pkg.shecan.ir)

> Mirror of the Android SDK repository (dl.google.com/android/repository) for the Android CLI (cmdline-tools 2026+), the legacy Java sdkmanager and Android Studio, plus the Android CLI binary itself.

- Upstream: dl.google.com/android/repository
- Mirror URL: <https://mirror-android.pkg.shecan.ir/android/repository/>
- Clients: android-cli, sdkmanager, android-studio
- Service status: <https://pkg.shecan.ir/status.json> (key `android`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/android/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/android.json>

## Limitations

- The Android CLI options --sdk_url and --sdk_index are hidden options of Android CLI 1.0; verified on 2026-10-12.
- Android Studio uses the mirror as an HTTP proxy (port 80) with "Force https:// sources to be fetched using http://"; packages are still verified by their SHA-1 checksums.
- Gradle dependencies (Google Maven) come from the separate Maven mirror.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### android-cli: persistent (user- or system-wide configuration)

Run (linux)

```sh
curl -fLo commandlinetools.zip https://mirror-android.pkg.shecan.ir/android/repository/commandlinetools-linux-16111833_latest.zip
mkdir -p ~/Android/Sdk/cmdline-tools && unzip -q commandlinetools.zip -d ~/Android/Sdk/cmdline-tools && mv ~/Android/Sdk/cmdline-tools/cmdline-tools ~/Android/Sdk/cmdline-tools/latest
```

Configuration file (linux)

```sh
export ANDROID_CLI_DOWNLOAD_URL=https://mirror-android.pkg.shecan.ir/android/cli/latest/linux_x86_64/android-cli
export PATH="$HOME/Android/Sdk/cmdline-tools/latest/bin:$PATH"
android() { command android --sdk_url=https://mirror-android.pkg.shecan.ir/android/repository --sdk_index=https://mirror-android.pkg.shecan.ir/android/repository/package_list.binpb "$@"; }
```

Run (linux)

```sh
android --sdk=$HOME/Android/Sdk sdk install platform-tools build-tools/35.0.0 platforms/android-35
```

### sdkmanager: temporary (one command or the current shell; nothing saved)

Run (linux, macos)

```sh
export SDK_TEST_BASE_URL=https://mirror-android.pkg.shecan.ir/android/repository/
sdkmanager "platform-tools" "platforms;android-35"
```

Run, HTTP proxy mode (linux, macos)

```sh
sdkmanager --no_https --proxy=http --proxy_host=mirror-android.pkg.shecan.ir --proxy_port=80 "platform-tools"
```

### android-studio: persistent (user- or system-wide configuration)

Configuration file (checked by hand)

```
Settings → Appearance & Behavior → System Settings → HTTP Proxy
  Manual proxy configuration → HTTP
  Host name: mirror-android.pkg.shecan.ir
  Port number: 80
Settings → Languages & Frameworks → Android SDK → SDK Update Sites
  ☑ Force https://... sources to be fetched using http://
```
