The Android development tools, ADB(Android Debug Tool) and Fastboot, allow you unprecedented access to your Android device. These tools are essential for developers, and they make it possible to root and flash custom ROMs. Since Google uses Debian, installing them is very simple.
In this tutorial you will learn:
- How to Install the Android Tools
- How to Enable USB Debugging on Android
- How to Connect Your Phone to Debian
Software Requirements and Conventions Used
|Category||Requirements, Conventions or Software Version Used|
|System||Debian 10 Buster|
|Software||Android Debug Tools, Fastboot|
|Other||Privileged access to your Linux system as root or via the
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of
$ – requires given linux commands to be executed as a regular non-privileged user
Install the Android Tools
Both ADB and Fastboot are actually available in the default Debian repositories. Start by installing them both with Apt.
$ sudo apt install android-tools-adb android-tools-fastboot
They have a decent amount of dependencies, so don’t let that put you off.
Enable USB Debugging on Android
In order to connect your phone to your computer, you’re going to need to enable USB debugging on Android. Here’s where things get tricky. Not every phone manufacturer lets you enable that by default. In some cases, you may even need to root your device first.
With that said, you’ll need to open up the Developer Options in the Android setting first. Open your Settings app, and scroll all the way down to System. Then, locate About phone at the bottom of the list. Under About phone, find Build number, and tap it seven times to enable developer options. The phone will notify you when you’re getting close.
Next, go back up one level to System. You’ll see
Developer options there now. Tap to open it up.
There are a lot of options in the Developer tools, and some of them can cause some serious problems, unless you know what you’re doing. Scroll until you see the Debugging header. Flip the switch to enable Android debugging.
Connect Your Phone to Debian
Get your phone’s USB cable, and plug it in to your computer. Depending on your phone’s settings, you may get a notification on the device saying that it’s connected for debugging.
Back on the computer, open up a terminal. List out the available devices with
$ adb devices
You’ll see a number corresponding to your phone, but it’ll be listed as
unauthorized. Turn your attention back to the phone. You’ll have a message requesting access. Accept. Run the command again on your computer to confirm that they’re connected.
Now, you’ll be able to use the full array of options
adb has to offer. Take a look at the command’s
--help or manpage to get the full breakdown of what’s available. Fastboot is also available now.
With these tools, you have complete access to Android from Debian. You’ll be able to accomplish whichever lower level tasks you have in mind. Since the packages come from the Debian repos, you’ll receive regular updates too.