Advertisements

ADB stands for Android Debug Bridge that allows you to communicate with your Android devices right from your computer. You can issue commands from your computer to perform tasks on your device using ADB.

Before you can use ADB, you need to download, install, and configure it for it to work with your machine. In the following guide, you are going to learn how you can download, install, and configure ADB to work with your Mac.

adb-mac-featured

Here you go:

Downloading and Installing Platform Tools on Your Mac

The first thing you need to do is install the platform tools on your Mac. Platform tools are a part of the Android SDK package, and Google has made them available as a separate download so those of you needing these tools can obtain them without having to download the huge Android SDK.

To download the platform tools, head over to the Android Developers website and then click on the download link for platform tools for Mac. It downloads the Mac version of platform tools on your machine.

adb-mac-download

When the platform tools .zip has been downloaded, double-click on it to extract the files it contains. When extracted, open the folder that just got created, and you should see all the ADB tools in it. From adb.exe to fastboot.exe, you have all in there for you to use and issue commands to your device.

adb-mac-files

Now that you have these tools downloaded and installed on your Mac, you should be able to communicate with your devices using either ADB or Fastboot. However, to do that, you will have to make this folder as the current working directory in Terminal each time you wish to issue a command. Otherwise, Terminal throws an error saying it does not know what ADB is.

Setting Up Path Variables on Your Mac

To be able to issue ADB and Fastboot commands from anywhere using Terminal, you need to set up path variables on your Mac. Even Windows users need to do that to be able to issue ADB commands.

Here’s how to do that on your Mac:

Click on Launchpad in your Dock and search for and click on “Terminal.” It opens the Terminal app on your Mac.

adb-mac-terminal

When Terminal launches, you need to open the bash profile file using it. To do that, type in the following command into the Terminal window and hit Enter. The command opens the bash profile on your Mac.

touch ~/.bash_profile; open ~/.bash_profile

adb-mac-touch

As you can see, the bash profile has opened in the default text editor program on your Mac. Since it is a text file, it needs to open in a text editor, and that is where it has been opened.

Scroll all the way down in the bash profile and then at the end of the file add the following code:

export PATH=”$HOME/[ADB-FOLDER]/bin:$PATH”

adb-mac-edit

Make sure to replace “ADB-FOLDER” with the location of the ADB folder where the adb.exe and fastboot.exe files exist. It is the folder that was created when you extracted the platform tools archive.

Once you have added the above code to the file, save the file and then hit “Command + Q” to exit the text editor as you no longer need it.

You need to run the newly edited bash profile at least once. To do that, run the following command in Terminal and it will get that done for you.

source ~/.bash_profile

adb-mac-open

From now on, you can run ADB and Fastboot commands from anywhere using Terminal on your Mac. You do not have to be in the ADB folder to be able to run commands.

So, that was how you could download, install, and configure ADB to work with your Mac.

You might also be interested in:

Have something to say? You can contribute to this tech article by leaving a comment below.

Enter your email address:

Delivered by FeedBurner

Advertisements