yashsingh1/xdaforums huggingface dataset:
[Android General] ktmom:
I'd use logcat through ADB to grab as much as possible.
[Android General] drewski_1:
i think you mean "logcat" through ADB? Catlog is a specific logcat App which i don't think would be able to use during a re-start.

[MENTION=6275958]IamChapita[/MENTION], in addition to logcat's, the LAST_KMSG could have useful information on the cause of a restart

cat /proc/last_kmsg >/sdcard/last_kmsg.txt
[Android General] raghuM:
Hi,

i have been using your tool for quite a long time but the only thing which has been bothering me is the adb location. It automatically reverts to the default setup when the program is closed and reopened. So i always have to set it to my custom location whenever i re run the tool. Is there anything i could do for it to recognise my location as default?

Thanks
[Android General] K2silver:
okaaay so first timer here using LogCat, I d/l the app thru Google store started the log and went into Clash Royale (I have been having problems with sound cutting in and out esp at beginning after dev logo, staying off often having to restart the app a few times)

After the error had happened I exited and then paused the LogCat. WOW there are a lot of lines of code....so many :eek: but the /E /F thing was pretty staright forward.

So do I upload these error lines to the forum for help?? As I may be able to locate them but as far as this goes I am lost. Anyways thanx XDA

p.s I am running Superman ROM +Magisk idk if that matters.
[Android General] ktmom:
What app are you using, CatLog? It's been awhile since I've used that one but I think you can long press on the log line to copy to clipboard. I use Matlog which has a file save option in it's 3-dot menu.
[Android General] IronTechmonkey:
+1 to Matlog, which is a continuation of Catlog, now being developed by a different developer, effectively the replacement for Catlog. It also has a filter for some private information, and as you describe, can save the file.
[Android General] rybshik:
hangs up/freezes on Restart; how to capture?

My phone started to hang up/freeze on Restart.

After I click on Restart, the phone freezes and no longer responds.

So I have to long press Power button to reboot it.

How to capture the Logcat file which includes reboot events, so it will be available after the reboot?

UPDATE:

installed catlog app on my rooted phone, now have access to the log file.

What event to filter out/look for?

What event name is associated with a (normal) reboot?
[Android General] CassidyClay:
What to look for

I have I have a rooted a7 edge and I'm pretty sure I either have a spy app on my phone or my phone has been hacked somehow and I was curious of how to use alogcat to see maybe what to look for is there any certain words or terms I should look for to see if I've been hacked? Another question, why is it that everytime I go to XDA website or app or anything it turns my phone into a slug and takes forever to load a webpage or to change pages it's like I want back to dial up every time anything XDA comes on my phone?

---------- Post added at 05:13 PM ---------- Previous post was at 05:11 PM ----------

I have I have a rooted a7 edge and I'm pretty sure I either have a spy app on my phone or my phone has been hacked somehow and I was curious of how to use alogcat to see maybe what to look for is there any certain words or terms I should look for to see if I've been hacked? Another question, why is it that everytime I go to XDA website or app or anything it turns my phone into a slug and takes forever to load a webpage or to change pages it's like I want back to dial up every time anything XDA comes on my phone?
[Android General] The Analog Kid:
Use an app called "Network Connections" from Play Store. It tells you. Can also try "Anti Spy Mobile". As for logcat use, refer to first OP post. About the slug thing, better Google it as "Samsung A7 became sluggish", you could find lots of guidance and fixes for the particular, or simply go to XDA A7 forums. It sounds like a saturated RAM generic issue to me, anyway. If your phone is rooted, fixes multiply
[Android General] CassidyClay:
Thanks for the reply. I also wanted to add that the word bot came up alot. Like after every apn...like dun_bot. I saved a bunch of my logcats but erased them when i wiped my phone and started all over.
[Android General] The Analog Kid:
Well, I must confess that "bot" thing goes beyond my knowledge. I strongly suggest you to go straight to your device's related forums. Since there's nothing new under the sun, sure there's an answer lurking around
[Android General] qarib01:
Fingerprint scanner not working after installing aosp extended rom

Fingerprint scanner not working after installing aosp extended rom
[Android General] bdwilk:
Sorry but what are you expecting here? No logs, no information, not even device, flashing method, mods, kernel. I could go on but I'm really curious as to what kind of help you expect with the statement you just gave.
[Android General] PackElend:
I'm quiet a noob in regard to logcat. I got it to work and my logs seem to be usable but I don't realy know what I did.

Based on endles reading and trying I figured out that that I can retrive logs as soon as logcat viewer is connected to my phone. There are multiple viewers on available as disussed in stackoverflow- android desktop log viewer or do it only by the means of ADB (in conjuction with LineageOS bug report).

Furthermore I found good explanation aboute the log levels and message types.

But what do you do when you on the move with phone. I know there a plenty of apps. I used aLogcat root but it exported only a fraction of the live log, whyever?

mLogcat allowed me to save huge logs what began before I connected it to a desktop PC. I cannot explain how that is possible sine any other viewer shows only live logs and may shows only a limited number of log entries.

So I would like to know how is the loging process started and how it is ended. Is there any command or does an logcat app need to run. If an app is neccesary, does it have to run in the foreground or background?
[Android General] ktmom:
Try using MatLog. I think you'll find it more user friendly. Generally when you open a logging app, it starts capturing the log.
[Android General] PackElend:
thx will give MatLog a try but can you explain what initiated the logging process. I'm able to read older logs with mLogcat but I have absolutely no clue how! I need those information since I have to do some debugging when I'm on the move and I cannot monitor the logcat app all time long.

I'm running LinageOS 14.1
[Android General] CrazyGenius:
Hi, thank you very much for the tutorial, it makes me very happy! How to access the system's old log records?
[Android General] CrazyGenius:
Hi again, without much talk, reporting the problem. After installing Xposed Framework, restarted the device and entered BootLoop. ADB device not detected during bootloop. To solve so the problem, how can I log? Please help me!
[Android General] Pkt_Lnt:
Read the first posts of *this* logcat tutorial thread, that is why this thread exists. :good:
[Android General] CrazyGenius:
Thank you very much for your quick response and, I apologize for bothering you yet, i have a question. As I said in the previous message, device stays in bootloop and ADB device is not detected. İn that case, how do I logging with logcat?

Thank you very much for your help!
[Android General] bdwilk:
Try this. It's a on the first page, a few posts in.

https://xdaforums.com/showthread.php?t=1726238&p=28132549

Edit..just saw you said ADB is not detected.
[Android General] CrazyGenius:
Thanks so much!
[Android General] CrazyGenius:
I looked at the last_kmsg file and everything is fine.
[Android General] night0crawler:
Good day everyone. Well I know nothing about taking a logcat and I had this issue with this application (Injected YouTube Playback) so the developer asked for a logcat and someone directed me to this thread to have information about how to take logcat.

I've downloaded this application 'Catlog' the link to which was provided in this description & I don't know how to use it?

Can anyone help me out here and tell me what steps should I follow to take the required logcat?
[Android General] ktmom:
This guide is a little more user friendly; Guide: Sending a Logcat to Help Debug Your Favorite App.
[Android General] stackz07:
https://drive.google.com/file/d/1LPJduV6jfEcpuUiwmD9csst2CaQM0vRE/view?usp=drivesdk

Log of lmt crashing when trying to add "trello add card" shortcut to a pie button.
[Android General] spicediablo:
Hi,

May I know if I can post my logcat here for troubleshooting? I have been having random freezes miui9. Hope experts here can help to decode the logcat. Thanks!
[Android General] tripLr:
No post it in the Rom thread for your device

---------- Post added at 05:57 AM ---------- Previous post was at 05:51 AM ----------

If you are rooted...

Install alogcat root.

It allows you to visually look at your log, and export to a text file

I would also install terminal.

The u can use the adb commands on your phone

If you open a shell on your phone , you can use all the same commands to access info on your kernel and device you can in a window. Fun fun
[Android General] ktmom:
Post a link to pastebin.com where you have uploaded the log. Include the link in a post where you have described your device, ROM, whether you have recovery and what version what the problem is and how to reproduce it.

Posting in your device thread is an option also.

I can tell you haven't read this thread [emoji6]. All of those options are discussed throughout the thread. You may be missing the point that the ability to grab a logcat from the PC can facilitate sorting through thousands of lines of entries , capturing a log without having to toggle back and forth between the log app (or terminal in your case) and the problematic app, or maybe because the device is boot looping or otherwise not fully functional.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Android General] spicediablo:
Indeed. Guilty as charged. But thanks for the lengthy and informative explanation. I tried doing logcat by terminal but couldnt actually capture the error...
[Android General] tripLr:
If you run alogcat as root, you can let it run in the background,

Then repeat the program you have problems with a couple 3 times,. And go back to alogcat, pause recording and read thru your logs backward till you you see your program.

So as example

I have been testing my note 4 verizion

Amazon Kindle kept crashing

I saw in logs, buffer crashes.

Turned on multi process webview . as others have reported problem, then because I posted this, others reported that in the builds only 2 CPUs were active.

So by learning to read logs posting and reporting problems helps the entire community
[Android General] krabban:
I'm a noob at grabing logcats never done it before and at the moment I don't have a computer . Tried with some apps but I'm getting big logcats with error in magisk 15.3 om Oreo 8.1 . When I try to open SuperSU in magisk it's force closing
[Android General] ktmom:
Try using MatLog. Open it, go to the 3-dot menu and select clear, then open Magisk manager and try to open superuser (that's what I think you mean, not SuperSu). When it crashes, go back to matlog and tap the pause button. Now try searching on magisk and see if you get errors. With it paused, you can save the captured log to a file then you'll have it to peruse.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Android General] krabban:
Thanks will try that. Flashed latest magisk 15.4 but also crashing
[Android General] ktmom:
Are you dirty flashing your ROM between Magisk versions? Using the Magisk uninstaller first?

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Android General] guest4711:
It's a little bit OT here, but did you give the last Magisk Manager (beta) https://xdaforums.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589/post75610628 a try? There are reports this build is running fine...
[Android General] krabban:
Yes but same issue. But the link you gave me , they had

A solution with the force closing. Thanks !
[Android General] reilus:
How do I use ADB on my PC? All I get is: 'adb' is not recognized as an internal or external command,

operable program or batch file.

It says this whether I run from command line or android studio. What am I doing wrong?
[Android General] johnlgalt:
You need the Android SDK, or at the very least, the Android SDK Platform Tools.

From Taimen, with Tapatalk.
[Android General] mrthomas108:
Help

#
[Android General] drewski_1:
not vague enough :confused:
[Android General] Sayan_tan:
Agree ;)
[Android General] KoFohz1Ne3:
EDIT: Posted at the wrong place, sorry.
[Android General] hemantdaiya:
Network is not stable in this ROM I have install 2 time but network issue is not solve I have already update
[Android General] ktmom:
You will be more likely to get help if you post in the thread where you got the ROM.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Android General] pt917:
My leeco Max2 No Network and baseband selection working. After unsucessful customise rom installation.

How can i will be writing logcat for developer
[Android General] DSA:
literally read the first post
[Android General] shaggyskunk:
Unrelated to getting a log - But if you're saying that in About Phone the Baseband shows "unknown" - That sounds like either a Kernel issue or you Flashed the incorrect Rom for your device ?

Sent from my SM-G965W ??
[Android General] Xplorer4x4:
Very informative information!

I am trying to track down a bug in the logcat regarding Bluetooth on my device. I have a Moto G6+ and when LOS15.1 ROM (ROM Link - Sources) is flashed, we lose all calling via Bluetooth. We can not hear the person, and they can not hear us. We can, however, listen to music via Bluetooth. Here is my logcat: https://paste.ee/p/AQZqz

The times of the 4 phone calls are as follows:

22:58 (10:58 PM)

23:34 (11:34 PM)

23:37 (11:37 PM)

23:45 (11:45 PM)

Our devs don't see anything relevant in logcat but maybe an extra set of eyes can point out the problem for us.
[Android General] jose1979:
Excelente
[Android General] chuppito:
Hi thanks for this tutorial. Or can I find a guide with the errors for sue I can correct them. For example what is the "b" of this error: 11-05 00: 34: 01.188 E / AndroidRuntime (22857): at com.waze.android_auto.b.b (WazeSource: 58) I have other letters on d other errors.

thank you
[Android General] irshad wani:
Hii..

I am using Honor play. I am recording logcat through matlog app. There is a lot of logcat junk. How can i filter the logcat to get the logcat of Google camera crash only. So please if anyone from you knows how to do please let me know..
[Android General] spawnlives:
I don't know if this helps as I'm still learning myself but you could find the package name for the app and do a search in Matlock for it. It should just show you the logs for that app

Eg:: my camera app package name is com.sec.android.app.camera (default camera app for s8).
[Android General] irshad wani:
Tried but no luck...
[Android General] majidpink:
aex custom rom dont support AOA 2 in car player. Android Open Accessory Protocol 2.0. why? how to fix it?
[Android General] JGradyO:
You are not going to find help here - this is a thread about capturing logs.

Read up, though, and maybe you can post a log in the right thread - an AEX thread maybe?
[Android General] rishi211292:
Sorry, Posted on Wrong thread
[Android General] sohail92202:
i've downloaded pixel 3 experience in my moto x4 but when i start my screen cast it will force stop...

why is it happening plz give me a solution...

sohails0081@gmail.com
[Android General] dandyfarid:
Very nice sir thanks :)
[Android General] oshonik:
How long logs take to save logs through emulator using

logcat > /sdcard/logcat.txt each sec i refesh root explorer saved logs size keep on increasing, how longs it's going to take
[Android General] ktmom:
It will keep accumulating log data until you stop it...or until the sdcard runs out of space [emoji6]
[Android General] ktmom:
Does this question have to do somehow with getting a logcat?
[Android General] 0werewolf0:
Notifications do not come in the background!

[IMG="https://drive.google.com/open?id=1-bzhcl--X1I2XBnt2KcGoud90ss5Mqm2"][/IMG]

[IMG="https://drive.google.com/open?id=1JIYchaX4qNZQdOvTJO6lMuzU9YgbBA3A"][/IMG]
[Android General] ktmom:
You need to post in your device or ROM or theme forum. Your problem has nothing to do with the subject of this thread.

When you do post in the correct location, you should provide much more information. Device, android version, modifications (Xposed, themes, kernel, etc)
[Android General] siwan05:
Wrong thread.
[Android General] Vakman:
Edit: Sorry, wrong thread.
[Android General] maxdesolate:
hi. i am getting a pop up error msg on lineage os 17.1 every time i start my phone saying 'your device has an internal problem etc'. the rom runs smoothly and no problems with the phone though. one of the testers here told me they could help me if i show a log cat of the msg. how do i go about to do it using adb or catlog?

my phone specs - samsung galaxy grand prime - fortuna3g

sm-g530h - A.P - XXS2BRLI

CP - XXU2BPB2

MSM - 8916

thanks in advance.
[Android General] JGradyO:
You're in the right place, but you need to read before you just ask. Start with post #1.
[Android General] Hammerhand.17:
Hello. Any chance to receive some support by here?

I'm trying to export settings with Poweramp but it needs documentsui.apk which my unit doesn't have, so it throws and intent and fails:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.CREATE_DOCUMENT cat=[android.intent.category.OPENABLE] typ=application/x-poweramp-settings (has extras) }

If I install it (tried about 20 different versions with same result), app fc's.

I attach logcat, hope somebody can help me (my unit is an 8.1 sc9853i head unit).

Edit: it's not a Poweramp issue; every app which needs documentsui have the same problem.
[Android General] Randisle:
Hey my friend I need some help I have a logcat on my app (advanced tools pro) not rooted android moto g 5g and Im having issues with things on it I really only understand a little bit of it and would love someone to take a look at my log and tell me what they see or notice that is concerning could you or anyone help me with this?
[Android General] svendsvin:
I hope you have solved your problem, but since this is a thread for how to do a logcat you should not expect solutions here. Have you tried some other xda-threads like i.e., https://xdaforums.com/t/google-documentsui-r-android-10.4307535/

There might be a greater chance that somebody can come to your aid.
[Android General] spyroledragon:
no logcat on jelly bean

Any way to get logcat to work on jelly bean ?
[Android General] Shaaan:
Nice guide. Definitely sharing!!

