How-to

How to set up ADB on Windows, Mac and Linux

Download Google's platform-tools, turn on USB debugging, run your first adb devices, fix driver problems, and connect over Wi-Fi on Android 11 and later.

By
MySystemApp editors
Checked
25 October 2026
Read time
5 min

ADB, the Android Debug Bridge, lets a computer send commands to your phone over a USB cable or Wi-Fi. It is how you disable or remove preinstalled apps that Settings will not touch, without rooting the phone. Setup takes about ten minutes the first time.

What is ADB and do I need it?

ADB is a small command-line program from Google. You type a command on the computer, and the phone runs it with more rights than a normal app but far fewer than root. For removing preinstalled apps, it can do what the Disable button can do, plus the apps the button refuses.

You do not need ADB to disable most apps; Settings does that. You need it when the Disable button is missing, when you want to remove many apps in one go, or when you want a list of every package on the phone. Our guide to disabling system apps without root covers the Settings route first.

What do I need before I start?

  • A Windows, Mac or Linux computer where you can unzip files and open a terminal.
  • A USB cable that carries data, not just power. The cable that came with the phone is the safest bet.
  • A few tens of megabytes of free disk space.
  • For wireless setup: a phone on Android 11 or later on the same Wi-Fi network as the computer.

How do I download platform-tools?

Get ADB only from Google. Open the SDK Platform Tools page on developer.android.com and download the zip for your system: Windows, Mac or Linux. Accept the terms and save the file.

Unzip it somewhere easy to type. We use C:\platform-tools on Windows and a platform-tools folder in your home folder on Mac and Linux. There is nothing to install: the adb program sits inside that folder.

Avoid "ADB installer" bundles from third-party sites. They are often old, and you cannot be sure what else they contain.

How do I turn on USB debugging?

USB debugging lives in Developer options, a hidden menu.

  1. Open Settings > About phone and find Build number. Tap it seven times. You may need to enter your PIN.
    • Samsung: Settings > About phone > Software information > Build number.
    • Xiaomi: Settings > About phone, then tap OS version (or MIUI version) seven times.
    • OnePlus: Settings > About device > Version > Build number.
  2. Go back to Settings. Developer options now appears under System (Pixel, Motorola, OnePlus), at the bottom of Settings (Samsung), or under Additional settings (Xiaomi).
  3. Open it and turn on USB debugging.

On Xiaomi phones there is a second switch, USB debugging (Security settings). Plain USB debugging is enough to disable and remove apps; the second switch is only needed for some install and permission commands.

How do I run my first adb devices?

Plug the phone into the computer and unlock it. Then open a terminal in the platform-tools folder.

On Windows, open PowerShell and run:

cd C:\platform-tools
.\adb devices

On Mac or Linux, open Terminal and run:

cd ~/platform-tools
./adb devices

The phone shows "Allow USB debugging?" with the computer's key fingerprint. Tick Always allow from this computer and tap Allow. Run the command again. You should see your phone's serial number followed by the word device:

# List of devices attached
# R58N12ABCDE    device

If it says unauthorized, the prompt was missed or dismissed: unlock the phone, unplug and replug the cable, and accept the prompt. If it says offline, restart ADB with the two commands below and try again.

adb kill-server
adb devices

From here, the other guides use adb on its own. On Windows type .\adb, and on Mac or Linux ./adb, unless you add the folder to your PATH.

What if Windows doesn't see my phone?

If adb devices shows an empty list on Windows:

  1. Swap the cable and try another USB port, ideally one on the computer itself rather than a hub.
  2. Pull down the notification shade on the phone, tap the USB notification, and choose File transfer. Some phones only expose the debugging interface in that mode.
  3. Install a driver. Pixel phones use the Google USB Driver. Samsung, Motorola, OnePlus, Xiaomi and others publish their own; the Install OEM USB drivers page on developer.android.com links to each maker's download. Windows Update often installs one automatically, but not always.
  4. Open Device Manager. If the phone appears with a warning icon, right-click it, choose Update driver, and point it at the driver you downloaded.
  5. In Developer options on the phone, tap Revoke USB debugging authorizations, then reconnect and accept the prompt again.

What changes on macOS and Linux?

macOS needs no driver. If the phone does not appear, check the cable and the File transfer mode. To run adb from any folder, add the platform-tools folder to your PATH:

echo 'export PATH="$HOME/platform-tools:$PATH"' >> ~/.zshrc
source ~/.zshrc

On Linux, your account needs permission to talk to USB devices. On Ubuntu and Debian, Google's instructions add you to the plugdev group and install a package with the device rules:

sudo usermod -aG plugdev $LOGNAME
sudo apt-get install android-sdk-platform-tools-common

Log out and back in, then run ./adb devices again.

How do I use Wireless debugging on Android 11 and later?

Android 11 added Wireless debugging, which needs no cable at all. Your phone and computer must be on the same Wi-Fi network.

  1. In Developer options, open Wireless debugging and turn it on. Allow it on this network.
  2. Tap Pair device with pairing code. The phone shows an IP address, a port and a six-digit code.
  3. On the computer, run the pair command with that address and port, then type the code when asked.
adb pair 192.168.1.20:37099
  1. Run adb devices. If the phone is not listed, look at the main Wireless debugging screen for "IP address & Port" (a different port from the pairing one) and connect to it:
adb connect 192.168.1.20:41235

Once paired, the computer reconnects on that network without a new code. To remove the pairing, open Wireless debugging > Paired devices and tap Forget.

How do I turn it off when I'm done?

When you finish, open Developer options and turn off USB debugging and Wireless debugging. You can switch Developer options off entirely with the switch at the top of that screen. Your changes to apps stay in place.

Next step: uninstall or disable system apps with ADB.

Which packages this touches

Do not remove: com.android.settings

Questions people ask

Do I need Android Studio to use ADB?

No. Google publishes ADB on its own in the SDK Platform Tools download, a small zip file that needs no installer.

Is turning on USB debugging safe?

It is safe while you use it, because a computer can only send commands after you approve it on the unlocked phone. Turn it off when you finish so a lost phone cannot be accessed over USB.

Does ADB void my warranty or root my phone?

No. ADB uses a mode Android provides for developers. It leaves the bootloader and the system partition exactly as they were.

Sources

  1. Android Developers: SDK Platform Tools release notes (downloads)Developer documentation
  2. Android Developers: Android Debug Bridge (adb)Developer documentation
  3. Android Developers: Configure on-device developer optionsDeveloper documentation
  4. Android Developers: Run apps on a hardware deviceDeveloper documentation
  5. Android Developers: Install OEM USB driversDeveloper documentation
  6. Android Developers: Get the Google USB DriverDeveloper documentation

Each source answered when this page was checked on 25 October 2026.

Written and checked by the MySystemApp editors. Something wrong or out of date? Request a correction.