# How to Install Android SDK Command-line Tools on Windows Without Android Studio: sdkmanager, adb and platform-tools

> AI Release · @ai_releaseorg · https://ai-release.org/guides/kak-ustanovit-android-sdk-command-line-tools-na-windows_en.html

## TL;DR

- **Time to complete:** 20–30 minutes (most of it is downloading the ZIP and waiting for `sdkmanager`).
- **Difficulty:** Basic — you copy files, set two environment variables, and run four commands.
- **You need:** Windows 10/11 (64-bit), PowerShell, admin rights only if you edit the system `PATH` instead of the user `PATH`, a JDK (Java Development Kit — the runtime `sdkmanager.bat` needs), the "Command line tools only" ZIP from `developer.android.com/studio`, a USB cable, and an Android phone with **Developer options → USB debugging** enabled.
- **What you end up with:** `sdkmanager.bat` and `adb.exe` callable from any folder, `%LOCALAPPDATA%\Android\Sdk\platform-tools` holding the full adb/fastboot set, accepted SDK licenses, and a verified `adb devices` listing your phone.

Quick start (run in PowerShell, replace the ZIP name with the file you actually downloaded):

```powershell
$sdk = "$env:LOCALAPPDATA\Android\Sdk"
Expand-Archive "$HOME\Downloads\commandlinetools-win-<version>_latest.zip" -DestinationPath "$sdk\cmdline-tools"
Rename-Item "$sdk\cmdline-tools\cmdline-tools" "latest"
& "$sdk\cmdline-tools\latest\bin\sdkmanager.bat" "platform-tools"
```

Details and checks — in the steps below.

