This guide walks you through installing ADB (Android Debug Bridge) on Linux, the command-line tool that lets you communicate with an Android device for debugging, installing apps, and running shell commands. You’ll have a working ADB setup in about five minutes, whether you’re on Ubuntu, Debian, Fedora, or Arch.
What You’ll Need
- A Linux distribution (Ubuntu, Debian, Fedora, Arch, or similar)
- An Android device with USB debugging enabled (for connecting to a device)
- A USB cable (preferably the one that came with your device)
- Terminal access (Ctrl+Alt+T on most desktop environments)
Step-by-Step
- Open a terminal. Press
Ctrl+Alt+Tor search for “Terminal” in your applications menu. - Update your package lists. Run
sudo apt updateon Debian/Ubuntu-based systems, orsudo dnf check-updateon Fedora. For Arch, runsudo pacman -Sy. - Install ADB. Use the package manager for your distribution:
- Ubuntu/Debian:
sudo apt install adb - Fedora:
sudo dnf install android-tools - Arch Linux:
sudo pacman -S android-tools - openSUSE:
sudo zypper install android-tools
- Ubuntu/Debian:
- Verify the installation. Run
adb --version. You should see output showing the ADB version and the Android Debug Bridge build. If you get a “command not found” error, double-check the package name or try reinstalling. - Enable USB debugging on your Android device. On your phone, go to Settings > About phone and tap “Build number” seven times until you see “You are now a developer!” Then go to Settings > Developer options and enable “USB debugging”.
- Connect your device. Plug your Android device into your computer with a USB cable. If prompted on your phone, allow USB debugging by tapping “OK” on the “Allow USB debugging?” dialog.
- Test the connection. Run
adb devices. You should see your device listed as “device” (not “unauthorized” or “offline”). If it says “unauthorized”, check your phone and accept the RSA key prompt. - Start using ADB. Try
adb shellto open a shell on your device, oradb install app.apkto install an app. To disconnect, runadb kill-server.
Common Mistakes
- Not enabling USB debugging. Without it, ADB won’t see your device. Make sure you’ve tapped the build number seven times and toggled the option.
- Using the wrong package name. On Fedora, the package is
android-tools, notadb. On Arch, it’sandroid-toolsas well. - Forgetting to accept the RSA fingerprint. The first time you connect, your phone asks to allow debugging. If you miss it, the device shows as “unauthorized” in
adb devices. - Using a charge-only cable. Some cables don’t carry data. Try a different cable or USB port.
- Not starting the ADB server. Usually
adbstarts automatically, but if you get “cannot connect to daemon”, runadb start-server.
Tips
- Add
adbto your PATH if it’s not already there. Most package managers do this automatically, but if you installed manually, you can addexport PATH=$PATH:/path/to/platform-toolsto your~/.bashrc. - Use
adb -s <serial> shellto target a specific device when multiple are connected. - For wireless debugging, you can use
adb tcpip 5555and thenadb connect <device-ip>:5555after the initial USB setup. - Keep your ADB version updated. Newer Android versions may require a newer ADB. Run
sudo apt upgrade adb(or equivalent) periodically.
Troubleshooting
Device not detected: Run lsusb to see if your device appears. If not, try a different USB port or cable. On some distributions, you may need to add a udev rule. Create a file /etc/udev/rules.d/51-android.rules with the line SUBSYSTEM=="usb", ATTR{idVendor}=="<your-vendor-id>", MODE="0666" (find your vendor ID with lsusb), then run sudo udevadm control --reload-rules and reconnect.
Device shows “unauthorized”: Disconnect and reconnect, then watch your phone for the RSA prompt. If it doesn’t appear, go to Developer options and “Revoke USB debugging authorizations”, then try again.
“adb: command not found”: The package didn’t install correctly. Try reinstalling or check if the binary is in /usr/bin/adb or /usr/local/bin/adb. If not, use find / -name adb 2>/dev/null to locate it.
“insufficient permissions for device”: This is a udev issue. Ensure your user is in the plugdev group (Ubuntu) or add the udev rule as described above. Log out and back in after changing groups.
ADB server won’t start: Check if another process is using port 5037. Run sudo lsof -i :5037 and kill the process if needed, then run adb start-server.
Frequently Asked Questions
Do I need root access to install ADB? No, installing ADB via your package manager requires sudo, but using ADB with your device does not require root on your phone.
Can I install ADB without a package manager? Yes, you can download the platform-tools zip from the Android developer site, extract it, and run ./adb from that folder. Just make sure to add it to your PATH.
Is ADB the same as fastboot? No, they are separate tools. ADB works when Android is running; fastboot works in bootloader mode. Most distributions install both as part of the android-tools package.
Why does my device show as “offline”? This usually means the ADB version is too old or the USB connection is unstable. Update ADB, try a different port, and disable USB power saving if possible.
Can I use ADB over Wi-Fi? Yes, after a USB connection, run adb tcpip 5555, then adb connect <ip>:5555. You can then unplug the USB cable.
How do I uninstall ADB? Use your package manager: sudo apt remove adb, sudo dnf remove android-tools, or sudo pacman -R android-tools.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Unable to Uninstall Apps in Windows 11
- Roku Channel: 7 Ways to Watch & Stream
- Check AirPods Charging Case Battery Status
- iPhone Won’t Turn On: How to Fix a Dead Device
- How to Restore Missing Stereo Mix on Windows 10
- Fix Microsoft Teams Notifications Not Working on Mac