The Android SDK tools are split across Command-Line Tools, Build Tools, Platform Tools and the Emulator, and between them they build, sign, debug and test apps.
Most people use them through Android Studio without thinking about it. CI servers and release pipelines skip the IDE and call them from a terminal.
Older guides tend to go wrong on exactly this point. The legacy SDK Tools package gets no updates anymore, and its release notes record the removal of the android command and ddms in revision 25.3.0 (March 2017). Any tutorial built around the old tools folder describes a setup that no longer exists.
Which Android SDK Tools Ship in Which Package?
The command-line utilities for building, signing, debugging and testing Android apps are spread over those four packages. Each one can be installed or updated through the SDK Manager in Android Studio or through sdkmanager, and all of them end up in the same Android SDK directory.
| Package | Install location | Key tools | Used for |
|---|---|---|---|
| Command-Line Tools | cmdline-tools/version/bin/ | sdkmanager, avdmanager, apkanalyzer, lint, retrace | SDK management, virtual devices, APK and code analysis |
| Build Tools | build-tools/version/ | aapt2, apksigner, zipalign | Resource packaging, signing, alignment |
| Platform Tools | platform-tools/ | adb, fastboot, logcat | Device communication and debugging |
| Emulator | emulator/ | emulator, mksdcard | Virtual devices and SD card images |
Command-Line Tools replaced the old SDK Tools package. A script can now depend on a specific version and keep working when a newer one ships.
Build Tools work the same way, with several versions sitting next to each other. On Android Gradle Plugin 3.0.0 or higher, a project uses the version the plugin specifies, unless a buildToolsVersion line in the module build file overrides it.
None of this is the IDE itself. A few of the tools are wired into Android Studio, and the rest only run from a terminal.
Platform Tools also come as a standalone download, a separate subset of the SDK built around adb and fastboot. That suits CI machines, and anyone flashing a phone without an IDE.
How to Install and Configure Android SDK Tools
Install through the SDK Manager inside Android Studio, through sdkmanager from the standalone command-line tools, or by downloading Platform Tools directly. Whichever way you go, ANDROID_HOME gets set afterward and the tool folders go on the PATH.
Install with Android Studio
Open SDK Manager and switch to the SDK Tools tab. Command-Line Tools, Build Tools, Platform Tools and the Emulator each get a checkbox there. SDK platforms live on a different tab, SDK Platforms.
According to the Platform Tools release notes from Android Developers, Studio also keeps Platform Tools current on its own.
Starting from a machine with no IDE? The walkthrough to install Android Studio covers the setup.
Install without Android Studio

Headless machines and CI runners only need the command-line tools zip. Getting the folder layout right is the real work, more than the download.
- Download the command-line tools package from the Android Studio page and extract it.
- Move the extracted cmdline-tools folder into a new directory such as android_sdk, which becomes the SDK root.
- Create a subfolder called latest inside cmdline-tools.
- Move bin, lib, NOTICE.txt and source.properties into latest.
- Point ANDROID_HOME at android_sdk and add cmdline-tools/latest/bin to the PATH.
- Install packages with sdkmanager “platform-tools” “platforms;android-36”, then run sdkmanager –licenses to accept the licenses.
The latest folder is fine for local work. In scripts, pin a specific version with sdkmanager –install “cmdline-tools;version”.
Skip the latest folder and sdkmanager can lose track of the SDK root. The –sdk_root=path option points it at the right directory.
As of November 2026, the sdkmanager reference page carries a deprecation notice that names the Android CLI command android sdk [install|list|update|remove] as the replacement. The tools overview, meanwhile, still lists sdkmanager under Command-Line Tools.
So the two official pages disagree a little. I’d treat sdkmanager as current but on its way out, and write CI scripts so it’s easy to swap later.
Set ANDROID_HOME and PATH on Windows, macOS and Linux
The official guidance is to set the ANDROID_HOME environment variable and add the tool directories to the command search path.
On macOS and Linux, run export ANDROID_HOME=/path/to/android_sdk, then export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools. Put both lines in ~/.zshrc or ~/.bashrc so they stick.
On Windows, create ANDROID_HOME under “Edit the system environment variables”, then append %ANDROID_HOME%\cmdline-tools\latest\bin and %ANDROID_HOME%\platform-tools to Path.
If you’re not sure where your SDK is, Android Studio typically uses %LOCALAPPDATA%\Android\Sdk on Windows, ~/Library/Android/sdk on macOS and ~/Android/Sdk on Linux.
Gradle projects add one more place to check. The sdk.dir entry in local.properties tells Gradle where the SDK lives, even when the environment variable is missing.
One trap sits in the official docs. The tools overview and the environment variables page still name ANDROID_HOME/tools and ANDROID_HOME/tools/bin in their PATH advice, and those folders belong to the deprecated SDK Tools package.
Use cmdline-tools/latest/bin instead. After any PATH edit, restart the terminal. Then run adb kill-server followed by adb start-server so the server picks up the changed environment variables.
Debugging and Device Control with adb, fastboot and logcat
Nearly all device work runs through adb, fastboot and logcat. adb talks to a running device or emulator. fastboot writes to a device that is sitting in bootloader mode. logcat reads the system log.
How adb connects to a device

