Advance

Tutorial Install Android Debug Bridge on Linux

Tutorial Install Android Debug Bridge on Linux

Nowadays Android has the largest number of users all over the world. Google has placed features and tools in Android and in its software infrastructure that few people know about. One of these tools, which is special for developers and you can use as a user, is the Android Debug Bridge program. This article will teach you How to Install Android Debug Bridge on Linux. If you intend to buy a Linux VPS server, you can check out the packages offered on the Eldernode website.

How to Install Android Debug Bridge on Linux

Recommended Article: Tutorial Install MariaDB on OpenBSD 7

What is Android Debug Bridge?

Android Debug Bridge also called ADB is a powerful command line utility that allows you to communicate with a device. It can be used to debug your Android phone or tablet and send a large number of commands to control the behavior on the device, allowing it to install apps and the logging of processes. Additionally, this utility is included with Google’s Android SDK and is composed of three main components which are the client, daemon, and server:

1–> The Client: It runs on the development machine and sends commands. The client can run by executing an ADB command.

2–> The Daemon: It runs as a background on each device and executes commands on a device.

3–> The Server: It runs as a background process on your development machine and manages communication between the client and the daemon.

Installing Android Debug Bridge on Linux

Here are the appropriate commands for different Linux distributions. Firstly, you should install the ADB package. To do this, run the appropriate command for your Linux distribution:

Debian, Ubuntu, and Mint:

sudo apt install adb

RHEL/CentOS/Fedora and Rocky/AlmaLinux:

sudo yum install adb

Gentoo Linux:

sudo emerge -a dev-util/android-tools

Alpine Linux:

sudo apk add adb

Arch Linux:

sudo pacman -S android-tools

OpenSUSE:

sudo zypper install adb

Installing Android SDK Platform Tools on Linux

In this section, you are going to download the archived package using the command below:

mkdir cli-tools  
wget -c https://dl.google.com/android/repository/platform-tools-latest-linux.zip

Once the download is completed, extract it to your desired folder:

unzip platform-tools-latest-linux.zip

And move it to the extracted folder as shown below:

cd platform-tools/

The following command lists the content of the extracted folder:

ls

You can check the version of the installed Android Debug Bridge using the following command:

./adb version

Using Android Debug Bridge on Linux

After you finish installing ADB on your Linux system, it’s time to use it. To do this, you need to connect your device to the computer via a USB cable. Then go to device system settings >> Developer options and enable USB debugging.

Now check on the devices for any prompts to allow access. You can do this by listing the devices connect to the computer with the following command:

./adb devices

In the output of the above command, you will see the string RZ8NA0V3HEY which is generated by adb to uniquely identify the device by its port number. Also, the next column shows the device which means the device is connected to the adb server. Note that other possible values are offline (device not connected or is not responding) and no device (that is, no device is connected).

You can display more information about the device by adding the -l flag. Remember that this is useful if you have many devices connected to the computer:

./adb devices -l

Now you can install the Android app using adb. To do this, enter the following command:

./adb install ~/MusiX.apk  

OR

./adb install -t /path/to/testapp.apk

If you have multiple devices connected to the computer and you want to specify the device’s serial number, use the -s option as shown below:

./adb -s RZ8NA0V3HEY install ~/MusiX.apk

If you lose connection to a device, you need to reset your adb host by running the following command and start over:

adb kill-server

You can view all available command-line options using the command below:

./adb --help

That’s it!

Recommended Article: Tutorial Install Android Debug Bridge on Linux

Conclusion

Android Debug Bridge is a command-line tool that allows you to manage an Android device. In this article, we introduced you to Android Debug Bridge and taught you how to install it on Linux. I hope you found this tutorial useful and helps you to install Android Debug Bridge on your Linux server. If you face any problems or have any questions during the installation process, you can contact us in the Comments section.

View More Posts
Tom Veitch
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

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

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way

+8595670151

7 days a week, 24 hours a day