Install adb on windows mac and linux

ADB (Android Debugging Bridge) and Fastboot are used to perform valuable and critical functions on Android phones via terminal commands. Both tools are super handy in the development of the Android operating system. It also allows you to access and modify the underlying architecture of the Android operating system. ADB is usually used to send developer commands to your phone. For example, you can use it to flash updates.

Meanwhile, Fastboot can be used to send commands to the bootloader. It will allow you to flash custom firmware, factory images, and custom recoveries. This guide will elaborate on how to install ADB on Windows, Mac, or Linux operating systems along with Fastboot.

So, what’s the need to install ADB and Fastboot on your computer to perform different Android phone features? Well, without ADB and fastboot, you would need the whole Android SDK that takes about 2 GBs on your computer.

Now let’s move on to the guide on installing ADB on Windows, Mac or Linux. Each operating system has different commands. So I will cover each of them.

Prerequisites:

First of all, you need to download the zip files for ADB and Fastboot utilities. According to your Operating System, download the zip file on your computer:

Once downloaded, extract the zip file where you want to use ADB and fastboot services.

Install ADB on Windows PC:

  1. First of all, download SDK platform tools for Windows from above.
  2. Then, extract them somewhere easy to access.
  3. Now, to test whether ADB services are working correctly, we will have to connect the phone to the computer and run a command.
  4. Enable the USB Debugging Mode on your phone: Go to Settings > About phone> Tap Build Number seven times to enable Developer Options. Then, go to Settings > Developer Options > Enable USB Debugging. 
  5. Now, on your computer, open the command prompt in the same folder where you extracted the zip file’s contents. In order to open the command prompt:
    • Press ALT + D
    • Write CMD
    • Press Enter
  6. Make sure your phone is connected to the computer using a data cable. Also, the USB mode should be “File Transfer (MTP).”
  7. Now enter the following command in the terminal on your computer:
    • adb devices
  8. On your phone, allow USB debugging when a prompt comes.
  9. Now, you will see your phone is connected via the terminal.

If it does not work, you might have to set Environment Variable

Follow the steps below to set the environment variable:

  1. Go to the Control Panel of your computer and click on System and Security.
  2. Then click on System and select Advanced System Settings.
  3. Click on Environment Variables.
  4. Under System Variables, highlight the path, then click edit
  5. Click on new and add the destination location directory (Link to the directory where you installed ADB and fastboot. For example: c:\desktop\adb
  6. Click OK.

Install ADB and Fastboot on macOS:

  1. First of all, download the SDK toolkit from above.
  2. While extracting the files from the zip file manually, indicate you want the files extracted to the directory ~/adb
  3. Now, in the ADB folder, edit the file ~/.bash_profile
  4. Add this to the end of the file: export PATH=$PATH:~/adb
  5. Ensure the ADB and fastboot files in ~/adb have to execute permissions.

You can test if the ADB connection works by connecting your Android phone to your computer via a data cable and, As mentioned in the first guide, enabling USB debugging mode on your phone. Once your phone is connected, USB debugging is enabled. Next, open the terminal in the folder where you have extracted the ZIP file’s contents and enter the following command.

adb devices

Install fastboot and ADB on Linux:

  1. For the Linux operating system, the process is the same. First, download the ADB and fastboot utilities from above for Linux.
  2. Then, while extracting the files from the zip file, manually indicate you want the files extracted to the directory ~/adb
  3. Open the folder where you have extracted the zip file.
  4. In the folder, find and edit the file ~/.bash_profile
  5. Add this to the end of the file: export PATH=$PATH:~/adb
  6. Moreover, ensure that the ADB and fastboot files in ~/adb have to execute permissions.

Once you install and extract ADB files, you can connect your phone to your computer and test if the ADB connection is working with ADB commands. Once the connection is established. You can now use ADB and fastboot to install custom recoveries, flash firmware, flash factory images, or OTAs on Android smartphones like Google Pixel and Samsung.

Suppose you have questions about installing ADB on Windows, Mac, or Linux operating systems. Then, you can drop your questions in the comments below.

Ayybee
Balochistan |Uz garzam lewanay | Deutschland | Software Engineer | For questions, contact me.
Subscribe
Notify of

0 Comments
Oldest
Newest
Inline Feedbacks
View all comments