adb runs as a client in your terminal, a daemon (adbd) on the device, and a server on your computer that manages traffic between them. The server binds to local TCP port 5037, and every client uses that port.
When a connection fails, the cause is usually something boring.
- Developer options are hidden by default on Android 4.2 (API 17) and higher, and USB debugging lives inside them.
- The device shows an RSA key dialog, and it has to be accepted before any adb command runs.
- With several devices attached, adb throws “more than one device/emulator” until you pick one. Use -s serial, -e for the only emulator, -d for the only hardware device, or set the ANDROID_SERIAL variable.
- On Windows, a phone without its OEM USB driver never shows up in adb devices.
Commands that cover most daily work
A short list of commands handles most of what you’ll do day to day.
- adb devices
- adb install path_to_apk
- adb install -t test.apk, because the -t flag is required for test APKs
- adb install-multiple base.apk split1.apk
- adb shell
- adb logcat
Android Studio runs installs on its own, so adb install mostly matters in scripts and CI. For the long tail of flags, a cheat sheet of adb commands saves some digging.
One dated change from the Platform Tools release notes (November 2026, revision 37.0.3): adb install –fastdeploy is deprecated in favor of the android install command.
Wireless debugging
Wireless debugging needs both machines on the same wireless network, plus current Platform Tools. The device has to run Android 11 (API 30) or higher on phones, or Android 13 (API 33) or higher on TV and Wear OS.
On Android 11 and higher, run adb pair ipaddr:port once per workstation, using the address and pairing code shown on the device, then confirm with adb devices. Platform Tools 37.0.3 adds adb pair –qr, which pairs through a QR code shown in the terminal.
Android 10 and lower is a little more work. Connect over USB first, run adb tcpip 5555, unplug, then run adb connect device_ip_address:5555.
fastboot and logcat

fastboot flashes partitions while the device sits in its bootloader, so it works when adb cannot. Unlocking the bootloader erases user data on most devices. Back up first.
adb logcat gives you the live feed of the system log. adb logcat -c clears the buffer, and adb logcat *:E trims the output to errors and above.
On versions, there’s no reason to pin an old build. Newer adb and fastboot features stay backward compatible, so the latest Platform Tools is the recommended install.
Building, Shrinking and Signing an App from the Command Line

A command-line build runs in a fixed order. aapt2 packages the resources, then D8 or R8 converts the code to DEX. zipalign aligns the archive after that, and apksigner signs it last.
Android Gradle Plugin runs zipalign automatically. Custom build systems have to call it themselves.
What each build tool does

- aapt2 compiles and links app resources into the APK
- D8 converts Java bytecode into DEX files
- R8 handles shrinking, obfuscation and code optimization, and it produces the DEX output too
- zipalign aligns uncompressed files so they can be read with mmap(2) instead of being copied into RAM
- apksigner signs and verifies APKs, and has shipped since Build Tools 24.0.3
R8 renames classes and methods through code obfuscation, so release stack traces look scrambled. retrace, from the Command-Line Tools package, decodes them back to your original source.
Align and sign an APK

Order matters here. Run zipalign first and apksigner second, because any change to an APK after signing invalidates the signature.
- zipalign -P 16 -f -v 4 infile.apk outfile.apk
- zipalign -c -P 16 -v 4 existing.apk, which only checks alignment
- apksigner sign –ks release.jks app.apk
- apksigner verify app.apk
For APKs that contain .so libraries, -P 16 aligns them to a 16 KiB page boundary, which works on both 16 KiB and 4 KiB devices. The older -p flag is deprecated.
apksigner picks signature schemes (v1 to v4) from –min-sdk-version, which defaults to the minSdkVersion in the manifest. Rotated signing keys work on Android 13 (API 33) and higher.
The order flips with jarsigner. There, zipalign runs after signing, though jarsigner is the not-recommended path.
When Gradle is enough and when it is not
Most projects never call these tools by hand. Direct use pays off in CI pipelines, custom build systems, manual release signing, and when you’re debugging a build that fails halfway.
One failure comes up a lot. The build pins a Build Tools version that isn’t installed on the CI image, and the licenses haven’t been accepted either. Nothing moves until sdkmanager installs the package, for example sdkmanager “build-tools;36.0.0”.
For Play releases, apps ship as Android App Bundles, and bundletool builds installable APK sets from them for testing. It’s a separate download, not one of the four SDK packages. The trade-offs are laid out in this comparison of the APK and AAB formats.
Testing Without a Phone Using the Emulator and avdmanager
Without hardware, sdkmanager downloads a system image, avdmanager creates the virtual device, and the emulator binary boots it.
As of November 2026, the avdmanager reference page carries a deprecation notice that points to the Android CLI command android emulator [create|remove], and it sends Android Studio users to the IDE for creating and managing AVDs. The emulator command-line reference page has its own notice saying the emulator tool is deprecated, pointing to android emulator [create|start|stop|list].
Create and start a virtual device

The create command needs a name (-n) and an SDK package ID (-k). Everything else is optional. The ID follows the pattern system-images;android-<API>;<tag>;<abi>.
- avdmanager create avd -n test -k “system-images;android-<API>;<tag>;<abi>”
- avdmanager list avd
- emulator -list-avds
- emulator @test
Accelerated emulation needs a system image that matches the host CPU architecture. It runs on KVM on Linux, WHPX on Windows and HVF on macOS, and emulator -accel-check tells you whether a hypervisor is installed.
Forcing acceleration with -accel on makes the emulator refuse to start when no hypervisor is usable. -accel off is a software-emulation mode that the docs call unsupported and very slow, and the emulator won’t start in that mode unless the ANDROID_I_WANT_MY_TCG variable is set to yes. An x86_64 image on an ARM laptop is the usual cause of that failure.
Two startup flags save time. -no-snapshot skips Quick Boot entirely, and -wipe-data resets the AVD to factory state. Startup options can only be set when the emulator launches, so a wrong flag means a restart.
Prefer a window over a terminal? This walkthrough on running the emulator inside Android Studio covers the GUI route.
Emulator or physical device

The emulator is good at a few things.
- Simulated phones, tablets, Wear OS, Android Automotive OS and Android TV devices across multiple API levels
- Simulated calls, location, network speeds and sensors
- Faster data transfer than USB to a physical device
It also has a price. The docs list at least 16 GB of RAM and 16 GB of disk space, plus 64-bit Windows 10 or higher, macOS 12 or higher, Linux or ChromeOS. Below that, the emulator may run, just not smoothly.
A physical device wins in other places.
- Manufacturer skins and battery optimizers
- Thermal throttling under sustained load
- Real camera, Bluetooth and sensor behavior
- Cases the docs themselves send to hardware
Use the emulator for API-level coverage and CI. Keep one real phone for anything that touches hardware.
Automated testing from the command line
adb shell monkey sends pseudo-random UI events to an app, and the -s flag takes a seed so a crashing run can be replayed. UI Automator is a framework for UI tests that cross app boundaries, such as system dialogs and notifications.
Firebase Test Lab runs instrumentation tests on cloud-hosted devices. It fills the hardware gap when a lab of phones is not an option.
Profiling, Inspecting and Linting an App

