79

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?

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
codereviewanskquestions
  • 13,460
  • 29
  • 98
  • 167
  • 8
    Try running with sudo. sudo ${which fastboot} devices http://wiki.cyanogenmod.org/w/UDEV – phoad Jul 01 '15 at 02:00
  • 1
    Note for people web searching this error message—if you get this message with a Samsung device, use heimdall rather than fastboot. – melissa_boiko Dec 09 '19 at 20:28

7 Answers7

97

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.

poolie
  • 9,289
  • 1
  • 47
  • 74
  • 31
    +1 for the shorter cheesy version. +2 if you put that last line on top – espinchi Jul 01 '14 at 05:13
  • 7
    You should definitely put that last line on top. – Klik Feb 01 '15 at 02:34
  • 1
    btw, no one likes using vi... just use `sudo nano filename` instead. – airtonix May 02 '15 at 00:43
  • 6
    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 ( https://bbs.archlinux.org/viewtopic.php?id=169103 ) the following worked for me: `udevadm control --reload` Followed by: `udevadm trigger` – orblivion Jun 24 '15 at 04:46
  • 5
    btw, no one likes vi... just use `sudo vim filename` instead. @airtonix –  Dec 21 '15 at 15:50
  • 2
    Who has a non-vim vi? :P – poolie Dec 23 '15 at 01:37
  • 1
    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`. ;-) – mschilli Mar 13 '18 at 13:54
  • you just need to execute with SUDO – Allexj Jul 13 '18 at 21:16
89

Just use sudo, fast boot needs Root Permission

fancyPants
  • 50,732
  • 33
  • 89
  • 96
Saleh Abdulaziz
  • 1,115
  • 9
  • 15
  • 15
    It does not need root permission, it only needs to be able to access the USB device. – poolie Apr 21 '13 at 10:16
  • 5
    It actually does! You can also find this tip in http://wiki.cyanogenmod.org/w/Doc:_fastboot_intro#.3Cwaiting_for_device.3E_errors – espinchi Jul 01 '14 at 05:12
  • 12
    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..) – Benjamin Podszun Jul 15 '14 at 18:41
  • 1
    @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 – Juan Carlos Alpizar Chinchilla Aug 29 '15 at 12:01
  • 6
    @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 – Benjamin Podszun Aug 30 '15 at 18:23
  • 1
    Needed root for me, Debian 8.1 on a LG G4. – netvision73 Nov 30 '15 at 09:49
  • 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. – gihanchanuka Jan 13 '16 at 06:11
  • and you have to enable `usb debugging` in your android phone – Saahithyan Vigneswaran May 19 '17 at 14:52
  • @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`. – anutter Jul 16 '20 at 17:19
  • @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). – Benjamin Podszun Jul 17 '20 at 18:31
  • @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`. – anutter Jul 18 '20 at 19:19
34

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.

Derek Gogol
  • 1,292
  • 16
  • 15
  • 8
    That answer is not helpful at all. Obviously the person asking knows that, because they already did execute that exact command. – Marian Dec 13 '13 at 16:36
  • 8
    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. – Derek Gogol Dec 14 '13 at 20:10
  • 5
    this is exactly what i was stuck at for the past hour or so. Thanks! – Mala Apr 23 '14 at 08:14
  • 3
    This worked for me. I just did adb reboot bootloader and then fastboot devices started to show the device connected. – abjbhat Jun 27 '14 at 02:09
  • 5
    sadly I'm at a point where `adb reboot bootloader` works fine, but `fastboot [anything]` still gets stuck at waiting for device – Sparr Nov 16 '15 at 20:37
3

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.

wossoneri
  • 317
  • 2
  • 11
2

In my case (on windows 10), it would connect fine to adb and I could type any adb commands. But as soon as it got to the bootloader using adb reboot bootloader I wasn't able to perform any fastboot commands.

What I did notice that in the device manager that it refreshed when I connected to device. Next thing to do was to check what changed when connecting. Apparently the fastboot device was inside the Kedacom USB Device. Not really sure what that was, but I updated the device to use a different driver, in my case the Fastboot interface (Google USB ID), and that fixed my waiting for device issue

Poul Kruijt
  • 69,713
  • 12
  • 145
  • 149
1

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.

clearlight
  • 12,255
  • 11
  • 57
  • 75
jjyepez
  • 352
  • 3
  • 7
0

The shortest answer is first run the fastboot command (in my ubuntu case i.e. ./fastboot-linux oem unlock) (here i'm using ubuntu 12.04 and rooting nexus4) then power on your device in fastboot mode (in nexus 4 by pressing vol-down-key and power button)

Robin Green
  • 32,079
  • 16
  • 104
  • 187
Ankur_Jatt
  • 241
  • 2
  • 4