How to install AutoAdb in Linux?

Autoadb is a command-line tool allows to execute a command whenever a new device is connected to adb.

You can use autoadb with scrcpy to automatically set-up a new device connected to your network.

In this article I am going to show you that how you can easily install autoadb in linux.

Step 1. Install prerequisites

Let us first install all the tools that we will need to download and run autoadb on Linux.

Copy and paste the following commands one by one in the terminal.

This command will install git on your system. We will use git to clone autoadb from github.

sudo apt install git

This command will install Cargo on your system. A Ruby package manager.

sudo apt install cargo

Once done check with the following commands if the installation was successful.

git --version && cargo --version

Step 2. Clone AutoAdb

Let’s now clone/download autoadb, we are going to use git for this. We installed git in the previous step.

The file will be downloaded and placed in your home directory as a folder named autoadb.

Execute the following command in the terminal to download autoadb.

git clone https://github.com/rom1v/autoadb.git && cd autoadb
auto adb linux

Setp 3. Install Autoadb

Now install autoadb with the following command. The building process will only take a few seconds.

cargo build --release

It will generate the binary in target/release/autoadb.

autoadb compiled

Step 4. Launch Autoadb

Once the compilation is done, we can launch autoadb. It is not added as a recognized command so typing “autoadb” in the terminal wont launch it.

Use the following commands to launch autoadb.

This command will move your current directory to the place where autoadb is located, that is Home folder -> autoadb -> target -> release

cd && cd autoadb/target/release

Now launch autoadb with:

./autoadb

You will see an error that no arguments given, because you need to pass arguments along with the launch command.

For example, if you are using autoadb for scrcpy then the command would be:

autoadb scrcpy -s '{}'
autoadb installed on linux

Conclusion

Every time you want to use autoadb you will have to go to its folder/target/release and then execute the command. I hope this article helped you 🙂

chevron_left
chevron_right