## Requirements and setup
![Illustration: Requirements and setup](https://ai-release.org/guides/img/kak-ustanovit-android-sdk-command-line-tools-na-windows-en-1.jpg?v=1796050225)


This is where most failures are born, so do not skip the checklist. The Android SDK on Windows is just a folder tree plus two environment variables; Android Studio is a convenience wrapper around exactly these tools, not a dependency.

- [ ] **Windows 10 or 11, 64-bit.** The paths below are the same on both. If you are building the machine from scratch, see [How to Install Windows 11 26H2: Step-by-Step Guide with Official ISO](https://ai-release.org/guides/kak-ustanovit-windows-11-26h2-poshagovaya-instruktsiya.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide) first.
- [ ] **A JDK installed and visible to the shell.** Check with `java -version`. If it prints `'java' is not recognized…`, install a JDK and reopen the terminal. Which JDK major version the current command-line tools require changes between releases — **verify against the official Android documentation** before downloading a JDK.
- [ ] **Free disk space**: a few GB if you later add emulator system images; `platform-tools` alone is small.
- [ ] **The ZIP from the official download page** (`developer.android.com/studio`, section "Command line tools only"). Do not guess the filename — copy it from the page.
- [ ] **A phone** with USB debugging on: Settings → About phone → tap **Build number** seven times → back → System → Developer options → **USB debugging**.

**Why:** `sdkmanager.bat` is a thin Java launcher — no JDK, no package manager. And the ZIP unpacks into a folder named `cmdline-tools` *inside* a folder named `cmdline-tools`; the SDK only recognises the tools when the inner folder is named `latest` (or a numbered version). That nesting is the single most common reason people conclude "the tools are broken".

**How to check:** run `java -version` and confirm you see a version line, not an error.

**Example:** after unpacking correctly, this path exists:

```
C:\Users\<you>\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat
```

## Step 1. Unpack the tools and pin the SDK location

**What to do:** create the SDK root, unzip the downloaded archive into `cmdline-tools`, rename the inner folder to `latest`, then set `ANDROID_HOME` for your user.

```powershell
$sdk = "$env:LOCALAPPDATA\Android\Sdk"
New-Item -ItemType Directory -Force "$sdk\cmdline-tools" | Out-Null
Expand-Archive "$HOME\Downloads\commandlinetools-win-<version>_latest.zip" -DestinationPath "$sdk\cmdline-tools"
Rename-Item "$sdk\cmdline-tools\cmdline-tools" "latest"
[Environment]::SetEnvironmentVariable("ANDROID_HOME", $sdk, "User")
```

**Why:** `ANDROID_HOME` is the single source of truth that `sdkmanager`, `adb`, Gradle and IDE plugins read. Setting it once means every future tool writes into the same tree instead of scattering packages across your disk. `%LOCALAPPDATA%\Android\Sdk` is the default location the Android tooling expects on Windows, so keeping it there avoids passing `--sdk_root` on every command.

**How to check:** list the `bin` folder and ask the tool for its version.

```powershell
Get-ChildItem "$env:LOCALAPPDATA\Android\Sdk\cmdline-tools\latest\bin"
& "$env:LOCALAPPDATA\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat" --version
```

You should see `sdkmanager.bat`, `avdmanager.bat`, `sdkmanager.bat`-adjacent scripts, and a plain version number printed by the second command. If instead you get a `NoClassDefFoundError` or a `JAVA_HOME` complaint, the JDK step is unfinished.

**Example:** a wrong layout looks like `…\Sdk\cmdline-tools\cmdline-tools\bin\sdkmanager.bat` (note the doubled name) — the SDK will not find the tools there.

## Step 2. Install platform-tools, add PATH, accept licenses
![Illustration: Step 2. Install platform-tools, add PATH, accept licenses](https://ai-release.org/guides/img/kak-ustanovit-android-sdk-command-line-tools-na-windows-en-2.jpg?v=1796050229)


**What to do:** install the packages you need, then put `platform-tools` and the `cmdline-tools\latest\bin` folder on your user `PATH`.

```powershell
$sdk = "$env:LOCALAPPDATA\Android\Sdk"
& "$sdk\cmdline-tools\latest\bin\sdkmanager.bat" --list
& "$sdk\cmdline-tools\latest\bin\sdkmanager.bat" "platform-tools"
& "$sdk\cmdline-tools\latest\bin\sdkmanager.bat" --licenses
$old = [Environment]::GetEnvironmentVariable("Path","User")
[Environment]::SetEnvironmentVariable("Path", "$old;$sdk\platform-tools;$sdk\cmdline-tools\latest\bin", "User")
```

Answer `y` to each license prompt in the third command — there are several, and skipping them makes later package installs fail silently.

**Why:** `platform-tools` is the package that contains `adb.exe` (Android Debug Bridge — the client that talks to a phone over USB or Wi-Fi), `fastboot.exe`, and the USB driver helper. Putting the folder on `PATH` is what turns `adb` from a full path into a command name. The `--list` run first is free and shows the exact package IDs available in *your* channel, which is how you avoid typos.

Typical package IDs you will see and may need:

| Package ID | What it gives you | Install when |
|---|---|---|
| `platform-tools` | `adb.exe`, `fastboot.exe` | Always |
| `build-tools;<version>` | `aapt2`, `apksigner`, `zipalign` | You build APKs from CLI |
| `platforms;android-<API-level>` | `android.jar` for compiling | You build with Gradle/CLI |
| `emulator` + `system-images;…` | Emulator and OS images | You have no physical phone |

Check the live list for the actual version numbers of `build-tools` and `platforms` — do not copy them from a blog post.

**How to check:** open a **new** PowerShell window (the old one keeps the old `PATH`) and run:

```powershell
adb version
where.exe adb
```

Expected: `adb version` prints `Android Debug Bridge version …` plus a build number, and `where.exe adb` prints exactly one path under `…\Android\Sdk\platform-tools\adb.exe`. If `where.exe` returns two different adb paths, one of them belongs to another tool — see Troubleshooting.

**Example:** `sdkmanager "platform-tools"` produces a short progress line and finishes with `done`; the folder `%LOCALAPPDATA%\Android\Sdk\platform-tools` then contains `adb.exe`, `AdbWinApi.dll` and `AdbWinUsbApi.dll`. Those two DLLs must stay next to `adb.exe` — copying only the EXE is a known way to break USB detection.

## Step 3. Verify end-to-end against a real device
![Illustration: Step 3. Verify end-to-end against a real device](https://ai-release.org/guides/img/kak-ustanovit-android-sdk-command-line-tools-na-windows-en-3.jpg?v=1796050237)


**What to do:** connect the phone, authorise the computer, and run three checks: device visibility, shell access, and an APK install.

```powershell
adb devices
adb shell getprop ro.product.model
adb install -r "C:\path\to\app-debug.apk"
```

**Why:** `adb devices` proves the USB driver, cable and authorisation chain all work. `adb shell getprop` proves adb can actually execute on the device, not just enumerate it. `adb install` proves the whole pipeline — which is the real goal of installing platform-tools without Studio.

**How to check:** the first command must print:

```
List of devices attached
<RANDOM-SERIAL>        device
```

The word `device` (not `unauthorized`, not `offline`) is the success signal. `adb shell getprop ro.product.model` should echo your phone model, e.g. `Pixel 7`. `adb install -r` ends with `Success`.

**Example:** the first time you connect, the phone shows a dialog **"Allow USB debugging?"** with an RSA key fingerprint. Until you tap **Allow**, `adb devices` shows `unauthorized` and every other command fails with `error: device unauthorized`.

For cable-free work, enable **Developer options → Wireless debugging**, then use the IP and port shown on that screen:

```powershell
adb pair <phone-ip>:<pair-port>
adb connect <phone-ip>:<debug-port>
```

Both devices must be on the same Wi-Fi network. If you want to go further than adb — screen mirroring, file transfer, notifications — see the open-source options in [How to Connect Android to Windows without Microsoft Phone Link: Open Source Alternatives](https://ai-release.org/guides/kak-svyazat-android-s-windows-bez-microsoft-phone-link.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide). And if the APK you are sideloading is your own build, the distribution rules are covered in [How to Publish a Private App on Google Play and Install It on Android](https://ai-release.org/guides/poshagovoe-rukovodstvo-kak-opublikovat-chastnoe-prilozh.html?utm_source=tg&utm_medium=channel&utm_campaign=guide_inline&utm_content=guide_to_guide).

## Troubleshooting

**Problem. `sdkmanager` works only when you type the full path**

- Error: `'sdkmanager' is not recognized as an internal or external command, operable program or batch file.`
- Cause: the `PATH` entry was written to the current process only, or the terminal was opened before the change, or the folder is still named `cmdline-tools` instead of `latest`.
- Solution: check the folder name, then re-apply and verify from a fresh window:

```powershell
Test-Path "$env:LOCALAPPDATA\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat"
[Environment]::GetEnvironmentVariable("Path","User") -split ';' | Select-String "Android"
```

If the path is absent, rerun the `SetEnvironmentVariable` line from Step 2. Note that running it twice appends duplicates — harmless, but clean them up if you care.

**Problem. adb sees nothing**

- Error: `error: no devices/emulators found` (or `adb devices` lists the serial with `unauthorized`)
- Cause: USB debugging off, a charge-only cable, the RSA dialog never accepted, or a missing OEM USB driver. On Windows, a driver problem shows up in Device Manager as an unknown device with a yellow warning icon.
- Solution: run the sequence below, accept the on-screen prompt, then re-check. If it still fails, install the OEM driver (Samsung, Xiaomi, Google, etc. publish their own) or switch the phone's USB mode from "Charging only" to "File transfer".

```powershell
adb kill-server
adb start-server
adb devices -l
```

**Problem. two adb versions fight each other**

- Error: `adb server version (<server>) doesn't match this client (<client>); killing...`
- Cause: another `adb.exe` (bundled with an emulator, a phone-manager utility, or an old SDK copy) is already running the server on port 5037. The mismatch repeats on every command.
- Solution: find all copies, keep one, and restart the server.

```powershell
where.exe adb
taskkill /IM adb.exe /F
adb start-server
adb devices
```

Remove the stale folder from `PATH`, or rename its `adb.exe`, then reopen the terminal. Only one adb version may own port 5037 at a time.

## Summary and next steps

You now have a Studio-free Android SDK at `%LOCALAPPDATA%\Android\Sdk` with `sdkmanager`, `adb` and `platform-tools` callable from any terminal, and a phone verified over USB. Next, add `build-tools;<version>` and `platforms;android-<API-level>` from `sdkmanager --list` when you start compiling, and refresh the toolset later with `sdkmanager --update`.

## FAQ

**Do I need Android Studio to use adb?**
No. `adb` ships inside the `platform-tools` package, and `sdkmanager` installs it. Studio bundles the same files for convenience; installing the command-line tools alone is a supported, complete setup.

**Where does sdkmanager install packages on Windows by default?**
Into the SDK root it resolves from `ANDROID_HOME`, which in this guide is `%LOCALAPPDATA%\Android\Sdk`. You can point a single run elsewhere with `sdkmanager --sdk_root=<path> "platform-tools"`.

**Can I install an APK with adb without root?**
Yes. `adb install -r <file.apk>` works on a normal, non-rooted phone as long as USB debugging is enabled and the RSA prompt was accepted. You do not need to toggle "Install unknown apps" for adb installs — that setting applies to installs started on the phone itself.

**How do I update platform-tools later?**
Run `sdkmanager --update` to refresh everything installed, or `sdkmanager "platform-tools"` to reinstall just that package, then `adb kill-server` so the new binary takes over.
