When you’re building Android ROMs, sometimes the system fails to boot and leaves you to debug what is going on. When that happens, you turn to the ever so trusty
adb logcat. But wait - the system is on a loop and is spewing logcats all over the place. What do you do?
Simple. You only look at the lines with the tag “E” in it. “E” for “Error”. Simple.
Until you realize, it’s like looking for needles in a haystack. There’s too many freaking logcat lines!
That’s why I wrote a parser to get rid of the useless lines.
Make a file called
parse.py and copy the following contents into the file:
OK, cool, so how do you use it? Simple. Just pipe logcat output like so:
adb logcat > crash.logcat
Then run the file like this:
The neatly formatted file should be at
output.logcat. Take a look and see what the bug is. Hope this helped!