To setup Android Debug Bridge on you Mac, you have to know the ADB properly. There are some reasons to setup the ADB on your Mac.
Type in your Mac OS X account password and hit the Enter key. Now it will execute the scripts & install the ADB & Fastboot binaries as well as the drivers. After the installation is finished it will wish you a 'Nice day', that's it now you can run & use ADB and Fastboot on your Mac OS X as shown below –. Go to settings in your Android Phone. Scroll down you will find About Phone at the bottom of the list (in the Google's latest Android Oreo version it is hidden behind System option) Tap the Build Number option 7 times to enable Developer Mode. A toast will appear once it's done. Go back to the main.
What is ADB?
ADB defines Android Debug Bridge. It is a versatile tool that helps you to manage the state of Android powered device. It is two different applications. One application for your pone and another is for your Mac or Linux. After connecting your phone with the Mac, you can command and communicate with the phone by using your Mac. It will appear on your screen and keyboard.
During the command and communication things can be run directly when it use some terminal emulator. It seems difficult to execute the complex commands. It's a bridge between your Mac and your machine.
The ADB is used for Android development. It has three components: A server, a daemon and a client. Mostly it is used on actual Android device to manage either emulator. ADB is the Android development machine that is the basic requirement of the development. The client component of the ADB runs through the development machine. Also The ADB daemon runs as background process in the device itself.
Why do you want to setup ADB?
ADB is wonder tool for the Android users. It is Terminal based interface to interact with the Android phone system. We setup the ADB for following reasons.
- The first and foremost criteria to setup the ADB is to facilitate interaction between both AVB emulators, develop system and physical Android device. It is for the purpose of debugging and running applications.
- By the ADB command line tools various tasks may be performed. ADB components are used for the Android development through your Mac.
- It consists of a daemon background process running AVDs, server process running in the background and physical Android device such as tablets and phones.
How to setup Android ADB on Mac.
Let's have a look to see the procedure of installing the full process of setting ADB on Mac. Follow the instructions with screen shoots.
Step 1: Installing the Android SDK
Before starting the download, create a new directory that you can easily find on your make. Always check the available latest versions before installing the Android SDK. For your Mac you will get the SDK package as zip format. Download the zip package and extracted the package. You will see the folder like android-sdk-macosx. Enter and navigate the folder: sdk-macosx/tools/.
To execute the SDK manager, jus double click on the on the 'android'. Stay everything un-ticked.
Step 2: Downloading the SDK Platform Tools
Now you have to download and install the SDK Platform Tools. Firstly select the SDK Platform-tools and install it. Then next window will appear, accept the license regulation and Install the tools. After completing the installation, close the window. This way SDK manager downloads the SDK Platform tools successfully. It is necessary for ADB. Define the path where ADB is located.
Open the directory android that you made it in the first step. Click on the /sdk/platform-tools and copy the adb file. In the root of the original android directory, paste the adb. Almost you are done. You need to check the process.
After the setting you have to connect your android device with your Mac. Before that you have to enable the Android Debugging on your device. Through the Developer options it will be done . It is hidden setting. When you press Build number 7 times during Settings > About Phone on your device, it will be activated.
- Open the Terminal and type cd in the path of original android directory that you made in the first step.
- cd ~/Desktop/android
- click Return
- Again Type ./adb devices & press Return
- Check your Android device, there might ask you to Allow USB Debugging from your Mac. If there any messages like that, just allow.
- You will see that your device is enlisted as an attached device.
- You may need to type. /adb devices again. Then you will see that you device is an authorized device.
There will appear a message in Terminal saying
* daemon not running starting it now on port 5037 *
* daemon started successfully *.
Don't worry; just continue the following process in the setup.
If you did the following steps then it everything went as expected. ADB is installed and function also ready to start. Using the Terminal you can add a path and you don't need to add./ and cd in the android directory to every command.
- Open terminal
- Write nano ~/.bash_profile
- Click Return.
There should be a terminal window that is like the one above. Into the terminal window, copy the export PATH command just below your Terminal window exchanging /Users/ /Desktop/android with the right path to the original android directory that you have created in the first step.
export PATH=${PATH}:/Users/ /Desktop/android
- Click on Return
- Click on CTRL+X
- Click on Y to confirm
- Click on Return
- Close Terminal
Now you have to confirm about the installation. Type adb devices into the Terminal and you will see you device enlisted under attached devices without having to change directories. Before trying to the last step of adb devices, don't forget to add close terminal. It may create problem to setup. Now you have completed the total procedure of the ADB setup. If you face problem, just try again it on you Mac OS.
How to Use ADB
Setting should be done though above the procedure. Whatever you like to your phone you can simply use ADB to manipulate your phone. Check the command of your ADB on your Android device. Press 'adb device' and hit enter. You may see the serial number on the screen. If you failed to installed the ADB or failed to use the ADB. Just go through the instructions again. It is the right way to setup the Android Debug Bridge on your Mac.
Question or issue on macOS:
I had issues finding a good solid tutorial on how to setup ADB for Mac.
How can I add ADB to macOS in such a way that it can be used in the terminal?
UPDATE
For those reading this post. Yes, as the edited response says. I was at the time looking for a tutorial with all steps as a beginner level guide.
Unlike Set up adb on Mac OS X, the intention of this question is to have a tutorial with all of the required installation steps to get ADB on macOS.
How to solve this problem?
Solution no. 1:
Option 1 – Using Homebrew
This is the easiest way and will provide automatic updates.
Install homebrew
Install adb
Start using adb
Option 2 – Manually (just the platform tools)
This is the easiest way to get a manual installation of ADB and Fastboot.
Delete your old installation (optional)
Navigate to https://developer.android.com/studio/releases/platform-tools.html and click on the
SDK Platform-Tools for Mac
link.Go to your Downloads folder
Unzip the tools you downloaded
Move them somewhere you won't accidentally delete them
Add
platform-tools
to your pathRefresh your bash profile (or restart your terminal app)
Start using adb
Option 3 – Manually (with SDK Manager)
Adb Shell Mac
Delete your old installation (optional)
Download the Mac SDK Tools from the Android developer site under 'Get just the command line tools'. Make sure you save them to your Downloads folder.
Go to your Downloads folder
Unzip the tools you downloaded
Move them somewhere you won't accidentally delete them
Run the SDK Manager
Uncheck everything but
Android SDK Platform-tools
(optional)
Type in your Mac OS X account password and hit the Enter key. Now it will execute the scripts & install the ADB & Fastboot binaries as well as the drivers. After the installation is finished it will wish you a 'Nice day', that's it now you can run & use ADB and Fastboot on your Mac OS X as shown below –. Go to settings in your Android Phone. Scroll down you will find About Phone at the bottom of the list (in the Google's latest Android Oreo version it is hidden behind System option) Tap the Build Number option 7 times to enable Developer Mode. A toast will appear once it's done. Go back to the main.
What is ADB?
ADB defines Android Debug Bridge. It is a versatile tool that helps you to manage the state of Android powered device. It is two different applications. One application for your pone and another is for your Mac or Linux. After connecting your phone with the Mac, you can command and communicate with the phone by using your Mac. It will appear on your screen and keyboard.
During the command and communication things can be run directly when it use some terminal emulator. It seems difficult to execute the complex commands. It's a bridge between your Mac and your machine.
The ADB is used for Android development. It has three components: A server, a daemon and a client. Mostly it is used on actual Android device to manage either emulator. ADB is the Android development machine that is the basic requirement of the development. The client component of the ADB runs through the development machine. Also The ADB daemon runs as background process in the device itself.
Why do you want to setup ADB?
ADB is wonder tool for the Android users. It is Terminal based interface to interact with the Android phone system. We setup the ADB for following reasons.
- The first and foremost criteria to setup the ADB is to facilitate interaction between both AVB emulators, develop system and physical Android device. It is for the purpose of debugging and running applications.
- By the ADB command line tools various tasks may be performed. ADB components are used for the Android development through your Mac.
- It consists of a daemon background process running AVDs, server process running in the background and physical Android device such as tablets and phones.
How to setup Android ADB on Mac.
Let's have a look to see the procedure of installing the full process of setting ADB on Mac. Follow the instructions with screen shoots.
Step 1: Installing the Android SDK
Before starting the download, create a new directory that you can easily find on your make. Always check the available latest versions before installing the Android SDK. For your Mac you will get the SDK package as zip format. Download the zip package and extracted the package. You will see the folder like android-sdk-macosx. Enter and navigate the folder: sdk-macosx/tools/.
To execute the SDK manager, jus double click on the on the 'android'. Stay everything un-ticked.
Step 2: Downloading the SDK Platform Tools
Now you have to download and install the SDK Platform Tools. Firstly select the SDK Platform-tools and install it. Then next window will appear, accept the license regulation and Install the tools. After completing the installation, close the window. This way SDK manager downloads the SDK Platform tools successfully. It is necessary for ADB. Define the path where ADB is located.
Open the directory android that you made it in the first step. Click on the /sdk/platform-tools and copy the adb file. In the root of the original android directory, paste the adb. Almost you are done. You need to check the process.
After the setting you have to connect your android device with your Mac. Before that you have to enable the Android Debugging on your device. Through the Developer options it will be done . It is hidden setting. When you press Build number 7 times during Settings > About Phone on your device, it will be activated.
- Open the Terminal and type cd in the path of original android directory that you made in the first step.
- cd ~/Desktop/android
- click Return
- Again Type ./adb devices & press Return
- Check your Android device, there might ask you to Allow USB Debugging from your Mac. If there any messages like that, just allow.
- You will see that your device is enlisted as an attached device.
- You may need to type. /adb devices again. Then you will see that you device is an authorized device.
There will appear a message in Terminal saying
* daemon not running starting it now on port 5037 *
* daemon started successfully *.
Don't worry; just continue the following process in the setup.
If you did the following steps then it everything went as expected. ADB is installed and function also ready to start. Using the Terminal you can add a path and you don't need to add./ and cd in the android directory to every command.
- Open terminal
- Write nano ~/.bash_profile
- Click Return.
There should be a terminal window that is like the one above. Into the terminal window, copy the export PATH command just below your Terminal window exchanging /Users/ /Desktop/android with the right path to the original android directory that you have created in the first step.
export PATH=${PATH}:/Users/ /Desktop/android
- Click on Return
- Click on CTRL+X
- Click on Y to confirm
- Click on Return
- Close Terminal
Now you have to confirm about the installation. Type adb devices into the Terminal and you will see you device enlisted under attached devices without having to change directories. Before trying to the last step of adb devices, don't forget to add close terminal. It may create problem to setup. Now you have completed the total procedure of the ADB setup. If you face problem, just try again it on you Mac OS.
How to Use ADB
Setting should be done though above the procedure. Whatever you like to your phone you can simply use ADB to manipulate your phone. Check the command of your ADB on your Android device. Press 'adb device' and hit enter. You may see the serial number on the screen. If you failed to installed the ADB or failed to use the ADB. Just go through the instructions again. It is the right way to setup the Android Debug Bridge on your Mac.
Question or issue on macOS:
I had issues finding a good solid tutorial on how to setup ADB for Mac.
How can I add ADB to macOS in such a way that it can be used in the terminal?
UPDATE
For those reading this post. Yes, as the edited response says. I was at the time looking for a tutorial with all steps as a beginner level guide.
Unlike Set up adb on Mac OS X, the intention of this question is to have a tutorial with all of the required installation steps to get ADB on macOS.
How to solve this problem?
Solution no. 1:
Option 1 – Using Homebrew
This is the easiest way and will provide automatic updates.
Install homebrew
Install adb
Start using adb
Option 2 – Manually (just the platform tools)
This is the easiest way to get a manual installation of ADB and Fastboot.
Delete your old installation (optional)
Navigate to https://developer.android.com/studio/releases/platform-tools.html and click on the
SDK Platform-Tools for Mac
link.Go to your Downloads folder
Unzip the tools you downloaded
Move them somewhere you won't accidentally delete them
Add
platform-tools
to your pathRefresh your bash profile (or restart your terminal app)
Start using adb
Option 3 – Manually (with SDK Manager)
Adb Shell Mac
Delete your old installation (optional)
Download the Mac SDK Tools from the Android developer site under 'Get just the command line tools'. Make sure you save them to your Downloads folder.
Go to your Downloads folder
Unzip the tools you downloaded
Move them somewhere you won't accidentally delete them
Run the SDK Manager
Uncheck everything but
Android SDK Platform-tools
(optional)
- Click
Install Packages
, accept licenses, clickInstall
. Close the SDK Manager window.
Add
platform-tools
to your pathRefresh your bash profile (or restart your terminal app)
Start using adb
Solution no. 2:
If you've already installed Android Studio —
Add the following lines to the end of ~/.bashrc
or ~/.zshrc
(if using Oh My ZSH):
Restart Terminal and you're good to go. 👍
Solution no. 3:
Option 3 – Using MacPorts
Analoguously to the two options (homebrew / manual) posted by @brismuth, here's the MacPorts way:
Install the Android SDK:
Run the SDK manager:
As @brismuth suggested, uncheck everything but
Android SDK Platform-tools
(optional)Install the packages, accepting licenses. Close the SDK Manager.
Add
platform-tools
to your path; in MacPorts, they're in/opt/local/share/java/android-sdk-macosx/platform-tools
. E.g., for bash:Refresh your bash profile (or restart your terminal/shell):
Start using adb:
Solution no. 4:
Adb Zip For Mac Os 10.13
Note that if you use Android Studio and download through its SDK Manager, the SDK is downloaded to ~/Library/Android/sdk
by default, not ~/.android-sdk-macosx
.
I would rather add this as a comment to @brismuth's excellent answer, but it seems I don't have enough reputation points yet.
Solution no. 5:
You must download Android SDK from this link.
You can really put it anywhere, but the best place at least for me was right in the YOUR USERNAME folder root.
Then you need to set the path by copying the below text, but edit your username into the path, copy the text into Terminal by hitting command+spacebar type terminal.
export PATH = ${PATH}:/Users/**YOURUSERNAME**/android-sdk/platform-tools/
Verify ADB works by hitting command+spacebar and type terminal, and type ADB.
Adb Zip For Mac Os 10.8
There you go. You have ADB setup on MAC OS X. It works on latest MAC OS X 10.10.3.