How to Install and Use ADB and Fastboot on Windows, Linux, and macOS

Last update: 09/09/2025
Author Isaac
  • ADB and Fastboot allow debugging, installing apps and flash from PC with USB or Wi‑Fi connection.
  • Install the official Platform‑Tools and, on Windows, the drivers OEM; add adb to PATH.
  • Commandos key: devices, shell, push/pull, install/uninstall, reboot and fastboot flash.
  • Advanced features: wireless debugging, port forwarding, am/pm, screencap/record, and Burst Mode.

ADB Guide for Windows, Linux, and macOS

If you work with Android at a slightly more technical level, sooner or later you'll come across ADB (Android Debug Bridge) and Fastboot . These tools allow you to communicate between your phone and your computer to debug, install apps, flash partitions, uninstall bloatware, and much more without needing root access . In this guide, you'll learn how to install, configure, and use ADB on Windows, Linux , and macOS step by step, including advanced features like Wi-Fi debugging, port forwarding, and screen capture and recording.

Let's explain it clearly and directly: ADB is a client-server application with three components. First, the client on your computer that sends commands; second, an intermediary server that manages the connections; and finally, the adbd daemon that runs on the Android device. We'll also cover Fastboot for bootloader and flashing tasks. All with real commands, useful shortcuts, and tips to get you comfortable from the very beginning.

What is ADB and what is it for?

What is ADB and how does it work?

ADB, or Android Debug Bridge, is a command-line tool that connects your computer to an Android device via USB or TCP/IP. It's used to install and debug apps, run a Unix shell , transfer files, manage packages, take screenshots, record the screen, and automate workflows.

Its architecture is client-server : the client is invoked with the adb command; the server listens on port 5037 and orchestrates the connections; and on the phone, adbd runs as a background process. The server also detects emulators on odd-numbered ports in the range 5555–5585 and associates each instance with a serial number (for example, emulator-5554 ).

Beyond USB debugging, ADB supports wireless debugging on Android 11+ by pairing via QR code, and in earlier versions you can use the classic adb tcpip 5555 scheme after an initial wired connection.

Preparations: Developer options and USB debugging

Before running any commands, enable Developer Options on your phone: Settings > About phone > tap Build number 7-10 times. Then go to Developer options and enable USB debugging . When you connect your phone to your PC, accept the RSA key prompt to authorize debugging from that computer.

For an initial check, connect the device with a data cable and run `adb devices` . If everything is working correctly, you will see the serial number with the device status; if a notification appears on the screen , tap "Allow" and relist the devices.

Installing ADB and Fastboot on Windows

On Windows, the easiest way is to download the official Android SDK Platform-Tools package (which includes adb and fastboot). Extract the ZIP file to a simple location (for example, C:\Android\platform-tools). Remember that on Windows, you need the manufacturer's drivers for your computer to recognize your phone: you can get these from Android Developers or OEMs like OnePlus, Xiaomi, etc.

To open a console in the tools folder, navigate to that path and use Shift + right-click > “Open PowerShell window here” (or CMD ). From there, try `adb devices` with your phone connected and USB debugging enabled.

If you want to run adb from any folder, add platform-tools to your PATH : Control Panel > System > Advanced system settings > Environment Variables > edit "Path" and add the path to platform-tools. This allows you to type adb in any terminal without navigating to the folder.

  How can I delete YouTube videos on my iPhone?

Once the Platform-Tools are installed, you'll also have Fastboot . If your workflow includes unlocking the bootloader or flashing partitions, you'll be ready without any extra installations.

Installing ADB and Fastboot on macOS

On macOS, download the Android SDK Platform-Tools , extract the ZIP file, and create an "Android" folder in your user directory for organization. Alternatively, you can install ADB using Homebrew . macOS doesn't require additional mobile drivers , which greatly simplifies the process.

Open Terminal, navigate to the path where you extracted the tools (for example, cd ~/Desktop/Android/platform-tools ) and run ./adb devices . Alternatively, add platform-tools to your shell's PATH (bash/zsh) to invoke adb from any directory.

Installing ADB and Fastboot on Linux

On Linux, you can choose to install from repositories or download Google's Platform Tools. Most distributions don't require smartphone drivers, so it's plug and play.

Debian/Ubuntu/Linux Mint-based distributions: install with `sudo apt install android-tools-adb android-tools-fastboot` . On classic Debian, `sudo apt-get install` also works with the same packages.

