can I tell why phone force closes ? - HTC EVO 3D

i have been experiencing some force closes and random restarted, is there a program that can tell me what caused it or what app caused the error.

Not really a simple way to troubleshoot that. Did you do a full wipe prior to flashing whatever ROM you're running? Trying booting into recovery and wiping dalvik/cache, that can fix plenty of small issues.

bluephi1914 said:
i have been experiencing some force closes and random restarted, is there a program that can tell me what caused it or what app caused the error.
Click to expand...
Click to collapse
yes, logcat will show you, but you have to kinda know what you're looking for. There are some logcat apps on the market or you can logcat through ADB.
Also, random app FCs aren't all that weird, BUT if you are getting them consistently you could very likely fix it by fixing permissions in recovery.
If you fix perms and the issues persist, feel free to pull a logcat of the app crash, and either PM me the .txt file or link it here via pastebin.com. I am no expert but I could try to help. But again, fix perms first, that'll probably work.

bluephi1914 said:
i have been experiencing some force closes and random restarted, is there a program that can tell me what caused it or what app caused the error.
Click to expand...
Click to collapse
Yes, there is a way but it requires a bit of technical knowledge. Assuming you have the motivation, acquiring the knowledge shouldn't be an issue.
If you're familiar with how to use ADB (Android Debug Bridge), this program allows you to access a log Android creates on the device where all applications output errors, debug, warning and verbose information.
From the command line, you'd run, adb logcat or adb shell logcat. If you prefer to have a bit of a GUI, run ddms which is also packaged inside the Android SDK.
There is an Android application called aLogCat for free in the Android Market which offers a GUI on the device for viewing this information. Feel free to also try this method and see which works best for you.
Essentially, this log will contain a lot of information. HTC coders seem to lean on the side of outputing a lot of information.
This log is real time, it will scroll as the applications output information. The best way to find the FC is to trigger the FC and immediately look in logcat for the details. They should be flagged by E, for error, followed by some type of name convention for the application. There will generally be anywhere from 5-15 lines of output in logcat when an application force closes.
Once you're able to locate the FC error output in logcat, feel free to post back up here and we can attempt to give some feedback.
Understand, sometimes the issue is the result of the application developer's poor coding or not being able to forsee a potential error. Other times, the solution is as simple as wiping dalvik-cache or wiping the application's settings causing it to start again from scratch.
Hope that helps! Good luck!

joeykrim said:
Yes, there is a way but it requires a bit of technical knowledge. Assuming you have the motivation, acquiring the knowledge shouldn't be an issue.
If you're familiar with how to use ADB (Android Debug Bridge), this program allows you to access a log Android creates on the device where all applications output errors, debug, warning and verbose information.
From the command line, you'd run, adb logcat or adb shell logcat. If you prefer to have a bit of a GUI, run ddms which is also packaged inside the Android SDK.
There is an Android application called aLogCat for free in the Android Market which offers a GUI on the device for viewing this information. Feel free to also try this method and see which works best for you.
Essentially, this log will contain a lot of information. HTC coders seem to lean on the side of outputing a lot of information.
This log is real time, it will scroll as the applications output information. The best way to find the FC is to trigger the FC and immediately look in logcat for the details. They should be flagged by E, for error, followed by some type of name convention for the application. There will generally be anywhere from 5-15 lines of output in logcat when an application force closes.
Once you're able to locate the FC error output in logcat, feel free to post back up here and we can attempt to give some feedback.
Understand, sometimes the issue is the result of the application developer's poor coding or not being able to forsee a potential error. Other times, the solution is as simple as wiping dalvik-cache or wiping the application's settings causing it to start again from scratch.
Hope that helps! Good luck!
Click to expand...
Click to collapse
YOU HAVE GOT TO BE KIDDING ME... LOL as soon as i typed "adb logcat" at the command prompt in windows, the screen immediately fills up... and like you said its real time so it doesn't stop.
When "ADB logcat" is typed how far does this log go back. I think i typed it about 5-10 minutes after the restart....or random hot reboot. was this to long ???
Most of the lines begin with D/ or I/ or or V/ didn't see any E .... but im currently scrolling back through all of the output in the CMD screen, i had to unplug the phone to get it to stop scrolling.

il Duce said:
yes, logcat will show you, but you have to kinda know what you're looking for. There are some logcat apps on the market or you can logcat through ADB.
Also, random app FCs aren't all that weird, BUT if you are getting them consistently you could very likely fix it by fixing permissions in recovery.
If you fix perms and the issues persist, feel free to pull a logcat of the app crash, and either PM me the .txt file or link it here via pastebin.com. I am no expert but I could try to help. But again, fix perms first, that'll probably work.
Click to expand...
Click to collapse
typing "ADB logcat" from the command prompt in windows doesn't give me a .txt file does it?

bluephi1914 said:
typing "ADB logcat" from the command prompt in windows doesn't give me a .txt file does it?
Click to expand...
Click to collapse
Try to use the Fix Permissions Opinion in the Rom Manager App! That May Help...

Here's a Screenshot...

PMGRANDS said:
Here's a Screenshot...
Click to expand...
Click to collapse
Ok.. downloaded ROM Manager and ran Fix Permissions. Hopefully that will fix any issues that I had.

bluephi1914 said:
YOU HAVE GOT TO BE KIDDING ME... LOL as soon as i typed "adb logcat" at the command prompt in windows, the screen immediately fills up... and like you said its real time so it doesn't stop.
When "ADB logcat" is typed how far does this log go back. I think i typed it about 5-10 minutes after the restart....or random hot reboot. was this to long ???
Most of the lines begin with D/ or I/ or or V/ didn't see any E .... but im currently scrolling back through all of the output in the CMD screen, i had to unplug the phone to get it to stop scrolling.
Click to expand...
Click to collapse
D is debug, I is Information, V is verbose and E is Error. All FC messages will start with E although, sometimes other logcat information will help make the FC easier to understand. I usually gather them all around a specific FC and narrow it down as I go.
I don't recall the buffer limit size to logcat, but it is generally best to grab the logcat as soon as the FC issue occurs, that way the issue will be closest to the end of the buffer. This makes it easier to locate and less likely to be pushed out of the buffer.
bluephi1914 said:
typing "ADB logcat" from the command prompt in windows doesn't give me a .txt file does it?
Click to expand...
Click to collapse
no, by default it updates the screen in real time, to have it dump to a text file, adb logcat > logcat.txt . you might need to hit cntrl+c to stop it as it will continue to write in real time to the log file until you exit. the exit command is cntrl + c to kill the process, same as exiting.
Hope that helps arm you with another skill!
edit: in the last month since i originally posted my first answer, i found an application on the market, which is essentially a GUI for logcat called aLogCat. the developer open sourced his code and the application started in 2009. seems to work very well.
source code: http://code.google.com/p/alogcat

Related

phone force closing

