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
Related
I know how annoying it is trying to set up ADB, open a terminal, export logs to local files, copy, paste, etc just to submit a bug report or help a developer diagnose an issue.
That is why I put together this little app to do all of that for you!
This app runs the following commands:
dmesg
logcat -v time -d
logcat -v time -b radio -d
getprop
uname -a
ps
It puts these together into a single document and uploads it to Pastebin, so you can just put a link in a forum thread or IRC or in the bug tracker.
To run these, sadly it needs root. It also requires permissions to read phone identity so that it can automatically mask your ESN/MDN/etc in the logs before it uploads them. It also requires permissions to read account information so that it can mask all of your accounts in the logcat.
EVEN WITH ALL OF THOSE THINGS BLOCKED AUTOMATICALLY PLEASE LOOK OVER YOUR LOG BEFORE GIVING OUT THE URL. IT IS A PRIVATE PASTEBIN AND IF YOU FIND SOMETHING PRIVATE YOU CAN REMOVE IT.
Usage:
Install the app on your phone.
Run the app.
Add any information that should be masked (keep in mind private phone ids and accounts will be masked automatically).
Hit PasteBin! and wait for the upload to finish.
Note the url at the bottom of the screen and give it to whoever requested your logs.
This is just a simple app to help get logs, but if you have any suggestion of how it might be better, do let me know by posting in this thread.
Known Issues:
If you add too many mask strings the app doesn't scroll so you lose the PasteBin! button and/or the resulting URL.
Google Code Project: http://code.google.com/p/getlogs/
Version History:
Version 1.2
Added filtering to "just a file" output
Limited dmesg and both logcats to only 1000 lines each to prevent OutOfMemory Exceptions.
Version 1.1
Added ability to just save the file, no upload. (/sdcard/Android/apps/com.GetLogs/data/)
App now remembers the last message, in case you forget to write down your pastebin address.
Added ps to the list of processes run.
Version 1.0
Initial Version
Upgrade Instructions:
Uninstall current version if installed.
Install new version.
good work, thanks button pushed
Ok so, update - application not installed error, yes I have unknown sources selected, just doesn't install. Any ideas?
Sent from my MSM using XDA App
VistroDistro said:
Ok so, update - application not installed error, yes I have unknown sources selected, just doesn't install. Any ideas?
Sent from my MSM using XDA App
Click to expand...
Click to collapse
Hm, I get the same thing, I've never published an android app before and I chose not to sign it, maybe I need to do that...
EDIT: Ok I signed it and it installs now, sorry about that.
worked like a charm : )
again, good work
Hi,
Is there any way for the file to be dumped on the phone instead of uploading it to pastebin. The user can then pick his way of displaying the file to the world.
This is awesome, gonna install it when I get home so I can get highlandsun some logs of radio failures that occur when I'm at my desk at work. (I never have time to get the logs from the terminal when working, and I can't ADB at work.)
New version in first post, see the Version History for the updates.
Awesome work!
Nice work rpierce99. This should help get us a flood of logs .
Awesome! Will have a try.
I'm running this but it's not giving me a url and I can't see to find the file that it's supposed to create.
Demonic240 said:
I'm running this but it's not giving me a url and I can't see to find the file that it's supposed to create.
Click to expand...
Click to collapse
If you hit the pastebin button the url gets spit out just below the button. If you want the file it is in /sdcard/Android/apps/com.GetLogs/data/
Deleted...
Demonic240 said:
I posted the data file in another thread but I don't think anyone was able to look at it. Here is the logs for my tilt2. The issue I'm running into is that wifi loses the data connection immediately when the phone goes to sleep. The wifi signal does not drop, and in fact still says I'm connected, so the only way to regain data is to turn off the wifi then back on. Would someone be able to look at these logs and help me out here?
Click to expand...
Click to collapse
Hrm...
No offense, but this really doesn't belong here. IIRC, you posted the logs in the FRX06 thread - which is good, but don't you remember me mentioning opening a bug on the tracker? Obviously if there's already a bug open, just add your comments/logs to it... if there isn't already a bug on it, open a new bug with your comments/logs .
Seriously, this has absolutely nothing to do with this thread.
arrrghhh said:
Hrm...
No offense, but this really doesn't belong here. IIRC, you posted the logs in the FRX06 thread - which is good, but don't you remember me mentioning opening a bug on the tracker? Obviously if there's already a bug open, just add your comments/logs to it... if there isn't already a bug on it, open a new bug with your comments/logs .
Seriously, this has absolutely nothing to do with this thread.
Click to expand...
Click to collapse
Ah, I'll remove it then. Sorry about that.
Better dmesg binary
In the interest of having more readable kernel logs...
Delete your current /bin/dmesg and put this one in there instead. Make sure you chmod it 755.
highlandsun said:
In the interest of having more readable kernel logs...
Delete your current /bin/dmesg and put this one in there instead. Make sure you chmod it 755.
Click to expand...
Click to collapse
At work without adb. Using terminal on Rhod.
What am I missing?
Code:
$ $ su
# mount -o remount,rw /
# rm /bin/dmesg
# cp /sdcard/dropbox/dmesg /bin
cp: write error: No space left on device
# ls -l /bin/dm*
-rwxrwxrwx 1 0 0 0 Jun 29 10:10 /bin/dmesg
It does remove dmesg, it does copy the new, but filesize=0
Your rootfs is full. You can install it in /system/bin or /system/xbin instead. There's already one in there too, which is a symlink to toolbox. You should delete the symlink first, of course.
@HYC: Oh yes, sweet. Thanks.
@rpierce99: "Just a file" gives me..... just a file ... and crashes. However, the file is good. Thanks.
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
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...
hey everyone long story short i rooted my tablet a while back and started having problems so i flashed a new rom and the wifi isnt working.
I went to androidfiles.org and clicked nabi 2 and download wifi-fix, ota update and stock zip rom and flashed those three zip files ( i compressed them) in twrp.. its booting up and everything but wifi isnt working. ive read a lot of peeps are having wifi probs. I have a xda link for my exact device and you guys tell me wut the hell im supposed to do. its got all kinds of stock roms and ota updats and stuff,... which one do i use wtf do i do. should i go one at a time from lowest to biggest, do i even need ota updates or w./e that is?!?!?!? please help guys my chirstmas is becoming a nightmare... its my only internet source.. i had to come all the way to the dang library for this crap.. please help!!!!! heres the link that might give u guys an idea on how to help.. heres the stock roms and stuff
http://forum.xda-developers.com/wiki/Fuhu_nabi_2 thank you!!!!!
duuude im baked said:
hey everyone long story short i rooted my tablet a while back and started having problems so i flashed a new rom and the wifi isnt working.
I went to androidfiles.org and clicked nabi 2 and download wifi-fix, ota update and stock zip rom and flashed those three zip files ( i compressed them) in twrp.. its booting up and everything but wifi isnt working. ive read a lot of peeps are having wifi probs. I have a xda link for my exact device and you guys tell me wut the hell im supposed to do. its got all kinds of stock roms and ota updats and stuff,... which one do i use wtf do i do. should i go one at a time from lowest to biggest, do i even need ota updates or w./e that is?!?!?!? please help guys my chirstmas is becoming a nightmare... its my only internet source.. i had to come all the way to the dang library for this crap.. please help!!!!! heres the link that might give u guys an idea on how to help.. heres the stock roms and stuff
http://forum.xda-developers.com/wiki/Fuhu_nabi_2 thank you!!!!!
Click to expand...
Click to collapse
Thought I would share some info I found when I ran into the wifi problem on my daughter's nabi. I did some searches on the internet and the typical answer I found for solving the wifi issue was "reset the device" or "unroot and return to stock rom - flash all updates and reroot". Being a glutton for punishment, and the fact I didn't want to reset the device, I searched and searched and was able to fix my daughter's wifi without doing a reset or unroot/reroot. Before I get into it I wanted to mention that wifi failures can happen for a number of reasons so while this worked for myself, it may not work for you.
Some prerequisites:
Most importantly; you need a rooted device. If you do not have root access you will not be able to write files or access the commands to fix the issue I am about to outline.
Some knowledge of linux would be helpful, but not necessarily required.
Lets get started:
Warning! It goes without saying but I will say it anyways - you can mess up your nabi by rooting it. Some of the commands below could mess up your nabi bad. If this scares you then you probably should not proceed any further. I am not responsible for any damage you do to your nabi.
Commands are listed between ' and ' - do not use the ' when inputing the commands.
Note: The first two/three steps are not necessary but they do give you insight as to how I was able to determine my problem. If following this doesn't fix the problem for you the logcat output may give you some important info that you can google that may help you fix your particular problem.
Note: Steps 5 and on can be skipped if you have a text editor (vi or nano) on your device. If you have a text editor loaded simply edit the conf file directly.
1. You will need to run the command 'adb logcat' in a command-line window and in your appropriate directory. Adb is available as part of the android sdk but can also be found stand alone since most people do not need the sdk.
2. Try to turn on the wifi. You should see the output of your adb logcat window scroll some data. If the wifi is not attempting to turn on at all sometimes you can move between the settings options then go back to the wifi settings and move the slider. If you cannot get your wifi to turn on you can scroll the window up and attmept to find the data from when the device started up. In the output you should see lines that talk about wlan0 and probably something that says "failed" somewhere. In my case I could see where the wlan0 enabled but then a few lines down it said something about "Line: 25 failed" and "failed to parse file".
3. The file is actually a configuration file used by the wifi kernal module/driver. In my case this file had become corrupted.
4. Set adb in root mode (won't work if the device does not have root access) by running 'adb root' at the command-line. You may need to click on an "allow root permission" window on the actual device after running this command.
5. Run 'adb pull /data/misc/wifi/wpa_supplicant.conf' from command-line. If this does not work then do the following:
a. Run 'adb shell' from command line.
b. 'su'
c. 'cat /data/misc/wifi/wpa_supplicant.conf' - copy the output from the command and paste into a text editor (see note in step 6 on why NOT to use notepad).
d. Save the file as wpa_supplicant.conf, preferrably in the same diretory as adb.
e. 'exit' twice should exit you from the adb shell and return you to your command-line. If all else failes a "ctrl-c" should drop you out of adb.
6. Use a text editor to open wpa_supplicant.conf. The file should be located int he same directory as adb. If you are using Windows I would strongly suggest you NOT use notepad. Notepad will typically change all the EOLs (End Of Line) from \n to \r\n which will really mess things up worse.
7. In the file you should see "network={" entries. There maybe one entry, there maybe many entries. You can remove all lines between "network={" and "}" including the latter themselves. If you see your 'home' network listed you can leave it as the only entry and make sure its priority is set to 1 but it maybe better to remove it as well just in case it contains part of the corrupted data.
8. Save the file.
9. Do 'adb push wpa_supplicant.conf /data/misc/wifi/wpa_supplicant.conf' from command-line. If this does not work then do the following:
a. Run 'adb push wpa_supplicant.conf /sdcard/wpa_supplicant.conf' from command-line.
b. Run 'adb shell'
c. 'su'
d. 'dd if=/sdcard/wpa_supplicant.conf of=/data/misc/wifi/wpa_supplicant.conf'
e. Do 'exit' twice to exit the adb shell. If all else fails then a "ctrl-c" should drop you ot of adb.
10. If the wpa_supplicant file was corrupted then the wifi should now be able to enable and you should now be able to connect to a network.
I hope this is helpful to at least a few people.
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