Essential Android ADB Android Debug Bridge edit forum

View logcat

You can run logcat as an adb command or directly in a shell prompt of your emulator or connected device. To view log output using adb, navigate to your SDK platform-tools/ directory and execute:

$ adb logcat

Alternatively, you can create a shell connection to a device and then execute:

$ adb shell
$ logcat

One useful command is:

adb logcat -v threadtime

This displays the date, invocation time, priority, tag, and the PID and TID of the thread issuing the message in a long message format.


Logcat logs got so called log levels:

V — Verbose, D — Debug, I — Info, W — Warning, E — Error, F — Fatal, S — Silent

You can filter logcat by log level as well. For instance if you want only to output Debug level:

adb logcat *:D

Logcat can be filtered by a package name, of course you can combine it with the log level filter:

adb logcat <package-name>:<log level>

You can also filter the log using grep (more on filtering logcat output here):

adb logcat | grep <some text>

In Windows, filter can be used using findstr, for example:

adb logcat | findstr <some text>

To view alternative log buffer [main|events|radio], run the logcat with the -b option:

adb logcat -b radio

Save output in file :

adb logcat > logcat.txt

Save output in file while also watching it:

adb logcat | tee logcat.txt

Cleaning the logs:

adb logcat -c

Table Of Contents
33 ADB Android Debug Bridge
64 Menu
112 Loader
119 Xposed
132 Colors
135 Fresco
140 AdMob
147 Button
156 Vk SDK
170 XMPP
176 OpenCV
200 FileIO
203 Moshi
217 Paint
231 AIDL
241 JCodec
243 Okio
255 Looper
  ↑ ↓ to navigate     ↵ to select     Esc to close