ADB and Fastboot are very important if you want to do advanced stuff on your Android device. For an Android device to communicate properly with a computer in ADB and Fastboot mode, proper drivers must be installed on the computer.
If you own a Linux system and want to connect your Android device in ADB or Fastboot mode to it, then this guide is for you. Read ahead to learn how to install ADB and Fastboot Driver on Linux.
About using adb commands in Linux distros
Before getting started, we would like to get a small thing out of the way. Most Linux distros allow the user to issue adb commands as below:
If it does not work for you, you should use the below format:
Install ADB and Fastboot on Linux with Google Platform Tools
1. Download ADB and Fastboot Driver for Linux
There was a time when you had to download and install the whole Android SDK just to get the platform-tools aka ADB and Fastboot Drivers. Fortunately, that is not the case anymore. Google has finally made them available as a separate package for the ease of the users. You can grab the package from the below link:
2. Install ADB and Fastboot Driver on Linux
Make sure to unzip and extract the content of the downloaded files into an easily accessible location. We are going to make use of the built-in Terminal to get the job done.
- Open a Terminal instance on your Linux system.
- From inside the terminal, access the directory where you have extracted the contents of the downloaded zip file.
Note: Replace /path/to/extracted/folder/ with the actual path to the folder.
Alternatively, if you have Nautilus on your Linux distro, you can simply right-click on an empty area and select Open in Terminal.
3. Configure Android device
- Connect your Android device to your Linux system via USB cable. Also, make sure that your device is connected in ‘MTP File Transfer’ or ‘File Transfer’ mode.
- In the Terminal, execute the below command:
- Now, on your Android device, you should get a prompt asking you to allow USB debugging permissions to the connected computer. Make sure ‘Always allow from this computer’ is checked and grant the permission.
- Re-execute the above command and you should be able to see your device listed on the Terminal.
4. Add ADB & Fastboot system-wide [Optional]
- Open a Terminal window and execute the below command to edit the .bashrc file:
sudo gedit .bashrc
- At the end of the file, add the following line:
- Save and close the file.
Install ADB & Fastboot on Linux via Terminal commands
Some Linux distros allow us to directly install the ADB and Fastboot drivers instead of downloading the drivers from a third-party source. Below are the commands to install them directly via Terminal.
Debian-based Linux Distros
sudo apt-get install adb
Fedora/SUSE-based Linux Distros
sudo yum install android-tools
Tip: You should note that Ubuntu, the most popular Linux distro, and all its derivatives are Debian based.