Install and setup android sdk command line tool in windows

Hey fellows in this post I will cover how to install and setup the android sdk command line tools in windows. In this post we will cover the following points

1. Downloading the android sdk form the website

2. Unzip the android sdk to any directory

3. Reorganize the folder structure

4. Download the required using sdkmanager.bat/h2>

5. Setup the path of the android sdk in windows environment variable

6. Check the setup of the android sdk

Let's get started

Step 1: Go to the Android Studio site

Android Studio Site Home Page

Step 2: Go to the Command line tools only section

Command Line Tool Section

Step 3: Click and download sdk command line tools for windows

Command Line Tools for Windows

Step 4: Accept the license and click Download Android Command Line Tools for windows button

Command Line Tools License Page

Step 5: After accepting the license and clicking the Download Android Command Line Tools for windows button downloading will be start

Command Line Tools Start Downloading

Step 6: Extract the tar file to anywhere you like.

I will extract my tar file at F:\android for easy reference where F:/ is drive name and android is the home directory of android

Extract Android SDK and Change the Android SDK Folder Name to android

Step 7: Go inside cmdline-tools folder within android folder and create and folder with name latest.

Create the Latest Folder within Cmdline Tool Folder

Step 8: Move all files and folders inside the latest folder

Move Files and Folder in Latest Folder

Step 9: Open command prompt at the bin folder to access the sdkmanager.bat and get the required packages.The sdkmanager is a command line tool that allows you to view, install, update, and uninstall packages for the Android SDK.

Open Command Prompt at bin Folder

Step 10: Now Select which android version and api you wish to download.I am going to download the latest version of android.

Android API Versions

Step 11: Enter the sdkmanager.bat sdkmanager.bat "platforms;android-31" "build-tools;31.0.0" "platform-tools" command in the command prompt to download the required packages.

Download Packages from SDK Manager

Step 12: Downloading will be start after accepting the package license by typing y in the command prompt and hit enter key from keyboard.

Download Packages License

Step 13: Downloading packages will be found under android.

Downloaded Packages

Step 14: To Setup the path go to the environment variable from the pc properties.

Environment Varibales PC Search

PC Advance Properties

Environment Varibales

Step 15: Create new variable ANDROID_HOME in the environment variable and link to the android folder in which we have all the packages.

Environment Path Android Home Setup
Environment Path Android Home Added

Step 16: Go to the path property and add the adb path to the list.

Environment Path ADB Setup
Environment Path ADB Setup
Environment Path ADB Added

Step 17: Close all the property windows by clicking OK button and open command prompt to check if everything is install correctly and type adb it should return the results as shown below

Check Adb using command prompt
Back