Fedora and derivatives: install with `sudo dnf install android-tools` . On openSUSE, the equivalent is usually `sudo zypper install adb` or the metapackage `android-tools`.

Arch Linux: use `sudo pacman -S android-tools` . In other families, there are also packages: `sudo emerge -a dev-util/android-tools` in Gentoo or `sudo apk add adb` in Alpine.

If you prefer the latest official version, download the Platform-Tools ZIP file, extract it, and run ./adb version to check the version; you can place the folder wherever you like and add it to the shell's PATH in ~/.bashrc or ~/.zshrc.

Getting Started with ADB: Basic Checks and Uses

Connect your mobile device via USB, enable USB debugging, and run `adb devices` to list devices. Add `-l` to see details such as product, model, and transport_id, which is useful when working with multiple devices or emulators simultaneously.

Main everyday ADB commands: adb shell to open a shell on the device; adb push file path to send files to the phone; adb pull path to bring them to the computer; adb install file.apk and adb uninstall package to install and uninstall apps.

Quick status management: `adb reboot` restarts Android; `adb reboot-bootloader` enters fastboot mode; `adb reboot recovery` boots into recovery. If something gets stuck, restart the server with `adb kill-server` and repeat.

When you have more than one device connected, specify the destination with the `adb -s SERIAL` command , or use `-e` to send to the single emulator or `-d` for the single physical device. You can also define the `ANDROID_SERIAL` variable in your environment.

Fastboot: Installation and Key Commands

Fastboot is included in Google's Platform Tools . On Linux, it's also available in the android-tools repositories. It's the tool used to interact with the bootloader and flash partitions.

Essential commands: fastboot devices to verify connection in bootloader mode; fastboot oem unlock (or fastboot flashing unlock on many models) to unlock the bootloader —this may erase all your data , back it up and see how to format a phone from a PC—.

Regular flashing: `fastboot flash recovery recovery.img` to install a custom recovery; `fastboot flash boot boot.img` for the kernel/ramdisk; `fastboot flash system system.img` for the system; and `fastboot flashall` to flash all .img files present in the tools folder.

Remove bloatware without root with ADB

ADB allows you to uninstall apps from the current user without root access, ideal for removing bloatware . The typical workflow is to locate the package name and uninstall it for user 0.

  Methods to Change OFF S Mode in Home windows 11

Procedure: Open a shell with `adb shell` , then list packages with `pm list packages | grep "word"` to find the package name . Finally, run `pm uninstall -k --user 0 package.name` . For example, for Google Maps: `pm uninstall -k --user 0 com.google.android.apps.maps .`

Installing and managing apps, files, and ports

To install an APK: run `adb install path/to.apk` ; for test APKs add `-t` . If your app is distributed in multiple APKs (splits), use `adb install-multiple` providing all the files.

Copying content: `adb push local remote` uploads files or folders to the phone; `adb pull remote local` does the opposite. A quick example would be `adb push myfile.txt /sdcard/myfile.txt` to place it on internal storage.

Port forwarding: With `adb forward` you forward traffic from the host to the device. For example, `adb forward tcp:6100 tcp:7100` or to an internal endpoint such as `adb forward tcp:6100 local:logd` to dump data to the system log.

Device selection: If multiple devices are available, ADB will ask you to specify the destination . Use -s with the serial number exactly as it appears in adb devices -l.

Wireless debugging (Android 11+) and TCP/IP connection

With Android 11 and later, you can use wireless Wi-Fi debugging . Requirements: device and computer on the same network, updated Platform Tools, and, if using an IDE, the latest version of Android Studio.

Pairing from Android Studio: Enable Wireless Debugging on your phone, open "Pair Devices Using Wi-Fi" in the IDE, and choose QR or pairing code . After pairing, the device will appear ready for deployment and debugging.

Pairing via command line: Enable Wireless Debugging on the mobile device, find out the IP:port and pairing code, go to platform-tools on the computer and run adb pair ip:port , enter the code, and then adb connect ip:port if necessary.

Android 10 and earlier: Connect via USB, run `adb tcpip 5555` , disconnect the cable, locate the phone's IP address, and use `adb connect IP:5555` . Verify with `adb devices` that the status is "device".

Troubleshooting: Some corporate networks block P2P , in which case use a wired connection or a different network. If the device stops being discovered when switching Wi-Fi networks, pair it again. If your network doesn't support mDNS, connect manually using `adb connect ip:port`.

