Search code examples
commandadblogcatlifetime

Adb logcat crashes for many months


I'm working on a windows app to make diagnostics of android smartphone. This app is performing adb commands to get many system informations.

For many months, I'm working on study logcat to make apps statistics and count :

  • Crashes by app
  • Number of start by app (or last starting date)

I'm using the command below

adb logcat -d -b events -v time

Thanks to this, I can extract and analyse occurences of "am_crash" lines and "am_activity_resume" to get some informations, but it seems that the output of my command is limited in the time. I'd like to get informations for many months, or if possible for all the lifetime of the smartphone connected.

Could someone help me to find a workaround ?


Solution

  • logcat buffers are circular and have predetermined size. You can change the size but the change won't be persistent. There is no "workaround" for the stock Android. You would need a custom logging app which would save all the events you want to a separate log.