Don't be a noob. Be a newbie..!!

Details here.
[Android General] manoranjan2050:
Many many Thanks For Great Tutorial ........ bookmarked ........... Really helpful For Me and All XDA User......:good::good::good::good::good:
[Android General] paxChristos:
Some of the ports have it working, but not all. I believe it's up to the Rom devs to get it working (I don't have access to any jelly bean ports yet, so I can't comment on how to get it working.)

Pax
[Android General] Saml01:
For some reason while streaming music, ever so often, completely randomly my bluetooth will stop responding. In quick settings the option is completely grayed out and when looking at it in settings it will just hang on "turning bluetooth on". The only way to bring it back would be to reboot.

I am getting a bit tired of this and the rom chefs are kinda ignoring my questions regarding this problem. So I want to take the initiative and start investigating myself. So I would like to know if it would be possible for me to specifically log this error in its current state(when bluetooth is non responsive) because it would be impossible for me to log the phone while i'm in the car. I understand how to get the log going, and I understand the switches, but is there anything specific you can recommend I look at?

Any direction would be appreciated.

Thanks.
[Android General] paxChristos:
Check links in OP for alogcat or catlog, if you want an app to dump to sdcard, or use terminal emulator (or similar app.) It's covered in the OP ;)
[Android General] dbarrera:
Best way to do it is connecting the phone to computer, use 'adb logcat', and repeat the behavior for hanging. Add you say, the only way to 'revive'the device is by reboot, when you do this, logcat will stop the session and error should appear at the last lines...
[Android General] Saml01:
I understand the process for capturing a log. But that's not the question. The question was, how can I go about isolating only bluetooth related activity in the log and can I log an error after it has already happened?

This only happens in my car and it would be a little impractical to ride around with the laptop connected to my phone. Thats why I asked if I can capture the error after it has already happened and the bluetooth is in its frozen state.

For example. If I were to open a terminal on the phone, any idea what command I can use to turn on or turn off the bluetooth module? I am sure if I ran that command while the bluetooth was frozen it would give an error that I can capture.
[Android General] paxChristos:
My suggestion then would be to dump the entire log to sd, and search for E/BlueTooth* in the logs that should pop up when the issue occurs, and then become use terminal emulator and do the following

logcat V:<name of BlueTooth thread crashing>, <V:any other BlueTooth threads, there can be multiple> *:S > BlueTooth-crash.txt

Pax
[Android General] Saml01:
Excellent.

I will start with this and report back if I get stuck. Thank You.
[Android General] Nos_20:
Hi guys, I wondered if somebody could help me. I am having an issue with my wifi at boot up. How can I isolate wifi related errors in the logcat? Appreciate any help

Sent from my Paranoid Android Galaxy SII
[Android General] apollero:
Does this drain battery in any significant way? I assume it has to run in the background to actually keep a log, no?
[Android General] paxChristos:
iirc, the logs are constantly being written in the background, the only main difference would be the drain from the app (if you use that.) So, no, it (in and of itself) doesn't really drain battery in any significant way, but if you have an app constantly writting to your sdcard/screen on it'll drain battery :P

Pax
[Android General] apollero:
Sorry I'm a bit confused. Isn't Logcat exactly that? An app that is writing the logs?
[Android General] dbarrera:
not quite, is more like a service... Kernel always writes what happens to it in a log... Linux 101 (Remember Android kernel is a branch of Linux kernel)... or am I wrong?
[Android General] dyan025:
Can I use System Tuner app for Log ?

It's similar Log viewer right ?

Thank for any answer, i'm a newbie.
[Android General] vis80k:
I seem to be confused on a similar idea as well.

is logcat a default service that can't be turned off? which means adb, apps, terminal are all just taking that already available data and putting them into a file or in a nicer UI?

the reason for confusion is that if it is just a service running anyway, why is the catlog app showing only logs that start from the time I first installed and ran the app? ... I checked the settings but can't find related settings to display the full log, if there is one.
[Android General] dbarrera:
Logcat is a service that runs from the start with the kernel, it writes into a file in /var/log, k_mesg I believe is the file. If you want to read everything from the start, run adb logcat in computer and with device connected and usb debugging enabled, restart the device.