[HOWTO] Installing ADB and Fastboot on your computer

Get SDK tools package Find the “Command line tools only” section on the page linked and install the SDK tools package.

Windows users will need proper drivers installed on their computer: Universal ADB drivers.

Ubuntu users can use this method:
Open a terminal window and type:
sudo apt update
sudo apt install android-tools-adb android-tools-fastboot

To check ADB version type:
adb version

Sample output:
Android Debug Bridge version 1.0.36


So for a Ubuntu user?
How do I get Fastboot?
Many thanks!

1 Like

You can try and run the following command in a konsole

sudo apt-get install android-tools-adb android-tools-fastboot


Ok, I’ll try it!
Thanks @Manoj!

The Universal ADB drivers download is not working anymore. It gives a 404 error.
I’m assuming I need them in order to get /e/ on my phone.
Can anyone advise me on how to get the correct drivers?
Was planning to do an install on a FP3, and I’m running win10 in case it matters.
Thank you.

Windows 10 installs the necessary drivers automatically when you have the phone connected to the computer, you shouldn’t need an extra driver install.

Else … make sure you use the current Android SDK platform tools (these include the fastboot and adb commands).

1 Like

How to solve the “unauthorized” mention when using ADB on a Debian system.
I decided to add this little HOWTO in case others encounter the same problems I had when first installing the adb and fastboot tools for Android, as mentioned above.
I don’t know if this is any different on a Ubuntu system (probably not) but my MX-Linux running the latest Debian Buster ran into problems identifying my OnePlus 5T device. Here are the steps I took to solve them:

  1. After installing the above packages, then connecting your device via USB cable, you need to start the server
    $ adb start-server
  2. When running the command “adb devices” you then get the alphanumerical serial number followed by “unauthorized” then you have a problem with your USB debugging setup in the Developer options.
  3. Go to Settings > Sytem > Advanced > Developer options and under Debugging hit “Revoke USB debugging authorisations” after deconnecting the USB cable.
  4. On reconnecting the cable your device will display a pop-up asking for your permission using an RSA key to allow connection to this computer.
  5. Do a “adb kill-server” on reconnecting to your PC and then restart and you should see the same alphanumerical code followed by “device” meaning that you now have access to your phone.

I encountered this problem as I had previously used adb to install a ROM on another computer so my phone needed reauthorisation to connect again.
One additional problem with my OP5T device using Debian to get a PC connection was the error message:
$ $ADB_VENDOR_KEYS is not set
This I discovered is probably due to a standard set of rules in the file “/etc/udev/rules.d/51-android.rules” which I think is automatically installed by the Android-tools package under Debian. Unfortunately this file does not contain the correct identifier for my device. This is what I did using advice I found on Janos Gyerik’s blog:

  1. You need to find the correct Vendor ID of your device by running this command after re-plugging it into a USB port:
    $ sudo dmesg | tail
  2. From the print-out find the “idProduct” which in my case was “4ee7”. You should also see the same serial number that shows up from an “adb devices” command.
  3. Open then “51-android-rules” file mentioned above with an editor as root and add at the end these 2 lines:

SUBSYSTEM==“usb”, ATTR{idVendor}==“18d1”, ATTR{idProduct}==“4ee7”, MODE=“0660”,
GROUP=“plugdev”, SYMLINK+=“android%n”

  1. After saving the file running this command should confirm that a Google device is attached to your USB port:
    $ lsusb | grep oogle
    Presumably the “Google” reference is simply to show who made the Android system and not that your /e/ is re-Googled!
    If necessary, running the "“groups <your_user_name>” command will give a final confirmation that your are in the “plugdev” group and so allowed to run the adb tools from your command line.
    I apologise to any more knowledgeable users if my explanation is not quite correct or incomplete but with the help of Janos Gyerik these steps did at least succeed for me.

And if adb devices lists nothing (whilst Developer options, Root access is set to ‘ADB only’) then what is wrong?
I’ve a OnePlus 3T connected via USB and attempted in both ‘Charging only’ and ‘Transfer Files’ cable mode.
I’ve tried killing and restarting the adb server and switching adb root access on the phone off then on again.
Anyone able to help?

Oops. Fixed it! As well as giving Root Access to ADB Only (in Developer settings), it is also necessary to enable Android Debugging down in the Debugging section of those settings. (I am sing Android 7.1.2 (Nougat, I think), so your exact settings names may be different). Anyway, allow USB debugging or similar. All good!

1 Like