Android fastboot waiting for devices

146,219

Solution 1

The short version of the page linked by D Shu (and without the horrible popover ads) is that this "waiting for device" problem happens when the USB device node is not accessible to your current user. The USB id is different in fastboot mode, so you can easily have permission to it in adb but not in fastboot.

To fix it (on Ubuntu; other systems may be slightly different):

Run lsusb -v | less and find the relevant section which will look something like this:

Bus 001 Device 027: ID 18d1:4e30 Google Inc. 
Couldn't open device, some information will be missing
Device Descriptor:
...
  idVendor           0x18d1 Google Inc.

Now do

sudo vi /etc/udev/rules.d/11-android.rules

it's ok if that file does not yet exist; create it with a line like this, inserting your own username and vendor id:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", MODE="0640", OWNER="mbp"

then

sudo service udev restart

then verify the device node permissions have changed:

ls -Rl /dev/bus/usb

The even shorter cheesy version is to just run fastboot as root. But then you need to run every command that talks to the device as root, which tends to cause other complications. Simpler just to fix the permissions in the long run.

Solution 2

Just use sudo, fast boot needs Root Permission

Solution 3

To use the fastboot command you first need to put your device in fastboot mode:

$ adb reboot bootloader

Once the device is in fastboot mode, you can boot it with your own kernel, for example:

$ fastboot boot myboot.img

The above will only boot your kernel once and the old kernel will be used again when you reboot the device. To replace the kernel on the device, you will need to flash it to the device:

$ fastboot flash boot myboot.img

Hope that helps.

Solution 4

try to use compiler generated fastboot when this happes. the file path is out/host/linux(or other)/bin/fastboot and sudo is also needed. it works in most of the time.

Solution 5

On your device Go To Settings -> Dev Settings, And Select "Allow OEM Unlock" As shown on Unlock Your Bootloader

At least this worked for me on my MotoE 4G.

Share:
146,219

Related videos on Youtube

codereviewanskquestions
Author by

codereviewanskquestions

Updated on July 05, 2022

Comments

  • codereviewanskquestions
    codereviewanskquestions 6 months

    I am trying to load a customized kernel on my NVIDIA test git. I typed fastboot boot myImage after which which I get:

    <Waiting for device> 
    

    I think this is a problem with a driver on fastboot mode on my device. But I don't know how to install the driver on linux.

    Do you guys know how to install the driver?

    • phoad
      phoad over 7 years
      Try running with sudo. sudo ${which fastboot} devices wiki.cyanogenmod.org/w/UDEV
    • melissa_boiko
      melissa_boiko about 3 years
      Note for people web searching this error message—if you get this message with a Samsung device, use heimdall rather than fastboot.
  • poolie
    poolie over 9 years
    It does not need root permission, it only needs to be able to access the USB device.
  • Marian
    Marian about 9 years
    That answer is not helpful at all. Obviously the person asking knows that, because they already did execute that exact command.
  • Derek Gogol
    Derek Gogol about 9 years
    To successfully execute fastboot boot myboot.img command from console, the device needs to be in fastboot mode, and that's what I wanted to point out. Even if this doesn't help the person that asked the question, it probably will help someone else.
  • Mala
    Mala over 8 years
    this is exactly what i was stuck at for the past hour or so. Thanks!
  • abjbhat
    abjbhat over 8 years
    This worked for me. I just did adb reboot bootloader and then fastboot devices started to show the device connected.
  • espinchi
    espinchi over 8 years
    It actually does! You can also find this tip in wiki.cyanogenmod.org/w/…
  • espinchi
    espinchi over 8 years
    +1 for the shorter cheesy version. +2 if you put that last line on top
  • Benjamin Podszun
    Benjamin Podszun over 8 years
    It actually doesn't. A random wiki (i.e. something everyone can edit) doesn't change that. It needs to be able to access the USB device. It doesn't need root for that (though having root usually implies that it can access the USB device..)
  • Klik
    Klik almost 8 years
    You should definitely put that last line on top.
  • airtonix
    airtonix over 7 years
    btw, no one likes using vi... just use sudo nano filename instead.
  • orblivion
    orblivion over 7 years
    Well some of us don't like to run things as root willy nilly :P But, sudo service udev restart did not work, the permissions did not change. Poking around on the Internets ( bbs.archlinux.org/viewtopic.php?id=169103 ) the following worked for me: udevadm control --reload Followed by: udevadm trigger
  • Juan Carlos Alpizar Chinchilla
    Juan Carlos Alpizar Chinchilla over 7 years
    @BenjaminPodszun actually it does need root permission, I don't know whether it changes or not depending on OS, but running Fedora 22 just typing a fastboot command will get the 'waiting for device', but typing sudo fastboot command will actually execute the command. The fact you need to change the access to the user is because it's owned by a different user, which is what sudo does, escalate user permissions as long as they're on the sudoers group. Source? I just tried it a couple minutes ago
  • Benjamin Podszun
    Benjamin Podszun over 7 years
    @JuanCarlosAlpizarChinchilla you confuse things. No, you don't need root access. You just need access to the usb device. I don't know about Fedora specifically, but you do not need root. The right way to solve the issue would be to a) check the permissions on the usb device and add you to the group that has access (most likely) or b) change the udev rules to grant you access. You need access to a file/device, you don't need to run stuff with the most privileges your computer might grant. You can run sudo firefox, but you shouldn't. You can run sudo fastboot, but you shouldn't and don't need to
  • Sparr
    Sparr about 7 years
    sadly I'm at a point where adb reboot bootloader works fine, but fastboot [anything] still gets stuck at waiting for device
  • netvision73
    netvision73 about 7 years
    Needed root for me, Debian 8.1 on a LG G4.
  • Admin
    Admin about 7 years
    btw, no one likes vi... just use sudo vim filename instead. @airtonix
  • poolie
    poolie almost 7 years
    Who has a non-vim vi? :P
  • gihanchanuka
    gihanchanuka almost 7 years
    if sudo fastboot oem unlock isn't working, login as root with sudo -s, then run fastboot oem unlock. Worked for me on Ubuntu-14.04 x64.
  • Saahithyan Vigneswaran
    Saahithyan Vigneswaran over 5 years
    and you have to enable usb debugging in your android phone
  • mschilli
    mschilli almost 5 years
    Just my 2ct regarding the sudo vi discussion: I found sudoedit to usually do just what you want. And of course in my .zshrc it says export EDITOR=nvim. ;-)
  • Allexj
    Allexj over 4 years
    you just need to execute with SUDO
  • anutter
    anutter over 2 years
    @BenjaminPodszun Is completely wrong. sudo is an impersonation of root, not root. sudo is used almost everywhere in Linux, for almost every command, it's designed to work that way. Stop confusing sudo with su.
  • Benjamin Podszun
    Benjamin Podszun over 2 years
    @anutter You're missing the point entirely and .. are completely wrong. Neither su nor sudo are required, file system access to the USB device is. Fastboot doesn't need more. Your point is completely irrelevant (and confusing. If I use sudo to execute something impersonating root, that still means I get - limited - root access. Fastboot doesn't need root permissions).
  • anutter
    anutter over 2 years
    @BenjaminPodszun I didn't use fastboot 5 years ago, I used it this week. And that's irrelevant to the fact that you are giving misinformation based on your lack of understanding of fundamental Linux operations. sudo is a temporary elevation used to run commands on a program owned by root. The udev file changes you suggest are permanent. So your method is actually less secure. chown and chmod are certainly more dangerous in hands of less experienced users than a temporary sudo.