Mac OS X
adb setup
Android debugging
tech tutorials
software installation

How to install and set up adb on macOS

Codemia Knowledge Hub ·

The quickest way to install ADB (Android Debug Bridge) on a Mac is Homebrew: run brew install android-platform-tools, then check it with adb version.

You need:

  • A Mac running macOS.
  • A USB cable for your Android device.
  • Developer options and USB debugging enabled on the Android device.

Step 1: Install Homebrew

Homebrew is a package manager for macOS. If you do not have it, open Terminal and run:

bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Step 2: Install adb

bash
brew install android-platform-tools

This installs the platform tools, including adb. Verify the installation:

bash
adb version

It prints the installed adb version.

Step 3: Connect your Android device

Connect the device with a USB cable. If the device asks you to authorize USB debugging, tap "OK" to allow your Mac to debug it.

Step 4: Check that adb sees the device

bash
adb devices

This lists all connected devices. If yours is missing, check the USB cable, USB debugging and driver installation.

Step 5: Run adb commands

Install an app from your Mac on the connected device:

bash
adb install path_to_your_app.apk

Transfer files, run shell commands or read device logs:

  • To transfer files:
bash
  adb push local_file_path device_file_path
  adb pull device_file_path local_file_path
  • To execute shell commands:
bash
  adb shell <your_command>
  • To view logcat:
bash
  adb logcat
CommandDescription
adb versionDisplays the adb version installed on your Mac
adb devicesLists all connected devices
adb install <file.apk>Installs APK on the connected device
adb push/pull <file>Transfers files to/from the device
adb shell <command>Executes shell command on the connected device
adb logcatDisplays log data from the device

Updating adb

Keep adb current through Homebrew:

bash
  brew upgrade android-platform-tools

Connecting over Wi-Fi

  1. Connect the device over USB and confirm it shows up in adb devices.
  2. Set the device to listen on TCP/IP port 5555:
bash
     adb tcpip 5555
  1. Find the device IP address under Settings > About phone > Status.
  2. Connect to the device:
bash
     adb connect device_ip_address:5555

Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Basis Lab
No course covers this one yet

Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.

Build my course
Data Structures & Algorithms practice on Codemia

Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.

Practice algorithms