When I run adb -d logcat it dumps data from a time before. How old is that data?


Logcat displays Android's logs.

This is by definition information about things that happened in the past.

Android's logs are stored in a ring buffer and if full, the then oldest entries are overwritten. It depends on how much is being logged, when that happens. Besides this, the buffer is reset when you restart the phone, so logs cannot be older than the current uptime.

  • 1
    It also depends on the size of the ringbuffer, which might differ between devices (can be checked with adb logcat -g). There was also a way to adjust the buffer size, if I remember correctly (cannot find the reference currently) – but that would also be lost at reboot. – Izzy Oct 30 '13 at 21:56
  • Ok. So Android is permanently logging using a ring buffer, even if I don't use the logcat output, right? – whitenoisedb Oct 31 '13 at 0:04
  • That's right. Using a ring buffer has benefits. It only eats an (by the manufacturer adjustable) amount of RAM (and doesn't waste storage), respects your privacy (no data retentiob across reboots) while adding very little overhead to the system. It's essential for development and most of all for being able to send those half automatic bug reports to app developers ("include system logs"). – ce4 Oct 31 '13 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.