I have been talking this over with Condemned Soul but wanted to see if anyone else has ran into this problem since he & I are both confused.
My fiances phone has been force closing a lot lately aka com.android phone not responding. I saw the first force close when I tried flashing Tazzs cm7 on his phone so thats when I first put on gsb 1.2
I switched his over to Sheds GSB on the 8th and it was great everything was fine but then I decided to try to improve on a few settings and when I restarted the phone it decided to start force closing.
I reflashed the rom and the gapps and everything seemed fine but then I wanted to put cs skull theme on his phpne since we had it on Kaos v9 but then when I restarted the phone after flashing the theme it force closed again.
So then I reflashed the rom and gapps again and got all his apps and settings all back how he had it and decided to do a Nandbackup so that we wouldnt have to keep reflashing the rom again and once I restarted the phone after the nandbackup it force closed again.
Long story short I reflashed the rom and gapps and now am in the process of getting his apps and settings back how he had it once again.
Am I doing something wrong to make it keep force closing? I would like to make a nandbackup at least for him so that we wont have to keep setting up his phone.
Thank you for any help
When you say you flash the ROMs, do you also do a wipe beforehand? If not, try doing a wipe and then install and see if that changes anything.
Yes I wiped both the factory and dalvk sorry I thought I mentioned that. lol.
labnjab said:
Yes I wiped both the factory and dalvk sorry I thought I mentioned that. lol.
Click to expand...
Click to collapse
Its a problem that happens on certain ROMs with certain themes. Not sure there's a fix for it, I just got around it by not applying the phone.apk theme.
zerocool79346 said:
Its a problem that happens on certain ROMs with certain themes. Not sure there's a fix for it, I just got around it by not applying the phone.apk theme.
Click to expand...
Click to collapse
phone.apk wasn't changed in the theme. Strange part is it's only on the one phone and haven't heard of it on any of the others.
CondemnedSoul said:
phone.apk wasn't changed in the theme. Strange part is it's only on the one phone and haven't heard of it on any of the others.
Click to expand...
Click to collapse
That is odd.
Update:
This is still causing issues. Going to try and format the sd like tazz suggested, but moving my phone.apk to his didnt work, and yesterday he had to restart his phone and it did it again and needlessto say hes not very happy with his phone. Says its not reliable at all. If anyone else has anything else I can try it would be a big help. I have tried searching on google but dont find a whole lot of information. I just wish I could figure this out its got to be something I did or something stupid that I am missing.
There are a couple of next steps you can take.
If the problem is a software configuration issue, then it is possible that you will see the reason for the FC in the logcat.
The system logcat is designed as a "circular buffer" (in a way that it has a maximum size) - once you fill it to capacity, each new record which is added to the end causes information at the beginning to be lost. But, this also means that if a FC occurs, so long as you "dump the logcat" within a reasonable period of time after the FC happens, you will capture the moment in time that the FC occurred,
Generally, the "logcat" buffers get filled to capacity quite quickly at boot time (because there is lots and lots of "android" app activity), and quite a bit slower after the phone has been completely booted. If you are trying to capture a logcat event during the first boot, you need to continuously capture output to a file on your PC (it will be quite large) - but once the phone has completed booting, so long as you "run a logcat" within 5 or 10 minutes after a FC occurs, the relevant event(s) will be in the logcat.
If you want to capture it during the first boot cycle of a freshly flashed ROM, probably you ought to have a PC attached and dump the prodigious output to a file on the PC, as in
Code:
C:\MyWindozePC> adb shell logcat -v time > LogcatFileOnMyPC.txt
So long as the ROM you have flashed has "USB debugging" turned on by default, you can run the above command about 10-15 seconds after you see the 3 skating droids, and it will continuously place output into the local file on your PC. You need to interrupt the above command (Control-C) to get it to stop; you would usually do that a few seconds after you saw the FC, and then you would know that the log entries you are looking for at the end of the file.
(Note that logcat dumps are usually huge - don't bother trying to look at them with a text file viewer on the phone - they suck at handling large files... well, at least the ones that I have tried).
You could also instrument this on the BF's phone in a way where he can capture the info to the SD card anytime he is using the phone during the day with a couple taps of the screen, and then you could look at the logcat(s) later at your leisure - for instance by using Gscript Lite, and a simple script like this:
Code:
#! /system/bin/sh
_LOGDIR='/sdcard/logcats'
if [ ! -d ${_LOGDIR} ]; then
mkdir ${_LOGDIR}
fi
_tstamp=`date +%Y%m%d-%H%M`
logcat -v time -d > ${_LOGDIR}/logcat_${_tstamp}.txt
With this method, you just need to train him like a monkey to press the right keys after a FC occurs. If he's a clever monkey, you could even train him to send the logcat files to you via e-mail.
If the problem is due to an intermittent hardware issue with the phone, that will be tougher to identify. About the best you can do to make that determination is to return the phone software to stock and use the phone without installing any apps for a reasonable period of time and see if the problem continues to occur.
cheers
bftb0
Thank you for the detailed reply bfbt0 I was about to msg you when you responded.
I will have to give what you mentioned a try.
Is the gscript lite what I use for the adb shells or do I need another app as well. I have never done anything with adb or if I have it was something simple.
To clarify I would have to get his phone to fc again which is easy to do and then run a logcat. It sounds easy through the pc I just want to make sure I do it right. I would make a folder dedicated to where the logcats would be stored and then run it in the gscript lite? Meaning run the first code you posted.
Update ~ Never mind I found you had to have android sdk on your pc Im downloading that now. I still may need help tho.
labnjab said:
Update ~ Never mind I found you had to have android sdk on your pc Im downloading that now. I still may need help tho.
Click to expand...
Click to collapse
GScript Lite is a free app on the market. It was put together by XDA member "rogro", and he has a paid version as well if you want to throw a couple bucks his way.
Using the script above with Gscript (Lite or Pro), you don't need to be tethered to a computer nor set up the SDK and drivers. (Only when you want to capture a full first ROM boot do you need to use a PC (because the logfile grows so big in that specific case).
If you can force the FC to occur, then using the Gscript Lite script I showed above will capture the information you want.
bftb0
PS There is a brief outline of how you load a script into Gscript Lite in that "Universal Root for Dummies" thread over on AF.
cheers
Thank you I will try that tonight and hopefully can figure out what the issue is
labnjab said:
To clarify I would have to get his phone to fc again which is easy to do and then run a logcat. It sounds easy through the pc I just want to make sure I do it right. I would make a folder dedicated to where the logcats would be stored and then run it in the gscript lite? Meaning run the first code you posted.
Click to expand...
Click to collapse
That code I posted checks to see if a folder exists, and if not creates it - /sdcard/logcats
No need for you to do it manually; the first time the script runs it creates that folder
But, yeah - wait for the FC to happen and then run that script within the next couple of minutes (no real hurry). It is also useful to make note of the time the phone displays when the FC occurs - it will be easier to find things in the logcat file by timestamp if you do that.
bftb0
Thank you I will do that as well. Thanks also for taking the time to help me.
I did the code on my phone to make sure I did it right and it gave me an error
says cannot create/logcat_20110222-1558.txt read only file system
did I do something wrong, just want to make sure that I can get it right before attempting it on his phone tonight. Thanks in advance.
labnjab said:
I did the code on my phone to make sure I did it right and it gave me an error
says cannot create/logcat_20110222-1558.txt read only file system
did I do something wrong, just want to make sure that I can get it right before attempting it on his phone tonight. Thanks in advance.
Click to expand...
Click to collapse
If you typed that script in by hand, you made a typo.
I checked it by cutting and pasting it - and then I tested it afterward, and it worked.
Probably you bolluxed up the _LOGDIR variable, or you inserted a space in the logcat command where there should not be one.
I would suggest that you cut and paste, rather than type.
Hmmmm... it occurs to me that those little "scrolling CODE text boxes" don't render correctly on the phones browser. Here's the same script, but without enclosing it in [ CODE ] [ /CODE ] tags:
#! /system/bin/sh
_LOGDIR='/sdcard/logcats'
if [ ! -d ${_LOGDIR} ]; then
mkdir ${_LOGDIR}
fi
_tstamp=`date +%Y%m%d-%H%M`
logcat -v time -d > ${_LOGDIR}/logcat_${_tstamp}.txt
Thank you for all your help. I got it to work and come to find out I didnt even need to use that program because it hasnt forced closed yet. He said he wiped the phone a bunch of times the other day when he was trying to get it back up and running when it forced closed on him while at work and now i rebooted it and backed it up and that usually caused a problem, so far so good.
I am tho going to format the sd card and redo the rom again just to be sure this problem doesnt happen again. Thank you again for all the help.
On some builds (even though it shouldn't be required) it is necessary to wipe multiple times. On Tazz's earlier builds of GB, people reported having to wipe 3x or more to get it running smooth. Always make sure you do a nand backup before flashing in the future lol. Hopefully the phone stays running good! If not, people are always here to help!
Sent from my Ginger Tazz using XDA App

[TUT]Report a bug

Posted it here as this section gets the most views. If needed tom will move it to the rightful section.
There has been a lot of disappointing posts all over the forum with people complaining about bugs, while not providing any kind of information for the developers aside from "X doesn't work" or "I get random reboots".
Well, without the proper knowledge, how are we going to fix it? We don't know what kernel you may be running, what version number you're on, or any information that the system spits out to let you know there's an error. So, I decided to start this thread, to hopefully teach newbies how to give us (developers) proper knowledge when complaining about issues.
This thread will have 3 sections, Logcat (App / system debug log.), Dmesg (active kernel output) and last_ksmg (Typically if you get a random reboot or something of that sort {this is the same as dmesg except it gets the info from the last shutdown [like a kernel panic]})
Section 1: Logcat This log should almost always be included just because it provides more info than just saying something doesn't work. It will essentially tell you which apps are crashing and why and it also gives output of what they're doing. (Your system is running through apps, the dialer, wireless radio's, etc are all ran through apps.) so, if something is general, like a system force close, please just include a logcat.
How to get a logcat: Well, this is REALLY simple, all you need to do is just get adb up and running (google how to do that, I don't feel like writing a 'how to use adb' tutorial for everyone's phone.) and then type
Code:
adb logcat
then you just right click, select, and paste to the thread. It's really that simple!
For more info, check out my logcat guide here.
Section 2: Dmesg
This is getting into issues such as wifi not working, sleep of death, etc. Basically, things that make us go "OH F***" when we use our devices. Note: You will need adb access for this to work, same as logcat. What this will do is get us live kernel output so we can know things like "What driver is the kernel loading {or not loading for that matter}" and similar things. This is linux, so kernel output is important if a hardware aspect isn't working right. How to get a dmesg: This is simple as well, no matter what operating system you're on (mac, windows, linux) just type
Code:
adb shell dmesg > dmesg.txt
and then it will have written the output to a .txt file in your current directory. Either paste the contents to the thread, or attach it to your post. You can also get the dmesg by using terminal emulator. Instead though, you dont type adb shell, you need to also include it to somewhere you will be able to save it. Like /sdcard so, the command goes
Code:
dmesg > /sdcard/dmesg.txt
Just get it off your sdcard and get the contents to the developer!
Section 3: last_kmsg Ok, the last thing is last_kmsg. When android kernels crash, they write the log to last_kmsg so then you can find out what's going on. This is usually for issues such as random reboots and other various kernel panic symptoms. A kernel panic happens when the kernel tries to do something it can't. It doesn't mean wrong permissions, it could just have errored out on something and died which can cause a few things. Anyway, developers REALLY need this if debugging a kernel because it gives us a viable way to see WHAT it's trying to do instead of trying to guess what it is trying to do How to get a last_kmsg: This is super simple and the same on all phones no matter what, what you need is adb up and running (or terminal emulator) and either in adb shell, or terminal emulator just type
Code:
cat /proc/last_kmsg > /sdcard/last_kmsg.txt
or you can do
Code:
adb shell cat /proc/last_kmsg > kmsg.txt
and that will write it to your current working directory from cmd.
Hopefully, this way we developers can have our lives be a little bit easier and you can learn more about android.
Taken from here. All due credits to him. I just edited a little part.
___________XDA Premium__________
Don't be a noob. Be a newbie..!!
Details here.
____________________________________
Nice.
i will add this in my developer 101 thread in next update...thanx
Xenon X said:
i will add this in my developer 101 thread in next update...thanx
Click to expand...
Click to collapse
Sure.
___________XDA Premium__________
Don't be a noob. Be a newbie..!!
Details here.
____________________________________
Nice tutorial :good:
Nice guide:good:
download error
when i press download rom.it doesn't download
it shows this error report when i trying to download rom
"Unable to resolve domain name
Please make sure:
- You are connected to the Internet.
- Your DNS server settings are correct.
Error code 105 (net::ERR_NAME_NOT_RESOLVED)"
please help me

[Q] How get log from device? aLogcat not working on JB.

I have customer, who has crashing app on his phone.
Previously we use to use aLogcat application on the phone. So user was just instructed to extract log from this application and send logfile to us. But unfortunately aLogcat is not working since Jelly Bean update.
How can I get logcat info from his device without asking him to install entire Android SDK? Any simple software on the phone or on the Windows computer can do this trick?
R: [Q] How get log from device? aLogcat not working on JB.
You can get logcat with ADB.
xpirt
It's difficult if your customer's phone is rooted.. You are supporting your own application or you want to analyze the log of 3rd party apps?? There are some changes done for reading logs from 4.1 onwards.. now applications can read there own logs without any permissions.. but you need the root if you want to do the same for 3rd party app.. Read more here
amith007 said:
It's difficult if your customer's phone is rooted.. You are supporting your own application or you want to analyze the log of 3rd party apps?? There are some changes done for reading logs from 4.1 onwards.. now applications can read there own logs without any permissions.. but you need the root if you want to do the same for 3rd party app.. Read more here
Click to expand...
Click to collapse
Actually it is problem in my own application, but system shuts down it by some reason. I would like to see "full picture", not only log from my app.
Right now I am sending to user the adb.exe and couple of related dlls. The user instructed to connect cable, open cmd line, type "adb logcat" and... pray that USB driver is correctly found by system and log is printed into the cmd window. After that he have to select, copy paste and send file to me. To many manual steps and risk when driver for adb is not found makes support process very unfriendly.
xpirt said:
You can get logcat with ADB.
Click to expand...
Click to collapse
that's what I do, but it is very complicated for my regular users. To many steps to get log out of the phone in to text file, sometimes problems with finding adb usb drivers. Thanks anyway

[GUIDE/INFO] Obtaining Logs for our Beloved Developers

Our developers are hard workers and when one of us finds a problem with a ROM or kernel it is difficult to troubleshoot without some type of log. Since the developers spend a lot of their free time creating things for us to make our phone more enjoyable the least we could do is provide something useful to them to assist in the development of their creations.
Most of you here already know how to get logs, but for those who don't or are rusty at it here are links with useful information and apps to assist in obtaining a log. Also, .torrented provided the basic commands if you're okay using adb.
So let's give back to our developers by giving them logs which are vital for development.
All-in-one logger for use in Windows
http://forum.xda-developers.com/showthread.php?t=1944776
Another logcat tool for use in Windows
http://forum.xda-developers.com/showthread.php?p=28193613#post28193613
Lumberjack- apk for obtaining logs while in android
https://play.google.com/store/apps/details?id=net.solarnz.apps.lumberjack
Universal how to get and read logcat
http://forum.xda-developers.com/showthread.php?t=2274119
There are three types of logs that are used most often: logcat, dmesg, and last_kmsg. Here is an explanation of what they are and what they're useful for
Indirect said:
Alright guys, I was on an irc channel when I considered posting this since it's rather important. There has been a lot of disappointing posts all over the forum with people complaining about bugs, while not providing any kind of information for the developers aside from "X doesn't work" or "I get random reboots".
Well, without the proper knowledge, how are we going to fix it? We don't know what kernel you may be running, what version number you're on, or any information that the system spits out to let you know there's an error. So, I decided to start this thread, to hopefully teach newbies how to give us (developers) proper knowledge when complaining about issues.
This thread will have 3 sections, Logcat (App / system debug log.), Dmesg (active kernel output) and last_ksmg (Typically if you get a random reboot or something of that sort {this is the same as dmesg except it gets the info from the last shutdown [like a kernel panic]})
Section 1: Logcat
This log should almost always be included just because it provides more info than just saying something doesn't work. It will essentially tell you which apps are crashing and why and it also gives output of what they're doing. (Your system is running through apps, the dialer, wireless radio's, etc are all ran through apps.) so, if something is general, like a system force close, please just include a logcat.
How to get a logcat:
Well, this is REALLY simple, all you need to do is just get adb up and running (google how to do that, I don't feel like writing a 'how to use adb' tutorial for everyone's phone.) and then type
Code:
adb logcat
then you just right click, select, and paste to the thread. It's really that simple!
Section 2: Dmesg
This is getting into issues such as wifi not working, sleep of death, etc. Basically, things that make us go "OH F***" when we use our devices. Note: You will need adb access for this to work, same as logcat.
What this will do is get us live kernel output so we can know things like "What driver is the kernel loading {or not loading for that matter}" and similar things. This is linux, so kernel output is important if a hardware aspect isn't working right.
How to get a dmesg:
This is simple as well, no matter what operating system you're on (mac, windows, linux) just type
Code:
adb shell dmesg > dmesg.txt
and then it will have written the output to a .txt file in your current directory. Either paste the contents to the thread, or attach it to your post.
You can also get the dmesg by using terminal emulator. Instead though, you dont type adb shell, you need to also include it to somewhere you will be able to save it. Like /sdcard so, the command goes
Code:
dmesg > /sdcard/dmesg.txt
Just get it off your sdcard and get the contents to the developer!
Section 3: last_kmsg
Ok, the last thing is last_kmsg. When android kernels crash, they right to last_kmsg so then you can find out what's going on. This is usually for issues such as random reboots and other various kernel panic symptoms. A kernel panic happens when the kernel tries to do something it can't. It doesn't mean wrong permissions, it could just have errored out on something and died which can cause a few things. Anyway, developers REALLY need this if debugging a kernel because it gives us a viable way to see WHAT it's trying to do instead of trying to guess what it is trying to do
How to get a last_kmsg:
This is super simple and the same on all phones no matter what, what you need is adb up and running (or terminal emulator) and either in adb shell, or terminal emulator just type
Code:
cat /proc/last_kmsg > /sdcard/last_kmsg.txt
or you can do
Code:
adb shell cat /proc/last_kmsg > kmsg.txt
and that will write it to your current working directory from cmd.
Hopefully, this way we developers can have our lives be a little bit easier and you can learn more about android.
I'm glad to have written this and devs, feel free to link to this guide as a "bug reporting FAQ"
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=23036410
@orangechoochoo, any urge to update the title and the content to provide information about getting dmesg output and last_kmsg?
Once your android device is plugged into your machine, enable Android Debugging in the Developer Options! (this has to be enabled)
If you do not have ADB installed go find a tutorial and install it! (this is a must)
Very simple command, what this does is it will start ADB and output the text into a text file called logcat.txt, once you are done re-creating the error/FC/whatever take that file and upload the contents to a paste site such as https://www.pastebin.com
It's free and you do not need to sign up to create a paste!
logcat via ADB!
Nix:
Code:
[email protected]:~$ adb logcat > logcat.txt
Windows:
Code:
C:\android-tools> adb logcat > logcat.txt
last_kmsg via ADB!
Nix:
Code:
[email protected]:~$ adb pull /proc/last_kmsg
Windows:
Code:
C:\android-tools> adb pull /proc/last_kmsg
dmesg via ADB!
Nix:
Code:
[email protected]:~$ adb shell dmesg > dmesg.txt
Windows:
Code:
C:\android-tools> adb shell dmesg > dmesg.txt
crpalmer said:
@orangechoochoo, any urge to update the title and the content to provide information about getting dmesg output and last_kmsg?
Click to expand...
Click to collapse
I just finished adding more stuff, let me know if you want me to put anything else that will be helpful. The All in One tool looks useful if someone is stuck in the boot animation, and Lumberjack looks useful for obtaining logs while booted in android.
Thanks for the quick links, I'm sure it will help alot of users out. MY question is whether devs want us to filter anyting out, its not too hard to select faults and errors and filter useless info.
This should be pinned.. for sure!
jake.corey.jacobs said:
MY question is whether devs want us to filter anyting out, its not too hard to select faults and errors and filter useless info.
Click to expand...
Click to collapse
That would be nice to know, last night I provided Pio a long a$$ logcat so I feel bad for giving him that extra homework
The ROM was stuck in the boot animation and logcat was spitting out line after line after line so I hit ctlr C to stop it.
Nice guide...

[GUIDE][NOOB-FRIENDLY] How to take logcat

So,
SGS users, here is my another thread, for guys, who want to help devs of our sgs community.
Devs asking you to get a logcat and give?? Yes it helps a lot for devs if you give logcat to solve problem. So dont wait till devs ask you to get a logcat! Just give them a logcat when you tell them this/that doesnt work. This way theirs and yours time will be saved and unnecessary posts will be avoided.
Now i will give you simple steps to do it. There are two main ways to do a logcat, 1. within android device, and 2. through adb using PC.​WITHIN ANDROID DEVICE METHOD:
1. Logcat within android device can be done in one of two ways, through a Logcat app: Difficulty --> Very Easy
Here are two good apps: aLogcat or Catlog
Both of these programs can dump their logs to a text file, which is very useful for debugging. Or, you can do it in terminal emulator (same rules as running through adb(see below))
2. Through Terminal method: Difficulty --> Almost Easy
Install Android Terminal Emulator app from Play Store..
Open terminal app you just installed..
Enter these commands:
After every command press ENTER/SUBMIT button
Code:
su
then accept the superuser popup message[it comes only first time if you select checkbox "remember the choice"]
Code:
logcat -v long > /sdcard/test.log
Or use this command:
The -v long puts the text in a nice format that is more easily readable. The *:W will search for all warnings, errors, and fatals, while the *:S will silence everything else.
So essentially, u will have a .txt file that has a log of all warnings and up, nothing else, and it'll look pretty too!
Code:
logcat -v long *:W*:S > /sdcard/filename.txt
now press home button to minimize the terminal..
and do the task which is giving problems/ whichever task log you need to give to dev..
then drag the notification bar..
select terminal app in it..
now press and hold "Volume down button" and touch c button on keyboard.
This will stop the command..
now use this command twice
Code:
exit
Now app will get closed. go to sdcard to find test.log file.. upload it to here so that dev can access it..
Thank you for reading it with patience hope you can get logcat now..
Note: if you are stuck in boot and want to take logcat.. READ LOGCAT FROM ADB METHOD BELOW.. the above one is simple method for these tasks for eg.. if you are having some force close of app/lag etc.. then after entering second command press enter and then use home button to minimize terminal.. dont worry it will take log.. now open that app and once it gives force close then click on it and then open terminal again and press volume down button + c to terminate command.. then use exit command two times... done.. now go to sdcard and find a.txt file
From PC[i.e, ADB] LOGCAT METHOD :Difficulty --> Medium
There is an advantage here. As doing this way, you can start using logcat when your device boots. There are 2 ways here again..
PREPARATION:
In your android device, go to settings --> applications --> development -->
Check USB Debugging
Make sure your device driver is already installed otherwise install kies software which will install drivers too.. Get kies from This LINK
You need to download this ADB.zip file i made to your system.. Download link
Extract the ADB.zip file from any applications like IZarc/7Zip/winzip/winrar.
ADB USAGE INSTRUCTIONS:
Then go to Android folder.. inside that you should find 3 files.. Now open a command prompt or terminal in that path..(wherever you extracted it.. use cd command)
Then inside that path.. type
Code:
adb logcat > filename.txt
Or
Code:
logcat -v long > /sdcard/test.log
Or
Code:
logcat -v long *:W*:S > /sdcard/filename.txt
Now perform tasks in android device of which you need to give logcat for the devs. Then use CTRL+C to end the command.
Now find the filename.txt inside the Android folder which has logcat. Upload this file and give link to dev..
The full list of options that can be used with logcat command is as follows:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)
You can replace the *:W with any other letter from above to get more info.
CREDITS
CRESITS ;
I) @Niku-Droid
II)www.google.com
III) XDA Threads, as this information is taken up from threads of XDA only
Oh! I missed someone, Send me a PM
hmn nice thread
most guides are user friendlyy if the ppl read a few sentences
just like all other threads the self aclaimed noobs will just ignore this thread and when asked for logcats theyll just post how to take logcat when they can just type that up at google or had read here
also im not able to take logcat at boot can u post up how to do that
Sent from my GT-S5282 using Tapatalk
T3snake said:
hmn nice thread
most guides are user friendlyy if the ppl read a few sentences
just like all other threads the self aclaimed noobs will just ignore this thread and when asked for logcats theyll just post how to take logcat when they can just type that up at google or had read here
also im not able to take logcat at boot can u post up how to do that
Sent from my GT-S5282 using Tapatalk
Click to expand...
Click to collapse
hmm... dont worry bro, we will give them link to this thread when they ask this silly question n hv u tried taking logcat using adb, i m sure that it can take logcat as soon as device is booted
Niku-Droid said:
hmm... dont worry bro, we will give them link to this thread when they ask this silly question n hv u tried taking logcat using adb, i m sure that it can take logcat as soon as device is booted
Click to expand...
Click to collapse
of course i used adb
i want to take logcat while star is booting
but device doesnt show in adb until the booting is complete
When the projection function is turned on, the phone will reboot.
Sorry, I am a Taiwanese, so my English is not very good. I hope you can understand.
My whyre will restart whenever the projection function is turned on. This problem is very annoying because I use it often.
I hope that ArrowOS can be more perfect in Chinese culture, otherwise it will be difficult for my newbie, and how do you solve the 4G signal problem?
I use a lot of OS, but their 4G can't work, which makes me very troubled. As a geek, I want to learn how to deal with this.
The system you made is really great, I like it very much, I hope you will surpass PE.
how can solve no internet problem?
how can solve no internet problem?
Network problem on moto g4 plus of version Arrow Os 9
Doesn't access network problem while installed
The connection to my smartwatch dosnt work.
the bug that I found for the moment was that it does not allow changing the file transfer mode when connecting the usb cable to the computer
Niku-Droid said:
Кодlogcat -v long > /sdcard/test.log
Click to expand...
Click to collapse

Categories

Resources