Android Profiler watches a running app, and Layout Inspector reads its live view tree. Perfetto records system traces. Android Lint reads source, while apkanalyzer reads the built APK.
Android Profiler
Profiling needs a device or emulator on API level 29 or higher with Google Play, plus Android Gradle Plugin 7.3 or higher.
The CPU profiler offers system traces, callstack sampling and Java/Kotlin method recording. On the memory side you get heap dumps, Java/Kotlin allocations and native allocations. Energy is covered by the Power Profiler, and network traffic sits in a separate tool, the Network Inspector.
The build type decides what you see. A profileable build, based on the release variant, runs with low overhead. A debuggable build gives complete data and is required for heap dumps and Java/Kotlin allocation recording, but it adds overhead.
Timing numbers from a debuggable build mislead. Measure speed on the profileable build and switch to debuggable only for memory questions.
Layout Inspector
Layout Inspector reads a running app’s layout on an emulator or physical device. It shows the Component Tree in real time, with each component’s attributes in a side panel.
- Snapshots can be exported and imported for sharing
- Compose, View and hybrid layouts are all supported
- Recomposition counts show which composables update too often
One gap carries over from the old tooling. The Hierarchy Viewer documentation states that Layout Inspector does not provide profiling details about layout performance. For layout speed, the Hierarchy Viewer and Device Monitor docs point to Window.OnFrameMetricsAvailableListener.
Perfetto
The Android docs describe Perfetto as the platform-wide tracing tool introduced in Android 10. The perfetto command collects performance data through adb from data sources such as ftrace for kernel information, atrace for user-space annotations and heapprofd for native memory.
Light mode supports only atrace and ftrace, and its interface is similar to Systrace, so existing habits carry over. Normal mode uses protocol buffer configs and reaches data sources beyond those two.
A 10-second light-mode capture looks like this:
- adb shell perfetto -t 10s -b 32mb –out /data/misc/perfetto-traces/trace.perfetto-trace sched/sched_switch
The output path must be a full pathname, and the defaults are a 10-second duration and a 32mb buffer. Pull the file with adb pull, then open it in the Perfetto UI. The Android docs say Perfetto can record arbitrarily long traces, while they describe Systrace as built for short captures.
Android Lint and apkanalyzer

Android Lint is the static check. It ships in the Command-Line Tools package and runs through Gradle with ./gradlew lint. The idea is the same as linting in programming, applied to Android resources, manifests and APIs.
apkanalyzer inspects the built artifact instead. The syntax is apkanalyzer [global-options] subject verb [options] apk-file, with subjects such as apk, files, manifest, dex and resources.
- apkanalyzer -h apk download-size app-release.apk
- apkanalyzer manifest print app-release.apk
- apkanalyzer dex list app-release.apk
Only apk compare takes a second APK. That makes it a cheap size gate in a pipeline, diffing a release candidate against the last shipped build.
The same analysis is available in Android Studio’s APK Analyzer.
Which Android SDK Tool Fits Which Job?

SDK Manager, adb and logcat cover most daily work. Every other tool answers a narrower job.
| Job | Tool | Package | Studio or terminal |
|---|---|---|---|
| Install or update SDK packages | sdkmanager | Command-Line Tools | Both |
| Read device logs | logcat through adb | Platform Tools | Both |
| Create a virtual device | avdmanager | Command-Line Tools | Both |
| Sign a release APK | apksigner | Build Tools | Terminal, or Gradle |
| Check APK download size | apkanalyzer | Command-Line Tools | Both |
| Trace UI jank | Perfetto | On the device, started through adb | Both |
| Inspect a live layout | Layout Inspector | Android Studio | Studio, plus an Android CLI equivalent |
| Flash a partition | fastboot | Platform Tools | Terminal |
Learn adb, logcat and SDK Manager first, since they pay off on day one. apksigner, zipalign and sdkmanager matter most on pipeline machines where nobody opens an IDE. fastboot, apkanalyzer and Perfetto are the occasional ones, reached for when a specific problem shows up.
The simpler option is enough more often than not. Android Studio already covers install, emulator and profiling, so the terminal earns its place only when work has to run without a person, such as continuous integration builds and release signing.
For the wider toolchain around the SDK, this roundup of mobile app development tools covers the rest.
Which Android SDK Tools Are Deprecated or Removed?

