Using adb logcat with a real phone (and not the emulator)

MyName picture MyName · Sep 14, 2010 · Viewed 65.4k times · Source

when I'm using the Android emulator I can do "adb logcat" to see output messages (log / system.out.println) originated from my code. It also shows the stack trace of exceptions which happen during execution.

But, when I'm using a real phone, "adb logcat" does not do / show anything.

I also tried "adb -d logcat" which also does not display anything.

Is there any way to get it working with the real phone?

Thanks.

UPDATE:

I just tried "adb -s ? logcat" ('?' is the serial number of the device) and also got no results.

I tried another "adb" command to see if anything was working: "adb -s ? bugreport". This printed a lot of stuff. Example: "Memory Info", "CPU Info" and some Java specific things. So it seams that some stuff is working.

Answer

AndreS picture AndreS · Mar 15, 2012
  1. Enable USB debugging in your device.

  2. Connect device to computer

  3. Use this commands

--> $adb devices (will give the "device id" that is connected) output ex. 82990AB830201D device

--> $adb -s "device id" logcat (you will be able to see your device logcat)

ex $adb -s 82990AB830201D logcat

I follow this steps and it works good.