FORUMS
Remove All Ads from XDA

[Tutorial] How To Logcat

2,038 posts
Thanks Meter: 1,780
 
By paxChristos, Retired Forum Moderator on 22nd June 2012, 07:20 PM
Post Reply Email Thread
1st July 2012, 03:03 PM |#11  
mikef's Avatar
Retired Senior Moderator
Flag Vegas, Baby! Likes:XDA,Android Dislikes:Spammers
Thanks Meter: 5,169
 
More
Great guide, thanks! Found it through the portal. I just added to my sig so maybe it will help stop some of those questions.
The Following User Says Thank You to mikef For This Useful Post: [ View ] Gift mikef Ad-Free
1st July 2012, 03:05 PM |#12  
tranceph0rmer's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 68
 
More
Quote:
Originally Posted by paxChristos

What you'll wanna do is run the following,

Code:
 adb logcat *:E > crash.txt
And look at the output file specifically for lines that say 0x0deadbaad (if you see that, that means there's a problem with the Java libraries it references above it) otherwise look for other F/ lines, that'll point you in the right direction.

If you're having issues where and is not accessible for to buy having USB debugging turned off because of doing a /data wipe (factory data reset) first install a similar Rom (in your case, a prior, stable CM9, boot into it, turn on usb debugging, reboot into recovery & only write /cache & dalvik cache before installing the offending Rom & getting your logcat (sorry if I rambled, just got done working a double )

Pax

Sent from my R800x using Tapatalk 2


Thanks for the info.
Will do that the next time i get stuck at the boot animation :P
The Following User Says Thank You to tranceph0rmer For This Useful Post: [ View ] Gift tranceph0rmer Ad-Free
1st July 2012, 07:46 PM |#13  
riteshbendre's Avatar
Senior Member
Flag Mumbai, Maharashtra, India
Thanks Meter: 413
 
Donate to Me
More
can anyone tell me how to clear / reset logcat?

Thanks in advance
The Following User Says Thank You to riteshbendre For This Useful Post: [ View ] Gift riteshbendre Ad-Free
1st July 2012, 11:12 PM |#14  
paxChristos's Avatar
OP Retired Forum Moderator
Flag West Bend
Thanks Meter: 1,780
 
More
Quote:
Originally Posted by riteshbendre

can anyone tell me how to clear / reset logcat?

Thanks in advance

Why would you want to do that? :P

To my knowledge, the only way logcat is reset is if you reboot your phone.

That's why filtering your results is very helpful, because no matter how long it's been running, you can get the info that you want without extraneous information :P

Pax
The Following 2 Users Say Thank You to paxChristos For This Useful Post: [ View ] Gift paxChristos Ad-Free
2nd July 2012, 08:40 AM |#15  
Senior Member
Thanks Meter: 47
 
More
Thanks for the clarifications
2nd July 2012, 03:28 PM |#16  
klin1344's Avatar
Senior Member
Flag Cerritos, CA
Thanks Meter: 5,535
 
Donate to Me
More
Man thank you so much for the awesome guide!
Now I can actually filter out my logcat results instead of searching through the entire log.

Sent using Tapatalk
2nd July 2012, 05:54 PM |#17  
Senior Member
Flag Southern NH
Thanks Meter: 314
 
Donate to Me
More
Angry Helpful Tool
Quote:
Originally Posted by paxChristos

Here's how to use logcat.....

I have made a tool to simplify this for people. I will send you the .bat version, to see the validity of the file, and post the .exe for everyone else.
FIXED HUGE ISSUE CAUSING EMPTY FILES
DOWNLOAD

PM or post here if you run into any issues. They WILL be addressed.

I have made a tool to simplify Logcat creation for people. The creation of this tool was inspired, and guided, by the thread started HERE by paxChristos.


UPDATE 4.1
Corrected an issue causing empty files.

apparently, if the process id contained a space ( 1234) the file would parse correctly, but if the numbers came up to the parenthesis (12345) it would output an empty file named ACTIVITY(12345) with no extension.

This was a huge issue, and i apologize for not seeing it sooner. It has been corrected, and the logcat tool works better than ever. I just ran through a 20,000 line logcat without any empty files appearing.

a couple more things to help with stability.
Underscores (_) will be replaced by dashes (-)
Brackets ([]) and arrows (<>) will be replaced with paranthesis(())

-------------------------------------------------------------------------------------------------------------

HUGE UPDATE


Added the ability to "SUPER PARSE" Files, which separates files into folders by log level and creates a TXT file for each activity
Super parse DOES NOT Work with LONG format Logs.
SUPER PARSE is in its infancy I do expect errors, please let me know if you run into anything.
OLD STUFF


EDIT V3.6 DONE
Added ability to filter logcats by activity name. (logcat -s "FILTER")
Fixed Log Level Setting


EDIT V3.5 DONE

NOW PROPERLY PARSES "LONG" FORMAT LOGCATS.
Thank you to Senior Member jes0411 for pointing out the issues that lead me to create V3.4 and 3.5. If any of you have an issue please let me know. It could be hours before i get to it or weeks, but i will get to fixing it.

EDIT V3.4 DONE

Changed the way the date variable was handled to hopefully fix issues experienced by users of non-English versions of windows.

EDIT V3.3 DONE

EDIT V 3.2 Finished
Google code won't allow any new uploads, so i uploaded the new update to XDA in a ZIP file.

Fixed ADB Location settings, some users were having trouble if they input the ADB folder with any quotation marks in the path name, it will now automatically remove quotation marks to ensure correct syntax.
Fixed issue with ADB Location setting not exiting to previous menu.
Fixed issue with Log Level setting not exiting to previous menu.
Capitalized some stuff
Added a feature that will automatically create the selected folder if no output folder exists and the user attempts to run a log.
Added a check when selecting an output folder that will ask if you want the folder created if it does not exist


EDIT V3.1 DONE
FIXED OPTIONS 7 & 8, URLS WERE MISSING A "?"
CHANGELOG EDITS
SAVES AND PARSES FILES IN TO DIFFERENT OUPUT FILES BASED ON LOG LEVEL (E , I , D , W , ETC)



LOGCAT TOOL v1.1 by FuzzyMeep TWO

I made this in about a half hour, so if you fnd any issues let me know. I believe i worked out all functionality issues, and do plan on expanding functionality in the future.

reposted HERE

Edit: source here.
Batch Source

EDIT: UPDATED TO V1.1
added the framework to add filtering to your logcat, it is in the exe, but not utilized yet (still bugy). i have also worked out a few minor bugs in this release.
The Following 136 Users Say Thank You to FuzzyMeep Two For This Useful Post: [ View ] Gift FuzzyMeep Two Ad-Free
2nd July 2012, 06:20 PM |#18  
Member
Thanks Meter: 30
 
More
Very nice tut. Will try
2nd July 2012, 07:46 PM |#19  
mcmb03's Avatar
Senior Member
Flag Milwaukee, WI
Thanks Meter: 139
 
Donate to Me
More
thanks a ton for the in depth guide. I was always fairly confused on how to approach this, so now I'll have something to refer to in order to help all of the awesome devs here.
2nd July 2012, 07:59 PM |#20  
tranceph0rmer's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 68
 
More
Quote:
Originally Posted by mcmb03

thanks a ton for the in depth guide. I was always fairly confused on how to approach this, so now I'll have something to refer to in order to help all of the awesome devs here.

+1
9th July 2012, 03:40 PM |#21  
Member
Thanks Meter: 28
 
More
no logcat on jelly bean
Any way to get logcat to work on jelly bean ?
Post Reply Subscribe to Thread

Tags
how to logcat, logcat, logcat guide, troubleshooting guide

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes