ADB (Android Debug Bridge) and Fastboot are command-line tools that let you communicate with Android devices from a Linux workstation. ADB handles tasks like installing apps, copying files, capturing logs, and running shell commands on a connected device. Fastboot operates at the bootloader level – useful for flashing firmware images, unlocking bootloaders, and recovering bricked devices.

This guide walks through installing ADB and Fastboot on Ubuntu 24.04, Linux Mint 22, and Debian 13 using two methods: the distribution package manager and a manual install from Google’s official release.

Prerequisites

Before you start, confirm the following:

  • A running Ubuntu 24.04, Linux Mint 22, or Debian 13 system
  • A user account with sudo privileges
  • An Android device with a USB cable (for testing the connection)
  • Internet connectivity to download packages

Update your package index before proceeding:

sudo apt update

Method 1 – Install ADB and Fastboot from APT (Recommended)

The simplest approach is to install the android-sdk-platform-tools package directly from the distribution repositories. This method handles dependencies automatically and integrates with the system package manager for updates.

Run the following command to install ADB and Fastboot:

sudo apt install -y android-sdk-platform-tools

After installation completes, verify that both tools are available:

adb version

Expected output will show the ADB version and build information:

Android Debug Bridge version 1.0.41
Version 34.0.x-xxxxxxx

Check Fastboot as well:

fastboot --version

You should see version details similar to:

fastboot version 34.0.x-xxxxxxx

If both commands return version strings without errors, the installation is complete. The repository version may lag behind Google’s latest release by a few versions – if you need the newest build, use Method 2 below.

Method 2 – Install ADB and Fastboot from Google’s Official Release

Google publishes standalone platform-tools packages that always contain the latest ADB and Fastboot binaries. This method gives you the most recent version without waiting for distribution repositories to update.

Step 1 – Download Platform Tools

Download the latest Linux platform-tools archive from Google:

cd /tmp
wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip

Verify the download completed successfully by checking the file size:

ls -lh /tmp/platform-tools-latest-linux.zip

The file should be several megabytes in size. If it shows 0 bytes or the download failed, retry the wget command.

Step 2 – Extract the Archive

Install unzip if it is not already present, then extract the archive:

sudo apt install -y unzip
unzip /tmp/platform-tools-latest-linux.zip -d /opt/

This extracts the tools to /opt/platform-tools/. Confirm the binaries are in place:

ls -l /opt/platform-tools/adb /opt/platform-tools/fastboot

Both files should appear as executable binaries.

Step 3 – Add Platform Tools to PATH

To run adb and fastboot from any directory, add the platform-tools folder to your shell PATH. Append the following line to your ~/.bashrc file (or ~/.zshrc if you use Zsh):

echo 'export PATH="$PATH:/opt/platform-tools"' >> ~/.bashrc

Reload the shell configuration to apply the change immediately:

source ~/.bashrc

Step 4 – Verify the Installation

Check that the system picks up the correct binary path and version:

which adb
adb version

The which command should return /opt/platform-tools/adb. Then verify Fastboot:

which fastboot
fastboot --version

Both tools should report their version numbers. If which returns a different path, you may have the APT version installed as well – remove it with sudo apt remove android-sdk-platform-tools to avoid conflicts.

Configure udev Rules for Device Permissions

On Linux, regular users typically cannot access USB devices without proper udev rules. Without these rules, ADB will either fail to detect your device or require running as root – which is not recommended.

The android-sdk-platform-tools package from APT usually installs udev rules automatically. If you used Method 2, or your device is not detected, set up the rules manually.

Install the community-maintained Android udev rules package:

sudo apt install -y android-sdk-platform-tools-common

This installs udev rules to /lib/udev/rules.d/51-android.rules covering most Android device vendors.

If you prefer to create rules manually or need to add a specific vendor, create a custom rules file:

sudo tee /etc/udev/rules.d/51-android.rules <<'EOF'
# Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
# Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
# OnePlus
SUBSYSTEM=="usb", ATTR{idVendor}=="2a70", MODE="0666", GROUP="plugdev"
# Xiaomi
SUBSYSTEM=="usb", ATTR{idVendor}=="2717", MODE="0666", GROUP="plugdev"
# Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
# Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
# Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
# LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"
EOF

Reload udev rules and add your user to the plugdev group:

sudo udevadm control --reload-rules
sudo udevadm trigger
sudo usermod -aG plugdev $USER

Log out and back in (or reboot) for the group membership change to take effect. Verify your user is in the plugdev group:

groups $USER

Enable USB Debugging on Your Android Device

ADB cannot communicate with your device unless USB debugging is turned on. Follow these steps on the Android device:

  1. Open Settings and go to About phone
  2. Tap Build number seven times until you see “You are now a developer”
  3. Go back to Settings and open Developer options (may be under System or Additional settings depending on your device)
  4. Toggle USB debugging to ON
  5. Connect the device to your Linux machine via USB
  6. When prompted on the device, tap Allow to authorize the computer for USB debugging – check “Always allow from this computer” if you want to skip this prompt in the future

Test the ADB Connection

With USB debugging enabled and the device connected, start the ADB server and list connected devices:

adb devices

You should see output listing your device with a serial number and the word device next to it:

List of devices attached
XXXXXXXXXXXXXXX	device

If the status column shows unauthorized, check the device screen for the authorization prompt and tap Allow. If it shows no permissions, revisit the udev rules section above.

Common ADB Commands

Here is a reference of ADB commands you will use regularly.

Open a shell session on the device:

adb shell

Push a file from your computer to the device:

adb push /path/to/local/file /sdcard/Download/

Pull a file from the device to your computer:

adb pull /sdcard/Download/file.txt /tmp/

Install an APK on the device:

adb install application.apk

Use the -r flag to reinstall an existing app while keeping its data:

adb install -r application.apk

View real-time device logs:

adb logcat

Filter logcat output by tag for targeted debugging:

adb logcat -s "ActivityManager"

Reboot the device:

adb reboot

Reboot into recovery or bootloader mode:

adb reboot recovery
adb reboot bootloader

Common Fastboot Commands

Fastboot works when the device is in bootloader (fastboot) mode. Boot into fastboot mode from ADB:

adb reboot bootloader

Or power off the device and hold the appropriate hardware button combination (varies by manufacturer).

List connected devices in fastboot mode:

fastboot devices

Unlock the bootloader (this wipes all data on the device):

fastboot flashing unlock

Flash a partition image:

fastboot flash boot boot.img
fastboot flash recovery recovery.img

Reboot the device from fastboot mode:

fastboot reboot

Troubleshooting

Device Not Detected by ADB

If adb devices returns an empty list:

  • Confirm USB debugging is enabled on the device
  • Try a different USB cable – some cables are charge-only and do not support data transfer
  • Try a different USB port, preferably a USB 2.0 port on the back of the machine
  • On the device, change the USB mode from “Charging” to “File Transfer” (MTP)
  • Kill and restart the ADB server:
adb kill-server
adb start-server
adb devices

Permission Denied or “no permissions” Error

This indicates missing or incorrect udev rules. Follow the udev rules section above to set them up. After creating the rules file, reload udev and restart ADB:

sudo udevadm control --reload-rules
sudo udevadm trigger
adb kill-server
adb devices

Make sure your user is a member of the plugdev group. If you just added yourself, log out and back in for the change to take effect.

Device Shows “unauthorized”

The device is detected but has not authorized your computer. Disconnect the USB cable, reconnect it, and look for the RSA key fingerprint prompt on the device screen. Tap Allow to authorize the connection.

If the prompt does not appear, revoke existing USB debugging authorizations on the device under Developer options and reconnect.

ADB Version Mismatch Between Client and Server

If you see a warning about mismatched ADB client and server versions, it usually means you have two ADB installations. Kill the server and let the correct binary start it fresh:

adb kill-server
which adb
adb devices

If which adb points to the wrong binary, adjust your PATH so the preferred installation appears first, or remove the version you do not need.

Fastboot Cannot Detect the Device

Fastboot detection issues are almost always a udev rules problem. Verify the device is in fastboot mode (the screen should show a fastboot or bootloader menu), then run:

sudo fastboot devices

If the device appears with sudo but not without it, your udev rules are not configured correctly. Fix the rules as described in the udev section and try again without sudo.

Conclusion

You now have ADB and Fastboot installed and working on your Ubuntu 24.04, Linux Mint 22, or Debian 13 system. Method 1 using the APT package is the straightforward option for most users, while Method 2 gives you the latest binaries directly from Google. With udev rules in place and USB debugging enabled, you can manage Android devices directly from the command line – whether that means transferring files, debugging applications, or flashing firmware images.

LEAVE A REPLY

Please enter your comment!
Please enter your name here