How To Remove Bloatware From The Samsung Galaxy S22 02 How To Install ADB On Windows, macOS, and Linux
How To Remove Bloatware From The Samsung Galaxy S22 02 How To Install ADB On Windows, macOS, and Linux
Readers like you help support XDA Developers. When you make a purchase using links on our site, we may earn an affiliate
commission. Read More.
Quick Links
What is Android Debug Bridge (ADB)?
Several features of the Android platform can be accessed only through paths and methods
that are hidden away from the average user. These have generally been done with the help
of some command line Android Debug Bridge (ADB) commands, a tool that Google offers
https://www.xda-developers.com/install-adb-windows-macos-linux/ 1/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
for developers to debug various parts of their applications or the system, but which we can
use for all kinds of neat and hidden tricks. A prerequisite to these tricks is installing ADB on
your computer. So, in this guide, we will show you how to install ADB on Windows, macOS,
and Linux in quick and easy-to-follow steps.
The internal structure of the Android Debug Bridge (ADB) is based on the classic client-
server architecture. There are three components that make up the entire process.
1. The client, i.e. the PC/Mac/Chromebook you have connected to your Android device.
We are sending commands to our device from the computer through the USB cable or
wirelessly.
2. A daemon (known as "adbd") that runs commands on a device. The daemon runs as a
background process on each device.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 2/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
3. A server that manages communication between the client and the daemon. The server
runs as a background process on the computer.
Because there are three pieces that make up ADB (the client, the daemon, and the server),
this requires certain pieces to be up and running in the first place. If you have freshly
booted the computer (and you don’t have it set up to start the daemon on boot), then you
will need it to be running before any communication can be sent to the target Android
device. You’ll see the following message in the command prompt or terminal, which will
check to make sure the daemon is running.
If the daemon isn’t running, then it will start the process and tell you which local TCP port it
has been started on. Once that ADB service has been started, it will continue to listen to
that specific port for commands that have been sent by the ADB client. It will then set up
connections to all running devices which are attached to the computer (including
emulators). This is the moment when you’ll receive the authorization request on the
Android device if the computer hasn’t been authorized in the past.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 3/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
Note: Setting up ADB on the computer is just half the equation since you'll also need to do
some things on the smartphone or tablet to accept the ADB commands.
Phone setup
Depending on the OEM skin, the About phone page may be called something else
or buried somewhere else in the Settings app on your device.
3. Then tap the Build number option seven times to enable Developer Mode. You will
see a toast message when it is done.
4. Now go back to the main Settings screen and you should see a new Developer
options menu you can access. On Google Pixel phones and some other devices, you
might need to navigate to Settings > System to find the Developer options menu.
5. Go in there and enable the USB debugging option.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 4/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
6. You are partially done with the phone setup process. Next up, you will need to scroll
below and follow the rest of the instructions for your particular operating system.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 5/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
4. Open up a Command Prompt/Terminal instance from the same directory as this ADB
binary. This can be done by holding Shift and right-clicking within the folder and then
clicking Open command window here or Open PowerShell window here. Windows
11 users should see Open in Terminal in the right-click context menu without even
pressing the Shift button on the keyboard.
5. Connect your smartphone or tablet to your computer with a USB cable. Change the
USB mode to “file transfer (MTP)” mode. Some OEMs may or may not require this, but
it's best to just leave it in this mode for general compatibility.
6. In the Command Prompt/Terminal window, enter the following command to launch the
ADB daemon: adb devices
7. On your phone's screen, you should see a prompt to allow or deny USB Debugging
access. Naturally, you will want to grant USB Debugging access when prompted (and
tap the always allow check box if you never want to see that prompt again).
https://www.xda-developers.com/install-adb-windows-macos-linux/ 6/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
8. Finally, re-enter the command from step 6. If everything was successful, you should
now see your device's serial number in the command prompt (or the PowerShell
window).
https://www.xda-developers.com/install-adb-windows-macos-linux/ 7/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
You can now run any ADB command on your device! Now go forth and start modding your
phone by following our extensive list of tutorials!
5. Connect your device to your Mac with a compatible USB cable. Change the USB
connection mode to “file transfer (MTP)” mode. This is not always required for every
device, but it's best to just leave it in this mode so you don't run into any issues.
6. Once the Terminal is in the same folder your ADB tools are in, you can execute the
following command to launch the ADB daemon: ./adb devices
7. On your device, you'll see an Allow USB debugging prompt. Allow the connection.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 8/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
8. Finally, re-enter the command from step 7. If everything was successful, you should
now see your device's serial number in macOS's Terminal window.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 9/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
Congratulations! You can now run any ADB command on your device! Now go forth and
start modding your phone.
While the guide above will certainly work, veteran macOS users can also opt to install ADB
on their Macs using an unofficial package manager such as Homebrew or MacPorts. That
way, you don't have to manually update the binaries.
Example: cd /home/XDA/Desktop/platform-tools/
6. Connect your device to your Linux machine with your USB cable. Change the
connection mode to “file transfer (MTP)” mode. This is not always necessary for every
device, but it's recommended so you don't run into any issues.
7. Once the Terminal is in the same folder your ADB tools are in, you can execute the
following command to launch the ADB daemon: ./adb devices
8. Back on your smartphone or tablet device, you'll see a prompt asking you to allow USB
debugging. Go ahead and grant it.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 10/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
9. Finally, re-enter the command from step 8. If everything was successful, you should
now see your device's serial number in the Terminal window output.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 11/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
Congrats! You can now run any ADB command on your device!
Linux users should know that there is an easier way to install ADB on their computers. The
guide above will certainly work for you, but those who own a mainstream Debian/Ubuntu or
Fedora/SUSE-based distro of Linux can skip steps 1 and 2 of the guide above and use one
of the following commands:
Debian/Ubuntu-based Linux users can type the following command to install ADB:
Fedora/SUSE-based Linux users can type the following command to install ADB:
However, it is always better to opt for the latest binary from the Android SDK Platform Tools
release, since the distro-specific packages often contain outdated builds.
Special case: How to set up ADB on Windows Subsystem for Linux and ChromeOS
Windows Subsystem for Linux (WSL) offers Windows users a seamless way to run Linux
apps. However, the environment has yet to offer full-fledged USB hardware access. As a
consequence, ADB under WSL can't access your Android device, even if you install it using
the aforementioned way. Nonetheless, there exists an official workaround, which utilizes
https://www.xda-developers.com/install-adb-windows-macos-linux/ 12/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
the open-source usbipd-win project. To know more, take a look at our tutorial on how to set
up USB passthrough in WSL.
For ChromeOS, you need to turn on the built-in Linux development environment first. By
default, it offers you a Debian instance. You can then easily set up ADB using the steps
mentioned above.
Just to cover all of our bases here, users may need to put a ./ in front of the ADB
commands we list in future tutorials, especially when they are using the extracted binaries
directly from the Google-provided Platform Tools ZIP. This is something any *nix user (or
Windows user running PowerShell/Terminal) will likely know, but again, we want as many
people as possible to understand how to do these tweaks for Android no matter how much
of your operating system you know.
The ADB protocol can be implemented using the WebUSB API in order to control Android
phones directly from web browsers. Yet Another WebADB, aka ya-webadb, is one such
project that allows users to perform most of the functionality provided by ADB right from the
web browser without installing any binary or driver. All you need is a web browser that
supports the WebUSB API (such as Google Chrome, Microsoft Edge, or Firefox) and you
are good to go.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 13/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
Android 11 and higher editions natively support ADB connection over Wi-Fi. This eliminates
the need to deal with common USB connection issues and additional steps such
as Android OEM driver installation on Windows.
1. Make sure that your PC/Mac and the phone are connected to the same wireless
network.
2. On your phone, go to Developer options under Settings and enable Wireless
debugging. On the Allow wireless debugging on this network? popup,
https://www.xda-developers.com/install-adb-windows-macos-linux/ 14/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
select Allow.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 15/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
4. Take note of the pairing code, IP address, and port number displayed on the phone
screen.
https://www.xda-developers.com/install-adb-windows-macos-linux/ 16/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
Look at the IP address & Port section under Wireless debugging in step 3 for the IP
address and port.
8. If everything goes right, then you should see a message like the following:
https://www.xda-developers.com/install-adb-windows-macos-linux/ 17/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
connected to 192.168.68.100:37173
9. Now you’re ready to type whatever ADB shell command you want.
To check if you have successfully installed ADB, connect your device to your PC/Mac with
your USB cable, and run the adb devices command as described above. It should
display your device listed in the Command Prompt/PowerShell/Terminal window. If you get
a different output, we recommend starting over with the steps.
As mentioned above, you can use ADB to do all sorts of things on an Android device.
Some of these commands are built directly into the ADB binary and should work on all
devices. You can also open up what is referred to as an ADB Shell that will let you run
commands directly on the device. The commands which are run directly on the device can
vary from device to device (since OEMs can remove access to certain ones, and also
modify ADB behavior) and can vary from one version of Android to the next as well.
Below, you’ll find a list of example commands which you can do on your device:
https://www.xda-developers.com/install-adb-windows-macos-linux/ 18/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
Bonus
For those who want to take this a step further, you can follow this new tutorial we put
together that will walk you through how to set up ADB so that you can use the command
from any directory on a Windows or Linux desktop.
Below is a list of XDA tutorials for various devices that detail many applications of ADB
commands in order to modify hidden settings, customize OEM features or user interfaces,
and much more!
How to boot into recovery mode using button combos, ADB, and root apps
How to uninstall carrier/OEM bloatware without root access
How to debloat your phone (and more) without connecting to a PC
How to sideload apps on Android TV: APK Install and ADB Sideload methods explained
in easy-to-follow steps!
Bring back the Wi-Fi and Mobile data Quick Settings tiles in Android 12 and above
Control your Android Smartphone from your PC for free with scrcpy
https://www.xda-developers.com/install-adb-windows-macos-linux/ 19/20
5/8/23, 12:15 PM How to install ADB on Windows, macOS, and Linux
How to Pair Android Wear Watches to New Phones without Factory Resetting
This is just the tip of the iceberg. Don't forget to check out our ADB commands for every
power user tutorial to know more useful tips and tricks for using ADB!
https://www.xda-developers.com/install-adb-windows-macos-linux/ 20/20