[GUIDE] Easiest Way to Utilize Matlog

Search This thread

Train88

Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
Due to the numerous times we (Developers/Team BlackOut) have to ask for logcats on miscellaneous crashes, I searched for different guides to link people to. There are several, but none were as simple and straightforward to understand as the method that I personally use for both theme chooser and my Team BlackOut apps. You may have heard of, or used, Matlog before...But it appears that this method of using Matlog is not as well known (or only used by people like me), which is another reason I am creating this thread. NOTE: this method is for those who can replicate the actions needed to cause a crash fairly quickly (I hate long logcats!)

If you are a Team BlackOut follower, I assume you have read DJ's instructions on giving us a log before. It is simple and logical, but the information we need is not necessarily always in the screenshots you send us via that method.


YOU MUST BE ROOTED IN ORDER TO GET A LOGCAT (with apps like Catlog, matlog, or by using ADB).


PLEASE NOTE, THIS DOES NOT WORK FOR KERNEL RELATED ISSUES! Getting the "last_kmsg" from /proc/ is the best method for random reboots and other kernel related problems.


PROCEDURE:

1. Search for, and download, Matlog from the Play Store (or the Holo version floating around xda; I assume it works the same)
Play Store Listing


2. Long press on your homescreen, create the Matlog widget (1x1)






3. Click on the Matlog widget. This will prompt a dialog for you to change/confirm the name for the log's .txt file (if you so please)





4. Repeat the action (such as opening an app) that caused you to get a force close.



5. As soon as you get the "XXX has force closed/stopped working", go back to your homescreen (or whichever screen you placed the widget on) and click on the widget again. NOTE: This will open your recorded log within the Matlog app. Unless you know how to debug, you don't need to worry about that...you can just close it.





6. After exiting the log that you just recorded, open up the file explorer of your choice. Scroll down until you see the "catlog" folder. Inside of that will be "Saved Logs", which is where you will find the .txt file containing the recorded logcat.






7. Then send that puppy on over to your developer of choice. :D


AND THAT'S IT! :good: (Although, I must say...Please send them in a PM unless the devs specify otherwise. Logs quickly clutter threads IMO)
 
Last edited:

LeftyGR

Senior Member
Oct 18, 2011
2,120
1,712
Bloomington, IL
@Train88

Nice little writeup! It may be outside the scope of the thread, but you got any good resources for actually reading and using logs? Before I ask someone else to help me solve an issue I'm having with an app I'm inverting, I'd like to see if I can figure it out myself. Thanks!

Edit: nvm. I just found some stuff [emoji4]

http://xdaforums.com/showthread.php?t=2274119
 
Last edited:

Train88

Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
@Train88

Nice little writeup! It may be outside the scope of the thread, but you got any good resources for actually reading and using logs? Before I ask someone else to help me solve an issue I'm having with an app I'm inverting, I'd like to see if I can figure it out myself. Thanks!

Edit: nvm. I just found some stuff [emoji4]

http://xdaforums.com/showthread.php?t=2274119
While that is definitely a nice write up, it seems more for general debugging from quickly skimming it. There are ways for a log to point you directly to the mistake, but I just kinda learned as I went along with theming.

For example, I have this error, as we speak, with the newest Pandora.

4d39e697f69c0b3da443370e64025939.jpg



Because I've been responsible for Pandora and themed it so many times now, I know to go look in the android manifest and see what style is associated with that activity causing the error. Then I go redirect that style accordingly and hopefully its fixed lol [emoji28]

Team BlackOut... or Back Out
 

LeftyGR

Senior Member
Oct 18, 2011
2,120
1,712
Bloomington, IL
Yeah. So learning this is a bit o' trial and error. . Which is what I figured. I got two smali files that show errors, and I figured out the lines for each. But fuzzy past that right now. But if I follow your logic, it's a good bet the error is linked to those lines in smali and androidmanifest? Thanks for the reply, and I'll stop stretching the topic.
b4dda860d00c78e47e4d78b3d1ed32b9.jpg
 
  • Like
Reactions: Train88

Train88

Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
Yeah. So learning this is a bit o' trial and error. . Which is what I figured. I got two smali files that show errors, and I figured out the lines for each. But fuzzy past that right now. But if I follow your logic, it's a good bet the error is linked to those lines in smali and androidmanifest? Thanks for the reply, and I'll stop stretching the topic.
b4dda860d00c78e47e4d78b3d1ed32b9.jpg
Halfway... If you notice at the beginning of some layout lines, it will have something similar to a web address. Those are telling you where in smali those layouts are located. So if you find the smali file, do a search for it like you would searching in android (except with a period instead of "/")

Team BlackOut... or Back Out
 

Train88

Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
Yeah. So learning this is a bit o' trial and error. . Which is what I figured. I got two smali files that show errors, and I figured out the lines for each. But fuzzy past that right now. But if I follow your logic, it's a good bet the error is linked to those lines in smali and androidmanifest? Thanks for the reply, and I'll stop stretching the topic.
b4dda860d00c78e47e4d78b3d1ed32b9.jpg
Wait, I'm sorry but I just read your log... Did you try to build it as a signed install or did you flash it?

Team BlackOut... or Back Out
 
  • Like
Reactions: LeftyGR

Train88

Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
Ok... From what you've told me it sounds like a problem in layouts or styles. Unless you did try editing some smali. But I don't know anything any that app to help with their smali

Team BlackOut... or Back Out
 
  • Like
