Setup adb on android windows mac and linux 1200x720 1

Learn to Install and Use Android ADB on Windows

Avatar of Luis Antonio Costa
Learn how to install and use ADB on Android from Windows to run commands, troubleshoot problems, and access advanced features.

If you have a device Android, you have certainly heard of the ADB from android (Android Debug Bridge, “Android Debug Bridge”), a command-line utility included in Google's Android SDK. ADB is able to control your device via a USB connection from a computer, copy and receive files, install and remove applications, execute commands, and much more.

Read also Find a lost Android phone., Hard reset on Android e best Android launchers.

In this article we will teach you how to install and use Android ADB on your computer to perform practical actions and tricks on your smartphone or tablet from a Windows computer.

Installing Android Studio and the Android SDK

The first thing you will need to get access to Android's ADB is the SDK (Software Development Kit, “Software Development Kit”, in English). To do this, just download and install the Android Studio, a platform used by developers to create apps for Android. This program already has the Android SDK and Android ADB built into the installation. 

Advantages of android adb
Through the use of ADB, available in the Android SDK, you can execute specific commands on your device

For that, go to download page from Android Studio and download the installer. Once the installation process is complete, simply launch Android Studio and follow the setup instructions and the program will install the platform tools package, which contains Android ADB and other utilities. 

Enabling USB debugging on your smartphone

To use Android ADB with your device, you must enable a feature called USB debugging. To do this, go to your device's settings and select the option "Over the phone"

smartphone options
In some cases, just click 7 times on the Android version to release “Developer Options” on your smartphone

First, you need to enable developer options on your device. To do this, tap the serial number field on your smartphone seven times. Once you have enabled these options, return to the main settings page and you will see a new option at the bottom called “Developer Options”. Open this menu and activate “USB Debugging”.

USB debug option
Make sure the “USB Debugging” option is enabled

Now every time you connect your phone to the computer you will see a message “Allow USB debugging?”. Just tick the option “Always allow for this computer”.

usb debug notification
Whenever you connect your smartphone to computer, Android notifications should warn you that USB debugging is enabled

Testing ADB and installing drivers on your smartphone

Now that USB debugging is enabled on your smartphone, it's time to test Android's ADB. To do this, open the folder where you installed the SDK tools and select the platform tools folder (platform-tools). This is where the ADB program is stored. Hold down the Shift key and right-click inside the folder. Choice “Open Command/PowerShell Window Here”.

Opening a powershell window
After installing Android Studio and SDK, go to Android Tools folder and open a Windows Terminal or PowerShell window

To test whether ADB is working properly, connect your Android device to the computer using a USB cable and run the following command in the terminal window that opened “adb devices".

adb devices command
The command “adb devices” will list your device connected to the computer

You should see a device in the list. If your device is connected but nothing appears in the list, it means that you will need to install the appropriate drivers.

Your phone manufacturer may provide a downloadable driver package for your device. So go to their website and find the drivers for your device.

After installing your device drivers, connect your phone and try the adb devices command again. If all went well, you should see your device listed and you are ready to start using ADB!

Adding ADB to System PATH

The way the Android SDK and ADB are installed, you'll need to navigate to the ADB folder and open a command prompt there whenever you want to use it. However, if you add it to your Windows system PATH, this is not necessary — you can type “adb” at the command prompt to run commands whenever you want, no matter what folder you are in.

To do this, open any system folder. On the left, right-click "My computer" and select "Properties". From the left menu, choose “Advanced system properties”. There select the tab "Advanced" and click "Environment variables".

Windows environment variables screen
You need to access Windows Environment Variables to add the ADB path and make it easier to use

Now select the variable “PATH” and add to it the path of the folder where the SDK tools are located, in this case “C:\Program Files\Android\platform-tools”.

System "path" variable
Inside the “PATH” variable add the ADB path

Useful ADB commands Android

In addition to the variety of tricks that advanced Android users and developers can perform with ADB, the tool even offers some useful commands:

  • adb install C:\package.apk: Install the package located at C:\package.apk on your computer.
  • adb uninstall package.name: Uninstall the package with package.name from your device. For example, you would use the name com.rovio.angrybirds to uninstall the Angry Birds application.
  • push adb C:\file/sdcard/file: sends a file from your computer to your device. For example, the command here sends the file located at C:\file on your computer to /sdcard/file on your device.
  • adb pull /sdcard/file C:\file: pulls a file from your device to your computer - works like adb push but in reverse.
  • adb logcat: See the log of your Android device. It can be useful for debugging applications.
  • adb shell: provides an interactive Linux command line shell on your device.

What did you think of Android's ADB? Do you intend to use it? Share with us in the comments.


Discover more about Showmetech

Sign up to receive our latest news via email.

Related Posts