Random Restarts; How Do I Debug This? - Android Q&A, Help & Troubleshooting

I used CatLog in Debug mode to no avail. I can't figure out what's causing the Random Restarts problem. I've even reflashed my whole system.
The problem with CatLog is that it needs to write to disk to record the log. When I set it to write every 50 or 20 lines, I successfully reproduced a random restart while it's logging, but when I look at the log, it only recorded the 50 or 20 lines PRIOR to the random restart. I need at least the last 3 lines.
When I set it to record every 1 line (this should work in theory), it goes into a "log loop" logging it's own log as a log. So in other words, it logs that it's logging every time it logs a line. This makes the log file useless as I need to go on living for hours until I successfully produce the next random restart by accident, which I can't do as this will fill up my whole disk and may cause me a bigger problem in a matter of an hour or two, I assume.

Instead of catlog use logcat through terminal.
Code:
su
logcat > "your sdcard path here"/log.txt
Or
logcat | grep E/ > "your sdcard path here"/log.txt
Then you have either a full log or an error log. Or for debug only replace E/ with D/

DestructoS said:
Instead of catlog use logcat through terminal.
Code:
su
logcat > "your sdcard path here"/log.txt
Or
logcat | grep E/ > "your sdcard path here"/log.txt
Then you have either a full log or an error log. Or for debug only replace E/ with D/
Click to expand...
Click to collapse
How will that help? And when do I do that? Before the incident so it's logged, or afterwards so it's written to this specified file?

Sorry logcat before the incident as logcat doesn't stop until something explictly stops it and as you are piping it to file as it goes you will get a log until the last entry before reboot. It won't solve the problem but at least you will have a log.

DestructoS said:
Sorry logcat before the incident as logcat doesn't stop until something explictly stops it and as you are piping it to file as it goes you will get a log until the last entry before reboot. It won't solve the problem but at least you will have a log.
Click to expand...
Click to collapse
Thanks. Exactly what I need. I hope it works.

Related

[Q] Media > DownloadService always running

