How to Install and Use ADB & Fastboot on Linux?

Here is a complete Guide to Install & Use ADB and Fastboot on your Linux PC. Perform Operations on Android Mobile Using ADB and Fastboot Commands with Ubuntu.

ADB or Android Debug Bridge is a command-based utility that can be used for various tasks like controlling major software aspects of an Android system. ADB and Fastboot Tools, part of the Android SDK and Platform Tool, are used to create an Android Debug Bridge between your Android device and PC. Once done, you could then easily execute any ADB and Fastboot Commands.

Moreover, Fastboot is a program that is used to diagnose the system software of the system and implement the solution within the same environment. It can be used for other tasks like installing/flashing the custom recovery to an Android device.

In this article, we are going to discuss and learn how to install and use ADB and Fastboot in a Linux system. We are going to show two different methods to do so.

Note: We are going to use Ubuntu 20.04.1 for the demonstration, but all the steps are similar for other Linus distros.

How to Install and Use ADB & Fastboot on Mac?

How to Install ADB and Fastboot on Linux?

Method 1. Using Linux Terminal

We are going to use the terminal directly to download and install ADB and fastboot drivers. This is the simplest method available as it doesn’t involve many steps. This method will use a simple command to download as well as install both the ADB and fastboot drivers.

Note: If you are using the first session of the terminal then it might ask for administrative access, so put your password to allow it

First, we are going to update all the pending repos, so that it doesn’t interrupt the adb and fastboot installations, so use the following command to do.

sudo apt update

sudo apt update

Now, use the following command to install the adb as well as fastboot drivers. Make sure that no installation is running in the background whether it is via the GUI software store or CUI terminal.

sudo apt-get install android-tools-adb android-tools-fastboot

install platform tools with linux terminal

That is it, you have successfully installed the ADB and fastboot drivers, and the system is ready to use.

Although, after installation, the system itself starts the ADB server, if you are getting any error then use the following command to start the ADB server.

sudo adb start-server

Method 2. Using Platforms Tools

This is another method to download and use the ADB and fastboot in your Linux system. Just follow the below-instructed steps and you are good to go:

  1. Download the zip from Google SDK manager or via this link.
  2. After downloading the zip, extract it and remember the path, we are going to use it in other steps.
    Extract Platform Tools
  3. Now, open the terminal from the app drawer or by pressing the Ctrl+Alt+T combination.
  4. Now, navigate to the extracted folder/directory by using the cd command.
     cd /path/to/extracted/folder/

    replace /path/to/extracted/folder/ with your extracted directory location, like in our case, cd /home/stark/Downloads/platform-tools_r30.0.5-linux/platform-tools (You can even drag and drop the folder onto terminal after using cd command).

  5. Or, if you don’t want to use the cd command then open the extracted folder using the file manager and then right-click on the empty space and tap ‘Open in Terminal’.
    Open terminal

Now, you can use ADB and fastboot to do various things.

Using ADB and Fastboot on Linux

As we have successfully installed the ADB and fastboot drivers in Linux, now the questions that arise is how we can use it for various tasks, well let me tell you, it is very easy to use. If you have ever used the ADB commands in other OS, then it will be easy to use it here too, as all the commands are the same.

So, let us start with a simple command to get the version of the installed ADB.

adb version

adb version

Now, we are going to check the connections by connecting our Android smartphone via USB Debugging, if USB debugging isn’t already on, then head over to Settings on your Android device and click on About Phone, and scroll to the Build Number section. Here tap on Build number 7 times (on some devices 5 times). You will now get a toast message indicating Developer Options have been enabled.

Developers Options

Navigate to the USB Debugging option and enable the toggle next to it.

Allow USB Debugging

After connecting the Android device via USB cable, use the following command to check the connection.

adb devices

adb devices

If the connection is successful you will see the list of devices attached along with a code.

Useful ADB and Fastboot Commands

Similarly, you can perform various commands and do your tasks like installing a custom recovery on your Android device, etc

  • adb devices – Check the connection between PC and Mobile
  • adb reboot recovery – Reboot your phone into recovery mode.
  • adb reboot-bootloader – Reboot your phone into bootloader mode.
  • adb push [source] [destination]  Copy files from your computer to your phone.
  • adb pull [source] [destination] – Copy files from your phone to your computer.
  • adb shell [command] – Open or run commands in a terminal on the host Android device.
  • fastboot oem unlock – Unlock your bootloader, making root access possible.
  • fastboot flash recovery – Flash a custom recovery image to your phone.

Conclusion: With the guide above you can install ADB and Fastboot on Ubuntu Linux OS PC and also know about Commands to perform the actions on PC.

If you've any thoughts on How to Install and Use ADB & Fastboot on Linux?, then feel free to drop in below comment box. Also, please subscribe to our DigitBin YouTube channel for videos tutorials. Cheers!

Share
Shekhar Vaidya
Shekhar Vaidya is a Blogger, a Web Developer, a CSE UG and a learner who’s learning about CS and programming. Being an introvert, he loves to write tech content instead of discussing it with others in an open stage. If he isn't writing about tech or programming then most probably you will find him sleeping.

Leave a Reply

Your email address will not be published. Required fields are marked *