adb logcat hangs with "waiting for device" message
Asked Answered
M

16

37

When I type adb devices command on terminal, it shows device is connected

List of devices attached

0123456789ABCDEF device

But when I type adb logcat command, it hangs with below message

waiting for device

Can anybody tell me what is the problem behind this? I test the device on cts.

Manganese answered 4/4, 2012 at 5:41 Comment(7)
can you check if the adb devices shows your device to be offline?Fredrickafredrickson
yea, Its show only device stopped, not offlineManganese
Can you add the output of the "adb devices" in you question please.Fredrickafredrickson
Its allready added, Waiting for device many timesManganese
In your question you say you see inforamtion about devices "When I type adb devices command on terminal then I show the information about device" . Now you say you see " Waiting for device" when you type "adb devices" . Are you sure?Fredrickafredrickson
oh sorry, after type adb devices I see List of devices attached 0123456789ABCDEF device and after typing adb logcat I see waithing for deviceManganese
Can you add full output of the "adb devices" in you question please.Fredrickafredrickson
F
28

I am not pretty much sure if this works for you but can you please try the steps below:

# Kill and restart      
$ adb kill-server      
$ adb start-server     
 daemon not running. starting it now *      
 daemon started successfully *         

# Device appears, but is listed as offline

$ adb devices      
$ adb logcat
Fredrickafredrickson answered 4/4, 2012 at 6:43 Comment(2)
Changing the USB connection type from Charging to File Transfer did the trickHoboken
@Hoboken That is the simplest solution of all, why not post it as a proper answer?Polychromatic
N
6

I have also experienced similar problems I think I solved it by having the USB debugging option switched on within Developer Options in Settings.

REPEAT The following steps above, it should work!

Natishanative answered 29/1, 2013 at 16:48 Comment(0)
D
5

Here is yet another potential method to solve this -- in the past, the above solutions will work, but in my case, this time, this was the thing that fixed it:

  1. Plug device into USB
  2. Settings -> Developer Options
  3. Revoke USB Debugging Authorization
  4. Unplug Device
  5. Repeat Step 1
  6. Authorize Device
  7. Repeat Steps 4&5

adb devices should now show device

adb logcat should now output logs from device

Dworman answered 1/6, 2015 at 5:10 Comment(2)
What does "Authorize Device" mean? This all sounds good, and all the rest made sense, but I have not a clue what that means .. It's not in Android settings.Heisser
Its a dialog that the Android device should throw up automatically for you upon connect.Dworman
P
3

I got Nexus tab today and I had to go to Settings -> About Tablet -> (tap 7 or 8 times) on Build Number.

Then 'Developer Options' showed up above 'About Tablet'.

Next in Developer Options, after enabling USB Debugging I was able to get the logs

For Mac Users:

cd /Applications/Android/sdk/platform-tools

./adb logcat

Puling answered 15/12, 2013 at 20:28 Comment(0)
K
2

I had this same problem on Ubuntu 12.04. Thankfully MickeyMicro had the solution that worked for me:

  1. Run the command: gksudo gedit /etc/udev/rules.d/51-android.rules

  2. Add the following line to the blank file

SUBSYSTEM=="usb", ATTR{idVendor}="2080", MODE="0666" (I used this one on 12.04)

SUBSYSTEM=="usb", SYSFS{idVendor}="2080", MODE="0666" (Another recommended for 10.04)

  1. Save and close gedit.

  2. Run the command: sudo chmod a+rx /etc/udev/rules.d/51-android.rules

  3. Restart the system.

  4. Run the command: sudo sh -c "mkdir -p ~/.android; echo 0x2080 > ~/.android/adb_usb.ini; adb kill-server; adb devices"

  5. Verify that you have permissions to access the device. adb devices should return normal response, rather than a "???????????? no permissions" message.

http://forum.cyanogenmod.com/topic/23163-need-help-for-adb-connection-on-ubuntu/

Kurdistan answered 31/8, 2012 at 18:24 Comment(0)
C
2

When I have experienced this infinite "waiting for device" on Windows I had simply forgotten to enable usb-debugging in the developer options of my device.

Crumpton answered 14/5, 2014 at 15:24 Comment(0)
I
1

What OS are you using? It can be a variety of different reasons. Did you make sure you only have either the emulator running or a device attached? If so, you can direct your adb command by using the -d or the -e flag.

Intravenous answered 4/4, 2012 at 6:3 Comment(0)
S
0

I had similar problem on Galaxy S3, with adb running on Ubuntu 11.10 OS. In my case, If I reconnect the device (pull the USB connection and reconnect it), the log cat starts working. This happens only for the first time I connect the device after powering it up. Once logcat starts working, then it continues to work smoothly, without needing to reconnect.

Shopping answered 2/7, 2012 at 11:47 Comment(1)
the same worked for windows 10 also (x64 to be specific). Just make sure u have got an updated version of adbChalcis
M
0

This happend to me on OS X mountain lion. To fix it I had to
open Activity Monitor, filter all processes named "adb" and force quit them (I had 3 running). Then reconnect the device and everything was working again.

Mancino answered 23/8, 2012 at 12:28 Comment(0)
D
0

On my Samsung Galaxy S4 I had the same problem but after 10-20 seconds a dialog pops up on the phone where I have to accept the debug request

Dorsal answered 12/3, 2014 at 9:25 Comment(0)
D
0

I had a similar problem, but for different reasons. My issue came from programing usb accessory on android, which changes the vid/pid when in accessory mode. The solution for me that worked was the following:

  1. Connect the phone
  2. Run the usb host side accessory mode commands (Example website: http://android.serverbox.ch/?p=262 )
  3. Phone should have reconnected in accessory mode (Ensure the PID has adb: 0x2D01)
  4. adb kill-server
  5. sudo adb start-server (This caused the phone to re-ask auth permission)
  6. adb logcat (In my case I wanted to watch the logs, this now worked in accessory mode)
Demeter answered 4/9, 2015 at 23:13 Comment(0)
M
0

In my case, I was using an old version of adb, make sure you have the latest version of adb. You can download here, extract and run straight within the folder ./adb.

Mymya answered 15/3, 2018 at 20:3 Comment(0)
C
0

Please go to the developer options on the phone and click "Revoke USB debugging authorization"

Enable it again and try to get the logs. This is basically waiting for the device to get connected. Make sure to authorize USB access from device as well.

Carlina answered 1/1, 2019 at 14:31 Comment(0)
E
0

In my case just change the option of USB settings from transferring files to MIDI

Eskimoaleut answered 10/7, 2020 at 9:4 Comment(0)
H
0
  1. Enable USB debugging in Developer options
  2. Set File Transer in USB Preferences

did the trick for me! also running adb as sudo might help.

Handclasp answered 4/11, 2020 at 10:13 Comment(0)
S
0

In my case I was using a device connected with Ethernet that runs Android, and I did these steps to solve the problem. Before, make sure OTG is on.

  1. $ adb kill-server
  2. $ adb connect [your device IP]
  3. I accepted the connection request on the pop-up that appeared on the device
  4. $ adb devices: to check that the device is connected
  5. $ adb logcat
Stook answered 22/12, 2021 at 11:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.