Reactions: LeftyGR

LeftyGR

Senior Member
Oct 18, 2011
2,120
1,712
Bloomington, IL
Ok... From what you've told me it sounds like a problem in layouts or styles. Unless you did try editing some smali. But I don't know anything any that app to help with their smali

Team BlackOut... or Back Out
Yeah I found a line that was semi-duplicated in strings, that was directly linked to a styles section specifically for yearview. I found a lot of jacked up stuff Samsung borked in their own app. Don't know how they got it to compile in the first place! I won't know if that was it til tomorrow. Thanks for the help!
 
Last edited:
  • Like
Reactions: Train88

Train88

Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
I'm glad you find it useful [emoji4]

But yes, last_kmsg is the way to go for kernel issues, or standard adb logcat (if the device boots). I originally made this for noobs who can't even provide logs for app crashes, but I may update it with more. But, there's already plenty of tuts explaining the other log methods. [emoji106]

Team BlackOut... or Back Out - "These colors that you've shined are surely not your style”
 
  • Like
Reactions: Primokorn

skingg

Senior Member
Dec 25, 2011
262
56
Google Pixel 7 Pro
I just installed catlog. Do I have to change anything in settings, like write period or something? I'm facing random reboots in my Kitkat rom (ported from Note 2 to S3) so does it mean I'll have to hit record and try to trigger the phone to reboot or something?

Kindly advice, thank you.
 

Train88

Recognized Themer
Oct 8, 2013
1,938
14,182
Greenville, SC
OnePlus 8
I just installed catlog. Do I have to change anything in settings, like write period or something? I'm facing random reboots in my Kitkat rom (ported from Note 2 to S3) so does it mean I'll have to hit record and try to trigger the phone to reboot or something?

Kindly advice, thank you.
This will not help determine the kind of problems a random reboot is caused by. You need to look in proc/last_kmsg, or send your dev the last_kmsg when that occurs

Team BlackOut... or Back Out - "These colors that you've shined are surely not your style”
 
  • Like
Reactions: skingg

Top Liked Posts

  • There are no posts matching your filters.
  • 44
    Due to the numerous times we (Developers/Team BlackOut) have to ask for logcats on miscellaneous crashes, I searched for different guides to link people to. There are several, but none were as simple and straightforward to understand as the method that I personally use for both theme chooser and my Team BlackOut apps. You may have heard of, or used, Matlog before...But it appears that this method of using Matlog is not as well known (or only used by people like me), which is another reason I am creating this thread. NOTE: this method is for those who can replicate the actions needed to cause a crash fairly quickly (I hate long logcats!)

    If you are a Team BlackOut follower, I assume you have read DJ's instructions on giving us a log before. It is simple and logical, but the information we need is not necessarily always in the screenshots you send us via that method.


    YOU MUST BE ROOTED IN ORDER TO GET A LOGCAT (with apps like Catlog, matlog, or by using ADB).


    PLEASE NOTE, THIS DOES NOT WORK FOR KERNEL RELATED ISSUES! Getting the "last_kmsg" from /proc/ is the best method for random reboots and other kernel related problems.


    PROCEDURE:

    1. Search for, and download, Matlog from the Play Store (or the Holo version floating around xda; I assume it works the same)
    Play Store Listing


    2. Long press on your homescreen, create the Matlog widget (1x1)






    3. Click on the Matlog widget. This will prompt a dialog for you to change/confirm the name for the log's .txt file (if you so please)





    4. Repeat the action (such as opening an app) that caused you to get a force close.



    5. As soon as you get the "XXX has force closed/stopped working", go back to your homescreen (or whichever screen you placed the widget on) and click on the widget again. NOTE: This will open your recorded log within the Matlog app. Unless you know how to debug, you don't need to worry about that...you can just close it.





    6. After exiting the log that you just recorded, open up the file explorer of your choice. Scroll down until you see the "catlog" folder. Inside of that will be "Saved Logs", which is where you will find the .txt file containing the recorded logcat.






    7. Then send that puppy on over to your developer of choice. :D


    AND THAT'S IT! :good: (Although, I must say...Please send them in a PM unless the devs specify otherwise. Logs quickly clutter threads IMO)
    6
    Mine to even though it's trouble shooting 101 basics.
    5
    Sweet!!!! Going in the sig!!! :good::good::good::good:
    4
    Mine to even though it's trouble shooting 101 basics.
    True, but unfortunately not everyone appears to know much of the logcat methods despite all the guides. None of them are technically difficult though

    Team BlackOut... or Back Out
    4
    @Train88

    Nice little writeup! It may be outside the scope of the thread, but you got any good resources for actually reading and using logs? Before I ask someone else to help me solve an issue I'm having with an app I'm inverting, I'd like to see if I can figure it out myself. Thanks!

    Edit: nvm. I just found some stuff [emoji4]

    http://xdaforums.com/showthread.php?t=2274119
    While that is definitely a nice write up, it seems more for general debugging from quickly skimming it. There are ways for a log to point you directly to the mistake, but I just kinda learned as I went along with theming.

    For example, I have this error, as we speak, with the newest Pandora.

    4d39e697f69c0b3da443370e64025939.jpg



    Because I've been responsible for Pandora and themed it so many times now, I know to go look in the android manifest and see what style is associated with that activity causing the error. Then I go redirect that style accordingly and hopefully its fixed lol [emoji28]

    Team BlackOut... or Back Out