The Easiest Way to Install Android ADB and Fastboot Tools on Any OS
If you’ve ever tried to root your Android phone or flash a ROM , you may have heard of ADB and / or fastboot. These two tools are surprisingly powerful, but can be overwhelming to install. Here’s the easiest way to do it.
Update: Google recently released ADB and fastboot as a separate download . Now you don’t need to download a huge developer kit to modify your phone! We’ve updated our guide below to reflect the changes and use official Google downloads instead of third-party services.
What are ADB and Fastboot?
These two tools allow you to send terminal commands to your phone from your computer via USB. They both perform different functions, but they can be relatively easy to install at the same time, so it is useful to have both. Here’s a (very) short description of what these tools do:
- Android Debug Bridge (ADB): This tool allows you to send a wide variety of terminal commands, including but not limited to basic Linux shell commands , as well as some special developer commands, to your phone at almost any time (if you have debugging enabled on your phone ). You can send commands when the phone is on and booted up, or even when it is in recovery mode. While ADB is often used in conjunction with rooting or changing your phone, you can also use ADB to send terminal commands to non-rooted devices.
- Fastboot: When you need to change your phone’s firmware, fastboot is what you need. This allows you to send commands to the bootloader, which means you can flash / modify things like custom recoveries. You cannot flash entire ROMs with it, but it is useful for many things that ADB cannot do. Fastboot is not enabled for all phones, so you might have to check your specific device.
Both of these tools come with the Android SDK, however this is a very large download and honestly not needed by most users interested in ADB and fastboot. Luckily, Google recently made it easy to get these two without all the garbage.
Step 1. Download the platform tools package
Google collectively refers to ADB, fastboot, and several other utilities as the Platform Tools package. You can download the Platform Tools package from the SDK website here . There are separate packages for Windows, Mac and Linux, so download the version that’s right for your platform.
After downloading the Platform Tools package, extract the contents of the .zip file to a folder you can find later (for example, “C: \ Android \ platform-tools”). You don’t actually need to install ADB and fastboot to use them, but you can take an extra step to make them more convenient for you.
By default, you will either need to go to the folder where you extracted the Platform Tools package and run any ADB or fastboot command from there, or write down the full path where ADB is located every time you want to run the command. For example, this is a simple command to see what devices are connected to your system:
adb devices
However, if your command line is not open to the location where you extracted the platform tools, you will have to enter something like this:
c:\Android\platform-tools\adb.exe devices
It’s a pain to go through every time you want to customize something on your phone. To fix this, we can change the so called PATH variable so that you can run ADB and fastboot commands no matter what folder you are in.
Step 2: edit the PATH variable
The PATH variable is the master list of where to look for command line tools. By default, your computer already knows where to find some really useful tools . Here we will add ADB and fastboot to this list to make them easier to use in the future. You will need to know where you extracted the Platform Tools package in the last step, so keep the location of that folder handy.
Window
These steps may differ slightly depending on which version of Windows you are using. To add ADB to your PATH variable, follow these steps:
- Open the start menu and look for “advanced system settings”.
- Click View Advanced System Settings.
- Click the box that says Environment Variables.
- In the System Variables section, click the variable named Path.
- Click “Change …”
- (Windows 7.8): Add
;[FOLDERNAME]
to the end of the Variable Value field, replacing [FOLDER NAME] with the path to the folder;[FOLDERNAME]
platform tools were extracted. Remember to put a semicolon at the beginning so Windows knows that you are adding a new folder. - (Windows 10): Click New and paste the path to the folder where you extracted the platform tools. Press Enter and click OK.
Now whenever you want to use ADB or fastboot, just open Command Prompt from the start menu and enter your commands.
MacOS / Linux
Editing PATH files for macOS and Linux is a little more difficult than editing for Windows. However, if you’re comfortable with the command line, it’s still pretty straightforward . This method will automatically add ADB and fastboot location to your PATH every time you login to your system:
- Open a Terminal window by going to Applications / Utilities or by searching in Spotlight.
- Enter the following command to open your Bash profile:
touch ~/.bash_profile; open ~/.bash_profile
- Bash_profile file should open in your text program by default.
- Add this line to the end of the file: export PATH = ”$ HOME / [FOLDERNAME] / bin: $ PATH”, replacing [FOLDERNAME] with the location you extracted ADB and fastboot from.
- Save the file and press Cmd + Q to close the text editor.
- In your terminal, enter
source ~/.bash_profile
to launch your Bash profile for the first time.
From now on, every time you open a terminal window, you can run ADB and fastboot commands wherever you are.