hi guys, I hope you can help.. I really googled a lot about this, and also made many tests on my phone and waste a lot of time, but couldn't find a solution yet.. also this seems to be affecting many other people, so I don't understand how is possible nobody found a fix for that until now..
(I'm posting in general section because this seems to affect any kind of phones running cm10.1 + gapps)
the problem is that if I go to manage apps > running apps, I see Media process (DownloadService) always running! that could drain my battery and/or download data, in any case I don't see a point in having it always running, so I would like to get rid of it!
what I discovered so far is that the process is related to both gapps and Downloadprovider.apk package included in any CM10.1 build, in fact:
1. the process starts appearing only after installing the gapps (I use a very minimal 4.2 gapps package, about 10mb only)
2. if I delete Downloadprovider.apk package from /System/App, the process doesn't appear anymore
The problem is that if I delete the Downloadprovider.apk package then I start getting gapps related FC's and phone becomes unstable (and very probably will not be possible to download anymore things from the browser and/or play store)!
So what could I do to safely get rid of that process? Maybe disable or freeze some other apps/processes? But I wouldn't know what to disable exactly..
guys please help me I am really getting crazy with that! also that could help many other people :good:
thanks a lot in advance
EDIT: maybe it was related to Maps since I installed maps 7.x I don't see that process anymore!
moly82 said:
hi guys, I hope you can help.. I really googled a lot about this, and also made many tests on my phone and waste a lot of time, but couldn't find a solution yet.. also this seems to be affecting many other people, so I don't understand how is possible nobody found a fix for that until now..
(I'm posting in general section because this seems to affect any kind of phones running cm10.1 + gapps)
the problem is that if I go to manage apps > running apps, I see Media process (DownloadService) always running! that could drain my battery and/or download data, in any case I don't see a point in having it always running, so I would like to get rid of it!
what I discovered so far is that the process is related to both gapps and Downloadprovider.apk package included in any CM10.1 build, in fact:
1. the process starts appearing only after installing the gapps (I use a very minimal 4.2 gapps package, about 10mb only)
2. if I delete Downloadprovider.apk package from /System/App, the process doesn't appear anymore
The problem is that if I delete the Downloadprovider.apk package then I start getting gapps related FC's and phone becomes unstable (and very probably will not be possible to download anymore things from the browser and/or play store)!
So what could I do to safely get rid of that process? Maybe disable or freeze some other apps/processes? But I wouldn't know what to disable exactly..
guys please help me I am really getting crazy with that! also that could help many other people :good:
thanks a lot in advance
Click to expand...
Click to collapse
Maybe you have some program/app installed which uses the download manager? Some app trying to download an update outside of the regular mechanism? I don't see DownloadService running on my phone unless I instructed it to download something. Do you notice anything downloadmanager/media related in logcat? If in doubt, attach the phone to a PC, run the following commands and attach the resulting file ('attach_me.txt') here:
Code:
adb shell 'ps; echo -----------;logcat -v time -b main -b system -b events -d;echo -----------;dumpsys;' > attach_me.txt
Use the full path to adb if you need to.
This shows the currently running processes (ps), the contents of the main, system and event logs (logcat) and a snapshot of the current state of your phone (dumpsys). If there is anything there you don't want to show to the whole world edit the resulting file before attaching it here.
thanks a lot for the reply my friend
tonight at home I think I will be able to run the adb command you suggested me (in my home computer I have sdk installed)
so far I checked logcat in terminal ("logcat |grep edia" and "logcat |grep ownload") and this is what I got:
$ su
# logcat |grep edia
D/Vold ( 1197): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 1197): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
W/PackageParser( 1626): No actions in intent filter at /data/app/org.wikipedia-1.apk Binary XML file line #39
I/ActivityManager( 1626): Start proc android.process.media for broadcast com.android.providers.media/.MtpReceiver: pid=1765 uid=10011 gids={50011, 1015, 1023, 1024, 1028, 2001, 3003, 3007}
V/ActivityThread( 1765): android.process.media white listed for hwui
D/SystemUIService( 1701): loading: class com.android.systemui.media.RingtonePlayer
D/SystemUIService( 1701): running: [email protected]
W/ContextImpl( 1626): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1458 android.bluetooth.BluetoothHeadset.:273 android.bluetooth.BluetoothAdapter.getProfileProxy:1155 android.media.AudioService.getBluetoothHeadset:2198 android.media.AudioService.access$2800:104
W/ContextImpl( 1626): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1458 android.bluetooth.BluetoothA2dp.:160 android.bluetooth.BluetoothAdapter.getProfileProxy:1158 android.media.AudioService$AudioServiceBroadcastReceiver.onReceive:4087 android.app.LoadedApk$ReceiverDispatcher$Args.run:758
$ su
# logcat|grep ownload
I/ActivityManager( 1624): Start proc com.google.android.youtube for broadcast com.google.android.youtube/.core.transfer.DownloadService$BootReceiver: pid=2305 uid=10050 gids={50050, 3003, 1015, 1006, 1028}
W/ActivityManager( 1624): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile.apk
W/ActivityManager( 1624): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile.apk
I'm attaching also screenshots of the process I'm talking about
EDIT: I reinstalled everyting from scratch as a new build by quarx came out.. it seems that installing only cm build + minimal gapps, that process doesn't show up. Later after I installed back all my apps (via app2zip flashable zip) the process showed up again.. so probably you are right and there is a certain app using that process.. but how can I understand which one has relation with that service? maybe YouTube as i see it mentioned in logcat?
delete
i could generate the logs you asked without using the pc but using the phone terminal and multiple commands.. i'm uploading them to my dropbox links are below thanks in advance..
http://db.tt/gJLBYeT7
http://db.tt/OahQ8Zf7
http://db.tt/KPUTy4et
YAFU what happened to you?
it seems to me after I installed latest maps 7.x the media > download process is not appearing anymore in running processes.. maybe it was related to sh*tty maps??? :fingers-crossed:

[Q] Kernel Nemesis 6.2 Logcat disable

Hi,
I'm new on this forum, so I canno't post my thread on the right forum/thread. (10 posts needed for this)
So I'm asking here.
I have installed yesterday the ROM Enigma for Xperia U with the Kernel Nemesis 6.2.
All works well on the phone, except the logcat.
When I'm trying to check the log on the phone with Eclipse DDMS and Logcat plugins, I got this error :
Code:
Unable to open log device '/dev/log/main': No such file or directory
- I have activate the log in the Dev Menu on the phone and reboot the phone, don't work.
- I've check if an init.d script remove this file, but not.
- I've try to launch logcat by hand with adb shell, but no luck, same message.
And finally, I've tried to load kernel module logger.ko with insmod. But I got this message
Code:
[email protected]:/lib/modules # insmod logger.ko
insmod: can't insert 'logger.ko': invalid module format
[email protected]:/lib/modules # dmesg
[...]
<4>[ 1841.764984] logger: disagrees about version of symbol module_layout
If I try to insert the module from the directory /system/lib/module/, I got the same result.
So, someone know how to activate the logcat system on the phone ?
Thanks in advance,
Cheers.
Denia
Have you solved it?
Have you solved it?
Deniadan said:
Hi,
I'm new on this forum, so I canno't post my thread on the right forum/thread. (10 posts needed for this)
So I'm asking here.
I have installed yesterday the ROM Enigma for Xperia U with the Kernel Nemesis 6.2.
All works well on the phone, except the logcat.
When I'm trying to check the log on the phone with Eclipse DDMS and Logcat plugins, I got this error :
Code:
Unable to open log device '/dev/log/main': No such file or directory
- I have activate the log in the Dev Menu on the phone and reboot the phone, don't work.
- I've check if an init.d script remove this file, but not.
- I've try to launch logcat by hand with adb shell, but no luck, same message.
And finally, I've tried to load kernel module logger.ko with insmod. But I got this message
Code:
[email protected]:/lib/modules # insmod logger.ko
insmod: can't insert 'logger.ko': invalid module format
[email protected]:/lib/modules # dmesg
[...]
<4>[ 1841.764984] logger: disagrees about version of symbol module_layout
If I try to insert the module from the directory /system/lib/module/, I got the same result.
So, someone know how to activate the logcat system on the phone ?
Thanks in advance,
Cheers.
Denia
Click to expand...
Click to collapse

[Q] Hardware Wifi Failure?

Hello, I was given a Gtablet by a friend. Everything is in proper working order except for the wifi. The wifi will endlessly scan, never pulling up any SSIDs. Here's what I've done to troubleshoot:
Ascertained flight mode was off (it was)
Enabled wifi through the developer options (Did nothing)
Manually enter SSID/Security information (Claims that SSID is not in range)
Reloaded the OS (He had VEGAn Tab on there. I reloaded the 5.1 Beta. I don't know what version he had on there, oops.)
After a clean install I have the exact same issue, which leads me to believe it is a hardware issue rather than a software issue. Is this common? Am I forgetting something? Would loading an entirely different ROM be of any use or do they also use the same driver?
My apologies if this has been answered previously, but in all my searching I can only find people who have this problem temporarily; a reboot fixes it for them. I haven't been able to find someone who has had this as a persistent issue.
JungleWallace said:
Hello, I was given a Gtablet by a friend. Everything is in proper working order except for the wifi. The wifi will endlessly scan, never pulling up any SSIDs.
Click to expand...
Click to collapse
I'll have to look at some logs to ascertain what your WiFi problem is.
Run the commands in this post (after rebooting the tablet) and then post the text files that're created.
rajeevvp said:
I'll have to look at some logs to ascertain what your WiFi problem is.
Click to expand...
Click to collapse
Thanks, see attached are the logs as per request. As a side note, now that I have the terminal emulator on there I tried a few commands I dug up on the internet after I looked over the logs.
Code:
$ su
# ifconfig tiwlan0 up
# ifconfig eth0 up
Both gave an error message
Code:
error: SIOCGIFFLAGS (No such device)
Also
Code:
# svc wifi enable
did not solve my issues. Oh well.
FYI:
JungleWallace said:
...I tried a few commands I dug up on the internet after I looked over the logs.
Code:
$ su
# ifconfig tiwlan0 up
# ifconfig eth0 up
Both gave an error message
Code:
error: SIOCGIFFLAGS (No such device)
Click to expand...
Click to collapse
The wireless LAN interface name on the gTab is wlan0. Hence your error messages: "No such device" for the ifnames tiwlan0 and eth0. (The latter would work for the ethernet I/F on the dock--if you had one connected.)
Also
Code:
# svc wifi enable
did not solve my issues. Oh well.
Click to expand...
Click to collapse
1. You have to look at the Android system logs (using logcat) to see the result of that svc command.
2. Your Android logs indicate that your WiFi interface is a) disabled at startup and b) then not enabled thereafter:
Code:
01-07 23:21:10.429 V/ConnectivityService( 990): Starting Wifi Service.
01-07 23:21:10.429 I/WifiService( 990): WifiService starting up with Wi-Fi [B]disabled[/B]
Suggestions:
Since this now looks like a ROM problem (ie. not HW):
1. See this thread. Run the script to disable Airplane Mode which might be causing your problem. If that doesn't work, try step 2:
2. Boot into CWM and then a) Format /cache and b) Repartition the Internal SD card (take the external one out first).
You'll lose all your current apps and data with this step, essentially reverting to a "fresh" install of your ROM.
Re-setup WiFi, time & date and other things again.
If step 2. doesn't work, report back next year, and I'll give you more commands to run then.
rajeevvp said:
If step 2. doesn't work, report back next year, and I'll give you more commands to run then.
Click to expand...
Click to collapse
Negative. Ran the airplane fix script, nothing. Reset cache/re-partitioned, still nothing. It's still endlessly scanning/shutting off/scanning.
JungleWallace said:
Negative. Ran the airplane fix script, nothing. Reset cache/re-partitioned, still nothing.
Click to expand...
Click to collapse
OK. Not one of the common simple problems, then.
It's still endlessly scanning/shutting off/scanning.
Click to expand...
Click to collapse
This is puzzling because from your last logs, it doesn't look like the wlan kernel driver was even loaded, so no AP scanning should be possible. A little background will clarify what I mean.
On all the 2.6.32.x kernels for the gTablet, the wlan driver is not compiled into the kernel. Instead, it is built as a separate kernel module which is loaded and unloaded as needed by Android (from the files in /system/lib/hw/wlan/). When the wlan driver is loaded both the kernel (dmesg) and Android (logcat) will show some characteristic messages and until the driver is inserted into the kernel no AP scanning, or other wireless functions, should be possible. And, no wlan driver-related messages in your logs tells me that the driver was likely not loaded. (Also, only after the wlan driver is loaded does it check and initialize the wireless HW. So, only after its been loaded, strictly speaking, can we rule out a HW problem.)
Sometimes the Android logs are not complete, so I want to you setup ADB on your PC, enable USB debugging on the gTablet (Setting > Applications > Development) and collect the Android logs like this from now on:
1. Power off gTab; attach the USB cable to it.
2. Open a CMD.exe window on the PC, then run this command (and keep the window minimized):
Code:
C:\> [B]adb logcat -v time > logcat.txt[/B]
After all the tests/commands have been done, restore this window and press Ctrl-C to kill ADB and terminate Android log collection.
3. Power on the gTablet. The ADB command will wait for the gTablet and keep collecting logs on the PC.
Post also the output of these commands:
Code:
C:\> [B]adb shell dmesg > dmesg.txt[/B]
C:\> [B]adb shell lsmod > lsmod.txt[/B]
C:\> [B]adb shell "cd /; find system -type f -print0 | xargs -0 sha1sum" > sha1sum.txt[/B]
Is this the ROM you currently have?
Have you applied the VEGAn 1.00 beta 5.1.1 supplement also?
rajeevvp said:
OK. Not one of the common simple problems, then.
.........
Is this the ROM you currently have?
Have you applied the VEGAn 1.00 beta 5.1.1 supplement also?
Click to expand...
Click to collapse
That was the current ROM I was using. I had not applied the supplement yet, but now I have. Still the same issue. Here are the logs.
JungleWallace said:
That was the current ROM I was using. I had not applied the supplement yet, but now I have. Still the same issue. Here are the logs.
Click to expand...
Click to collapse
In this one I can see the kernel WiFi driver being loaded, and the driver is not reporting any HW chip, SDIO bus, or other errors:
Code:
<4>[ 23.485281] sdio_reset_comm():
<4>[ 23.503617] DHD: dongle ram size is set to 294912(orig 294912)
<4>[ 23.676913] Firmware version = wl0: May 17 2010 22:38:50 version 4.218.223.1
<4>[ 23.887647] wlan0: Broadcom Dongle Host Driver mac=e0:2a:82:08:3e:81
<4>[ 23.894047] Enter wl_control_wl_start
<4>[ 23.897864] Exited wl_control_wl_start
<4>[ 23.907103]
<4>[ 23.907109] Dongle Host Driver, version 4.218.223.1
As far as the kernel driver is concrned, everything looks OK, but the Android logs still don't show any SSID associations.
What're the exact outputs of these commands? (You can post a screenshot. Mask the psk= value from the 1st output, if present)
Code:
C:\> [B]adb shell "fgrep -v '#' /data/misc/wifi/wpa_supplicant.conf | tr -s '\n'"[/B]
ctrl_interface=wlan0
update_config=1
...
C:\> [B]adb shell wpa_cli -i wlan0 driver rssi[/B]
...
C:\> [B]adb shell wpa_cli -i wlan0 driver linkspeed[/B]
LinkSpeed [I]nn[/I]
C:\> [B]adb shell wpa_cli -i wlan0 scan[/B]
OK
C:\> [B]adb shell wpa_cli -i wlan0 scan_results[/B]
bssid / frequency / signal level / flags / ssid
aa:bb:cc:dd:ee:ff 2452 185 [WPA2-PSK-CCMP] [I]YourSSID[/I]
Collect also the dmesg and logcat outputs as before.
[/FONT]
rajeevvp said:
What're the exact outputs of these commands? (You can post a screenshot. Mask the psk= value from the 1st output, if present) [...] Collect also the dmesg and logcat outputs as before.
Click to expand...
Click to collapse
See attached. Ignore my syntax errors that I underlined. I was typing wlan instead of wlan0.
JungleWallace said:
Ignore my syntax errors that I underlined. I was typing wlan instead of wlan0.
Click to expand...
Click to collapse
Those are OK since you've corrected them. But, these commands you'll have to redo:
1. In the first command (fgrep ... | tr), you've typed a '/' (forward slash) instead of what I've given in the example, which is a '\' (back-slash) character.
The correct character will remove all those blank lines. But, this is a minor typo compared to:
2. The last 2 commands (wpa_cli scan* ...), which you'll have to redo. This time without the extraneous driver argument (again, see the example)--which turns it into a completely different (and non-existent) command. This is why the output doesn't look like what I've shown.
Instead of typing the commands in manually, select and copy the command lines from the browser and paste them into the shell window.
You might also want to increase the no. of columns that CMD.exe displays: Right-click on the title-bar; choose Properties; select Layout; increase the no. of Columns to, let's say, 150.
3. That dmesg.txt file is not very useful because you've not rebooted the tablet before issuing that command.
The kernel has a fixed-size message buffer, so all the HW initialization messages printed only at system boot will be overwritten by later, and irrelevent, messages as time passes. From the timestamps, it looks like your tablet's been on for a couple of weeks, at least--I can't see any of the earlier boot-up messages.

