I'm looking for the log file(s) that are made by logcat. Where are they typically stored?
Asked
Active
Viewed 5.8k times
3 Answers
39
They are stored as circular memory buffers on the device. If you run "adb logcat > myfile" on your host system, you can retrieve the content into a file.

Ravi
- 3,718
- 7
- 39
- 57
-
1but how can I specify the program that I want to debug – Mohammed Subhi Sheikh Quroush Feb 14 '13 at 17:11
-
1you'll have to filter out entries that you don't want - for instance, with `grep -v`. – Michael Oct 04 '13 at 14:46
-
what if I have a device with buggy drivers (Moverio BT-200) and I can't do USB debugging via adb? Can I retrieve them in some other way? – ocramot Apr 07 '15 at 16:00
-
If everything is a file, where is that circular memory buffer file stored then? – mchid Mar 27 '17 at 22:29
-
@mchud "everything is a file" is wrong. It's in a **memory** area so this means if the device is powered off, it's immediately lost. – iBug Aug 25 '18 at 11:57
32
To get post-mortem information from a device it is helpful to see the timestamp as well. To let you know when the event occurred, try: adb logcat -d -v time > logfile.txt

Andro Selva
- 53,910
- 52
- 193
- 240

Tary
- 329
- 3
- 3
9
If you just want to see the current contents of the log, you can do adb logcat -d > myfile
It will exit after dumping the log.
(suravi's suggestion would be good if you wanted to watch the log while testing.)

Scott C Wilson
- 19,102
- 10
- 61
- 83