ADB Setup
How to install Android Debug Bridge (ADB)
This section includes condensed install instructions to help developers get started. The latest information about ADB can be found on Android's Developer Website.
Check for Existing ADB Installations
Open your command line program and run adb devices
. If it returns List of devices attached
, adb is already installed and no additional steps are needed. Otherwise, go to the section that lists your operating system.
Windows
If you do not have Android Studio installed, you can download the required tools from the Android Development Website:
- Download the Android SDK Platform Tools .zip file for Windows.
- Extract the contents of this .zip file into an easily accessible folder, such as
C:\platform-tools
After you install Android Studio or the platform tools .zip file, add the path to the Platform Tools directory in your environment variables so that the adb
command can be run from anywhere.
- Go to Start > Control Panel > System > Advanced System Settings > Environment Variables.
- Select the
Path
variable in the User Variables section, then select Edit. - In the Edit environment variables window, select New.
- For Android Studio add the following path to the environment variables:
%USERPROFILE%\AppData\Local\Android\sdk\platform-tools
- If you are using the platform tools zip, add the path to environment variables that points to the directory that contains the zips extracted files.
C:\platform-tools
- Close all of the command line windows (if any are open).
- Reopen
cmd
and typeadb devices
. It should respond withList of devices attached
. If it does not, restart your PC.
MacOS
Option 1: Using Homebrew
- Open the terminal and run:
brew install --cask android-platform-tools
- Run
adb devices
and verify that adb is a recognized command.
Option 2: Using Android Studio
If you've already installed Android Studio, add the SDK tools to your system path by doing the following:
If you are using zsh then replace .bash_profile
with .zshrc
- Open terminal and run:
touch ~/.bash_profile
- Then run:
open ~/.bash_profile
- Then add the following:
export ANDROID_SDK_ROOT=/Users/$USER/Library/Android/sdk
export PATH=${PATH}:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools
- Refresh your bash profile (or restart your terminal app):
source ~/.bash_profile
- Run
adb devices
and verify that adb is a recognized command.
Linux
On linux you can install the Android Tools using apt by running the following command:
sudo apt install android-tools-adb