I'm trying to unlock my Moto phone using ADB but I when I do a fastboot devices I keep getting

no permissions   fastboot

Even sudo fastboot devices is not helping

with sudo I get this sudo: fastboot: command not found


8 Answers 8


Try using sudo $(which fastboot)

for instance sudo $(which fastboot) devices

also sudo $(which fastboot) oem unlock

  • That worked!! Thankyou Srinivas..
    – Rupali
    Commented Dec 3, 2015 at 15:59
  • glad I could help :) Commented Dec 3, 2015 at 16:08
  • 9
    There must be a better solution, it's not safe and not good practice to just run everything with root permissions.
    – elichai2
    Commented Feb 13, 2016 at 20:19
  • 2
    Does fastboot require sudo? Commented May 14, 2017 at 13:15
  • 1
    @IgorGanapolsky No, just install android-sdk-platform-tools-common to get missing udev rules, defined in /lib/udev/rules.d/51-android.rules.
    – pevik
    Commented Feb 14, 2020 at 13:35

Found a better solution over here:

Here is the comment:

Instead of forcing permissions via sudo each time you need to run fastboot, you can permanently fix the issue:

  1. use lsusb to identify your device USB VendorID
  2. configure udev to set proper permissions when your device is plugged in
  3. profit!

As a bonus - it will be fixed for adb too.

For example, in my case (for 'Megafon SP-A20i') :

$ fastboot devices
no permissions  fastboot
$ sudo fastboot devices
[sudo] password for kaa: 
MedfieldA9055F28    fastboot

Let's fix:

First, we need to identify the device:

a) look for usb bus number (hack: I know the device is Intel-based one)

$ fastboot -l devices
no permissions         fastboot usb:1-1.2
$ lsusb |grep 001 |grep -i intel
Bus 001 Device 044: ID 8087:09ef Intel Corp. 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub

b) look for other Intel devices:

$ lsusb |grep 8087
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 044: ID 8087:09ef Intel Corp. 
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub

Hubs are not smartphones definetely, so - USB vendorID we need is "8087".

Second, configure udev (you must replace "idVendor" value with yours) :

$ sudo sh -c "echo '# Megafon SP-A20i' >> /etc/udev/rules.d/51-android.rules"
$ sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"8087\", MODE=\"0666\", GROUP=\"plugdev\"' >> /etc/udev/rules.d/51-android.rules"
$ sudo service udev restart
udev stop/waiting
udev  start/running, process 1821

Third, re-plug your device to allow udev to perform it's magic.

Final check:

$ fastboot -l devices
MedfieldA9055F28       fastboot usb:1-1.2
$ adb devices
List of devices attached 

$ fastboot reboot

finished. total time: 0.253s
$ sleep 90
$ adb devices
List of devices attached 
MedfieldA9055F28    device




My Solution

Thanks to elichai2 and this link and list I was able to solve my fastboot permission issue.

I have the Google Nexus 6P so I used the following for my Vendor ID:

Google - 18d1


If you use the following command:

sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"8087\" ..."

copy it exactly. I was already root and tried to copy just the echo portion which gave me undesirable results. Basically it put the \" in the .rules file rather than interpreting the slash as the escape character.

I suggest using the following if you already root creating the .rules file (Use your vendor ID).

echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"' >> /etc/udev/rules.d/51-android.rules

Udev Reload and Trigger

I reloaded the udev rules and then issued the trigger command. I also unplugged and plugged the usb for good measure.

udevadm control --reload
udevadm trigger


As an unprivileged user I then ran:

fastboot devices

and it worked as desired. I hope this can be of use or help to anyone that experiences trouble with the permissions issue.

  • Nice, I gave the link to the list in reply to my comment.
    – elichai2
    Commented Oct 24, 2016 at 19:25
  • udevadmin: command not found Commented May 14, 2017 at 13:17
  • 1
    @IgorG. My apologies for such a late reply. I fixed the above typo. It should have been "udevadm". Commented Jul 8, 2018 at 8:40

when i need to send some commands using fastboot ( flashing firmware on htc device for example ) i do install fastboot using apt

sudo apt install android-tools-fastboot

then when i start use it first command is

sudo -s

then all commands in this terminal will run as root sending commands like

fastboot devices
fastboot reboot-bootloader 
fastboot oem rebootRUU 
fastboot flash zip xxxx.zip

no need for fix or something it's simple one extra command before start it


Or you can add all the udev rules: Full set of Android USB vendor ID rules for Linux https://gist.github.com/jdamcd/6054951#file-51-android-rules


It's a problem with missing udev rules, defined in /lib/udev/rules.d/51-android.rules. Instead of creating udev rules manually (as Brandon Authier suggests), it's just better to install package android-sdk-platform-tools-common which contains it.

apt install android-sdk-platform-tools-common

`$ fastboot devices

no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html] fastboot`

`Solution: $lsusb

Bus 003 Device 040: ID 18d1:d00d Google Inc. Android`

sudo sh -c "echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"' >> /etc/udev/rules.d/51-android.rules"

sudo service udev restart

re-plug your device to allow udev to perform it's magic.


First install fastboot from apt:

sudo apt install android-tools-fastboot

Next execute fastboot with sudo:

sudo fastboot

It works for me.

  • Fastboot can also be gotten from SDK, and just set an alias path in .bashrc Commented May 14, 2017 at 13:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .