Android fastboot waiting for devices
Asked Answered
B

8

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?

Below answered 3/10, 2011 at 23:52 Comment(2)
Try running with sudo. sudo ${which fastboot} devices wiki.cyanogenmod.org/w/UDEVImponderable
Note for people web searching this error message—if you get this message with a Samsung device, use heimdall rather than fastboot.Phore
A
96

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.

Andesite answered 5/8, 2012 at 2:25 Comment(8)
+1 for the shorter cheesy version. +2 if you put that last line on topDizen
You should definitely put that last line on top.Nitramine
btw, no one likes using vi... just use sudo nano filename instead.Interlunar
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 triggerNegotiable
btw, no one likes vi... just use sudo vim filename instead. @InterlunarLusty
Who has a non-vim vi? :PAndesite
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. ;-)Transmontane
you just need to execute with SUDOShooter
V
90

Just use sudo, fast boot needs Root Permission

Vaenfila answered 17/12, 2012 at 12:15 Comment(11)
It does not need root permission, it only needs to be able to access the USB device.Andesite
It actually does! You can also find this tip in wiki.cyanogenmod.org/w/…Dizen
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..)Cutty
@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 agoGeometrician
@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 toCutty
Needed root for me, Debian 8.1 on a LG G4.Tideway
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.Hypoblast
and you have to enable usb debugging in your android phoneMassachusetts
@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.Campania
@Campania 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).Cutty
@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.Campania
F
33

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.

Forego answered 23/10, 2013 at 4:37 Comment(5)
That answer is not helpful at all. Obviously the person asking knows that, because they already did execute that exact command.Ferule
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.Forego
this is exactly what i was stuck at for the past hour or so. Thanks!Capitally
This worked for me. I just did adb reboot bootloader and then fastboot devices started to show the device connected.Supererogation
sadly I'm at a point where adb reboot bootloader works fine, but fastboot [anything] still gets stuck at waiting for deviceInhabit
R
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.

Rematch answered 30/11, 2016 at 1:59 Comment(0)
S
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

Sparks answered 3/11, 2016 at 12:33 Comment(0)
B
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)

Barbados answered 6/3, 2014 at 11:55 Comment(0)
C
0

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.

Conservatory answered 21/1, 2016 at 20:42 Comment(0)
J
0

You may have everything OK but the device only allows you to execute one fastboot command. If you can successfully do a fastboot devices but you then try a fastboot oem unlock and you get the dreaded waiting for devices, try executing fastboot oem unlock directly after doing the reboot to fastboot without executing any other commands.

Journey answered 15/3 at 9:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.