Fix Ubuntu Fastboot Connection Issues
In this article
If your Ubuntu system cannot see your Android device in fastboot mode (e.g., fastboot devices shows nothing), the fix is usually a combination of enabling USB debugging, installing the correct USB driver, and adding a udev rule. This guide walks you through the exact steps to get a reliable fastboot connection on Ubuntu.
What You'll Need
- An Android device with USB debugging enabled (Settings > Developer Options > USB debugging).
- A USB cable that supports data transfer (not charge-only).
- Ubuntu desktop with sudo access.
- Internet connection to install packages.
Step-by-Step
- Install fastboot and adb – Open a terminal (Ctrl+Alt+T) and run:
sudo apt update
On newer Ubuntu versions (20.04+), the package names are
sudo apt install android-tools-adb android-tools-fastbootadbandfastboot. If the above fails, trysudo apt install adb fastboot. - Enable USB debugging on your Android device – Go to Settings > About Phone and tap “Build number” 7 times to unlock Developer Options. Then go to Settings > Developer Options and enable “USB debugging”. If you see a prompt on the phone to allow USB debugging, accept it and check “Always allow from this computer”.
- Set your phone to fastboot mode – Power off the phone, then press and hold the Volume Down + Power buttons simultaneously (for most devices; some use Volume Up + Power). You should see a fastboot menu. Connect the phone to your computer via USB.
- Check if fastboot sees your device – In the terminal, run:
fastboot devices
If it lists your device (e.g.,1234567890 fastboot), you’re done. If not, continue. - Add a udev rule for your device – Identify your device’s USB vendor ID. Run
lsusband find the line that shows your phone (it may show something likeBus 001 Device 003: ID 18d1:4ee0 Google Inc.). The 4-digit number before the colon (e.g.,18d1) is the vendor ID. Create a udev rule:sudo nano /etc/udev/rules.d/51-android.rules
Add this line (replace18d1with your vendor ID):SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"Save (Ctrl+O, Enter, Ctrl+X) and reload udev:sudo udevadm control --reload-rules
Unplug and replug the USB cable.
sudo udevadm trigger - Restart the adb server – Run:
sudo adb kill-server
Then check
sudo adb start-serverfastboot devicesagain. - Try a different USB port or cable – Use a USB 2.0 port directly on the motherboard (avoid hubs). Some phones only work in fastboot with a specific cable.
- If still not working, check for driver issues on the phone – On the phone, in fastboot mode, you may see a “fastboot” icon. If the phone shows a charging battery icon, it’s not in fastboot mode—it’s in download mode (for Samsung) or charging mode. Reboot into fastboot correctly.
Common Mistakes
- Not enabling USB debugging before entering fastboot mode—fastboot requires it to be on.
- Using a charge-only USB cable—try a different cable that you know transfers data.
- Forgetting to accept the RSA fingerprint prompt on the phone when connected in normal mode. This prompt must be accepted before fastboot will work.
- Running
fastbootwithout sudo when the device is not recognized—though after adding the udev rule, sudo should not be needed. - Using the wrong vendor ID in the udev rule—double-check with
lsusbwhile the device is in fastboot mode.
Tips
- Always run
fastboot devicesas a regular user after setting up the udev rule; if it works, you don’t need sudo. - If you have multiple Android devices, add a udev rule for each vendor ID.
- Keep your Android device’s USB debugging enabled even when in fastboot mode—some devices reset this setting.
- If you’re using a virtual machine, pass through the USB controller or device to the guest OS.
Troubleshooting
- fastboot devices shows nothing – Re-check the udev rule, restart adb server, and try a different USB port. Also, ensure the phone is actually in fastboot mode (not just plugged in while booted).
- Device shows as “?????” – This means the driver is not loaded. Run
sudo apt install android-tools-adbagain, and then checklsusbto confirm the device is present. - Permission denied when running fastboot – This is a udev rule issue. Make sure the rule file has the correct syntax and that you reloaded udev. You can also try
sudo fastboot devicesto test if it’s a permission problem. - Phone only charges, not recognized – The phone may be in charging mode. Reboot into fastboot using the correct button combination for your device model.
- fastboot works but commands hang – Try a different USB port, disable USB power management, or use a shorter cable.
Frequently Asked Questions
Why does fastboot not work on Ubuntu even after installing fastboot?
Usually it’s a missing udev rule or USB debugging not enabled. Follow the steps above to add the rule and enable debugging.
Do I need to install a specific driver for my phone?
No, Ubuntu uses the generic USB driver. The udev rule tells the system to allow access to the device.
Can I use fastboot over Wi-Fi?
No, fastboot only works over USB. There is no official wireless fastboot support.
What if my device’s vendor ID is not listed in lsusb?
If the device is not in lsusb, it’s not being detected at the USB level. Try a different cable/port, and ensure the phone is in fastboot mode.
Is it safe to run fastboot commands with sudo?
Yes, but after setting up udev rules, you shouldn’t need to. Using sudo is fine for testing.
Why does my phone show “unauthorized” when I run adb devices?
That happens when you haven’t accepted the RSA fingerprint prompt on the phone. Unplug, replug, and accept the prompt when it appears.