adb logcat

Hi guys
I have recently just started to learn about adb logcat and i just have a few questions hopefully you guys can help me with
1. the log buffer size 'adb logcat -g' determines how much data is stored. therefore the more i use the handset, the quciker i will loose data in the log from earlier event - thats what I believe is happening?
2. I have used 'adb logcat -b event' and 'adb logcat -b main' - are these reading the logs stored in /dev/log/ ? and if so, what is the difference?
3. When the phone is powered off, all log content is lost - so it appears?

Screen turns on frequently, what program is doing that?

Every couple of minutes, sometimes sooner, my screen will turn on. It is sitting on a table untouched. I know that that can be done programmatically. I don't think it's a touchscreen problem of spurious ghost presses, this never happens when I am using the touchscreen. I would like to find out what is causing it. Are there any tools for logging what program made the screen-ON request?
Thanks in advance.
@Gorilla Daddy
Android logs all - unless this got disabled - what happens - keyword: LOGCAT. You can look inside this protocol by means of ADB
Examples:
Code:
adb devices
adb logcat
2nd command will generate real-time output in command window. It can be stopped with CTRL+C
Code:
adb devices
adb logcat -d > C:\logcat.txt
2nd command will extract the logcat information from the connected device and redirects the output to a file on the PC.
The option –d will take care that the output will stop when all output is flushed.

Categories

Resources