Shell, Activity Manager (am) and Package Manager (pm)

The `adb shell` command puts you in the device's command-line environment; see the `shell` command for Android if you need a reference. Android Platform Tools 23+ handles arguments like SSH , so if you're sending metacharacters or quotes , remember that you might need double quotes for them to reach the remote shell correctly.

Activity Manager ( am ): allows you to start activities , send broadcasts, force stops, profile, modify screen size and density, etc. Typical examples: adb shell am start -a android.intent.action.VIEW or adjust screen with am display-size 1280×800 and am display-density 480.

When launching am start you can use options such as -D (debug), -W (wait for startup), -start-profiler, -S (force stop before opening), -user to choose user, and build intents with -a action, -d data, -t mime, -n component and extras (for example, -e key value or -ez for booleans).

Package Manager ( pm ): lists and manages packages. Common commands: pm list packages with filters (-f, -d, -e, -s, -3, -user), pm path package to see the path to the APK, pm clear package to clear data, pm enable/disable to enable/disable components, and pm grant/revoke for runtime permissions.

Policy Management (DPM), Screenshots, and Screen Recording

For enterprise testing, dpm allows you to activate profile/device administrators and owners: `adb shell dpm set-active-admin component` or `set-device-owner` . You can also force network and security logs on Android 9+ with `force-network-logs` and `force-security-logs`.

Screenshot: Use `adb shell screencap /sdcard/screen.png` to capture the image and then pull it using `adb pull /sdcard/screen.png` . It's fast and doesn't require third-party apps.

  Microsoft Vulnerable Driver Blocklist: Complete Guide

Screen recording: Use `adb shell screenrecord /sdcard/demo.mp4` . Useful options: `--size widthXheight` , `--bit-rate` in bps (e.g., 6000000 for ~6 Mbps), `--time-limit` in seconds, `--rotate` , and `--verbose` . Remember that it doesn't capture audio, and the default maximum recording time is 3 minutes.

If you need a clean testing environment, enable `adb shell cmd testharness enable` : the device resets while retaining the RSA key for debugging, disables screen lock and initial wizards, and adjusts options to facilitate automation.

Advanced queries, SQLite, USB/mDNS backends, and Burst Mode

To inspect databases on emulators or systems with root access, you can use sqlite3 from the shell: commands like .schema or .dump help you review table structures and contents.

USB backends: The server can use the OS's native backend or libusb . Some functions (attach/detach, USB speed) are only available in libusb. Control the backend with ADB_LIBUSB=1/0 ; from ADB 34 onwards, libusb is the default except on Windows, where the native backend is used.

mDNS backends: ADB discovers devices using Bonjour or Openscreen . On macOS, Apple's daemon is always active; on Windows/Linux, you might need mdnsd. You can toggle with ADB_MDNS_OPENSCREEN=1/0 if you need to disable the daemon.

Burst Mode (ADB ≥ 36.0.0): An experimental mode that greatly improves transfer performance and reduces latency during debugging. Enable it with ADB_DELAYED_ACK=1 or from Android Studio in the debugger settings.

Practical tips and typical scenarios

If `adb devices` doesn't show your emulator under certain conditions (for example, if you started the emulator with specific ports and the server wasn't active), either start the server first with `adb start-server` or let the emulator choose ports automatically.

When automating, remember that you can chain scripts with adb for test flows, and that `adb --help` lists all available options in case you need a quick overview from the terminal.

On Windows, when something isn't working, it's almost always fixed with the correct OEM drivers , a different USB port, a quality data cable, or restarting the server with `adb kill-server` . On Linux/macOS, check permissions and run `udev` if the system doesn't detect the device.

For convenience, add platform-tools to your system's PATH: on Windows using Environment Variables; on Linux/macOS by exporting the path in your .bashrc or .zshrc file. This will save you from having to navigate to the tools folder every time.

Mastering ADB and Fastboot unlocks fine-grained control of Android: from installing and debugging apps to flashing partitions, automating tasks , working over Wi-Fi, or capturing the screen without third-party applications. With up-to-date Platform Tools, the right drivers, and key AM/PM commands at your fingertips, you'll be ready to tackle both everyday tasks and advanced scenarios with ease.

Related articles:
Easy methods to format or reset an Android mobile from the PC quickly and easily – How To