How to install and use adb
Summary
Learn how to install adb on Linux, macOS, and Windows, and how to enable Developer options to use adb commands for Android debugging and file access.
Introduction #
The Android Debug Bridge (adb) is a command-line tool that allows your computer to communicate directly with Android devices. It is part of the Android Software Development Kit (SDK) and is used for debugging, file transfers, and managing applications.
This guide explains how to install adb on different operating systems and how to enable Developer options to use adb with your Android device.
Installing adb #
Install adb on Linux #
Most Linux distributions include adb in their repositories or support manual installation via Platform Tools.
Debian and Ubuntu-based distributions
sudo apt update sudo apt install android-tools-adbFedora, CentOS, or RHEL-based distributions
sudo dnf install android-toolsArch Linux and Manjaro
sudo pacman -S android-toolsManual installation You can also download the SDK Platform Tools ZIP for Linux and extract it manually. Place the extracted directory in
/opt/or/usr/local/and update your PATH variable.After installation, test with
adb version.If the device is connected and USB debugging is enabled, running
adb deviceswill list the connected Android device.
Install adb on macOS #
macOS users can install adb through Homebrew or by downloading the official SDK tools.
Using Homebrew Install adb with:
brew install android-platform-toolsVerify the installation:
adb versionManual installation Download the official Platform Tools ZIP for macOS from the Android SDK Platform Tools page. Extract it and move the folder to a directory such as
/usr/local/bin/or any preferred location in your PATH.
Install adb on Windows #
You can install adb on Windows using the official Android SDK Platform Tools or a package manager.
Using the official Android SDK Platform Tools Download the ZIP file from the official Android SDK Platform Tools page. Extract it to a directory, for example
C:\platform-tools\. Add this directory to your system’s PATH variable so that adb can be executed from any command prompt.Example PowerShell command to test the installation:
adb versionUsing Chocolatey If you use the Chocolatey package manager, you can install adb with:
choco install adbUsing Scoop With the Scoop package manager:
scoop install adb
After installation, connect your Android device via USB and verify the connection:
adb devices
Usinging adb #
Enable Developer options and USB debugging #
To use adb, you must enable Developer options on your Android device. The process differs slightly depending on the Android version.
Android 13 and later #
- Open Settings.
- Navigate to About phone or About tablet.
- Tap Build number seven times until you see a message that Developer options are enabled.
- Go back to Settings → System → Developer options.
- Enable USB debugging.
When you connect your device to the computer, confirm the USB debugging authorization dialog.
Android 10 to 12 #
- Open Settings.
- Tap About phone.
- Tap Build number seven times to enable Developer options.
- Return to Settings and open System → Developer options.
- Enable USB debugging.
Android 9 and earlier #
- Open Settings.
- Go to About phone.
- Tap Build number seven times to unlock Developer options.
- Open Developer options in the main Settings menu.
- Enable USB debugging.
Once USB debugging is enabled and adb is installed, you can use commands such as:
adb devices
adb shell
adb install app.apk
adb push localfile /sdcard/
adb pull /sdcard/remote_file
You can find a detailed overview of common adb commands in the adb cheat sheet.
FAQ's #
Most common questions and brief, easy-to-understand answers on the topic:
What is adb?
The Android Debug Bridge (adb) is a command-line tool that allows communication between your computer and Android device for debugging and management tasks.
Is adb safe to use?
Yes, adb is safe when downloaded from the official Android developer website. You should only enable USB debugging when you trust the connected computer.
Do I need to install the full Android Studio for adb?
No, you can install the lightweight Android SDK Platform Tools, which include adb, without installing Android Studio.
Why is my device not detected by adb?
Ensure USB debugging is enabled and the correct USB drivers are installed. You can check connectivity with the command adb devices.
Where can I find adb commands?
You can find an overview of common adb commands in the adb cheat sheet.
Further readings #
Sources and recommended, further resources on the topic:
License
How to install and use adb by Jonas Jared Jacek is licensed under CC BY-SA 4.0.
This license requires that reusers give credit to the creator. It allows reusers to distribute, remix, adapt, and build upon the material in any medium or format, for noncommercial purposes only. To give credit, provide a link back to the original source, the author, and the license e.g. like this:
<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><a property="dct:title" rel="cc:attributionURL" href="https://www.ditig.com/how-to-install-and-use-adb">How to install and use adb</a> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://www.j15k.com/">Jonas Jared Jacek</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="license noopener noreferrer">CC BY-SA 4.0</a>.</p>For more information see the Ditig legal page.