The android command, ddms, Traceview, Hierarchy Viewer, Systrace and avdmanager all turn up in old tutorials, and none of them lines up with the current docs anymore. Each has a documented status and a replacement, shown below as of November 2026.
| Old tool | Status | Replacement |
|---|---|---|
| android command | Removed in SDK Tools 25.3.0 (March 2017) | avdmanager for virtual devices, sdkmanager for packages |
| ddms | Removed in SDK Tools 25.3.0 | Android Profiler, adb, Device Explorer |
| Traceview | Deprecated (Android Studio 3.2 and later); the standalone tool was also dropped from SDK Tools 25.3.0 | Android Studio CPU profiler |
| Hierarchy Viewer | No longer being developed | Layout Inspector (Android Studio 3.1 or later) |
| Systrace | The docs say it still works on all platform versions, but it was removed from the Platform Tools package | Perfetto, recommended on Android 10 and higher |
| avdmanager | Deprecation notice on its reference page | android emulator [create|remove] |
Systrace is not gone
“Replaced” overstates it. The Android docs say Systrace works on every platform version and recommend Perfetto only for devices on Android 10 and higher.
Tracing an older device can still mean Systrace, but check where you get it. The Platform Tools release notes say systrace was removed from that package, and they point to Android Studio Profiler, gpuinspector.dev or Perfetto instead. On anything newer, start with Perfetto.
The Hierarchy Viewer timeline
No single page tells the whole story, so this sequence is stitched together from three sources. SDK Tools 25.3.0 removed the command-line version in March 2017, and revision 26.0.1 returned it inside Android Device Monitor. Device Monitor itself was deprecated in Android Studio 3.1 and removed in Android Studio 3.2.
Moved, not removed
The same 25.3.0 release relocated jobb, lint, monkeyrunner, screenshot2 and Uiautomatorviewer to bin/ rather than deleting them. A removal list that includes them is wrong.
Lint is the one that matters in practice, since it is still a working part of the Command-Line Tools package.
Spotting an outdated guide
Be wary of any guide that does one of these things:
- Runs android avd or android update
- Opens ddms or Device Monitor
- Starts Hierarchy Viewer as a standalone tool
- Profiles with Traceview
Any one of them puts the guide before Android Studio 3.2. The Android CLI now appears on the sdkmanager, avdmanager and emulator pages as the successor and on the Layout Inspector page as an equivalent, so check the docs before copying old commands into a CI script.
Android SDK Tools FAQ
Why does my terminal say adb is not recognized?
The platform-tools folder is missing from your PATH. Add ANDROID_HOME/platform-tools to PATH, open a new terminal window and run adb version.
Android Studio locates adb on its own, so the gap only shows up in a plain terminal.
How do I update Android SDK tools?
Open SDK Manager in Android Studio and apply the pending updates, or run sdkmanager –update from the terminal.
Run sdkmanager –list –newer first if you only want to see new or updatable packages.
How do I list or remove installed SDK packages?

sdkmanager –list shows installed and available packages. To remove one, run sdkmanager –uninstall followed by its package path.
If an old package seems to be missing, add –include_obsolete to the list command.
Which Java version do the command-line tools need?
Neither the official download page nor the sdkmanager reference states a minimum Java version.
The tools are Java programs, so install a current JDK and point JAVA_HOME at it. If sdkmanager rejects the one it finds, the error output will say why.
Should I use ANDROID_HOME or ANDROID_SDK_ROOT?
Go with ANDROID_HOME. ANDROID_SDK_ROOT is deprecated, and if you keep using it, Android Studio and the Android Gradle Plugin check that the old and new variables are consistent.
In older scripts that still export both, make them point to the same path.
Where does the emulator store virtual device files?
By default, virtual devices live under ~/.android/avd/. The ANDROID_AVD_HOME variable overrides that location, which helps when AVD disk images fill the system drive.
The emulator -avd command searches ANDROID_AVD_HOME first, then $ANDROID_USER_HOME/avd/, then $HOME/.android/avd/.
Which Android SDK Tools to Set Up First
The tools reach a project in order of need. Device access comes first, package management second and release signing last.
- Platform Tools: adb and logcat
- Command-Line Tools: sdkmanager
- Build Tools: zipalign and apksigner
Platform Tools return feedback from the first connected device. Command-Line Tools matter once scripts take over installs, and Build Tools matter at the first release build.
My advice is to pin Command-Line Tools and Build Tools, and let Platform Tools float. Command-Line Tools versions belong in scripts and Build Tools versions in Gradle files, which keeps CI builds reproducible. Newer adb and fastboot features stay backward compatible, so the latest Platform Tools is safe to run.
One condition changes this advice. As of November 2026, the sdkmanager, avdmanager and emulator reference pages each point to an Android CLI command, so pinned CI scripts need a review when that switch reaches the build image.
A signed bundle is the last tool-driven step, and publishing an app on Google Play is the stage that follows.
- PyCharm Tutorial: From Install to Your First Debug Session - December 3, 2026
- How Software Teams Can Retire Old Hardware Without Losing Sleep - December 2, 2026
- PyCharm vs VS Code for Python: Speed, Debugging, Cost - December 1, 2026



