[Q] How to get logging information if device freezes / hangs? - Other Tools & General Discussion

HI there,
I have written an app and on some devices, using the app freezes the system. My main problem is, that I do not get any log information, because as soon as the device is frozen, logging completely stops and obviously the crash-reports normally would be generated after the crash, which does not work, because the device is frozen.
I have attached the device to my laptop via adb (via USB) and logcat everything, but the logging just stops as the device freezes. I have also checked all possible log locations (/data/tombstones, /data/anr and what else is in /data) and could not find anything.
Since the app crashes only on about 10% of all devices (the devices are identical and have the same firmware) I need to test the app on the device and cannot use the emulator. However if the app crashes, I can relieable reproduce the crash using adb monkey. On the other 90% adb monkey won't crash the device.
Is there anything else I can log / test / check? Is there a way to get a memory dump, once the device is frozen? Any other idea how I can get hold of any information?
Although I don't think this is relevant: The device is a XORO 9718DR tablet and the device is rooted. The app is written by myself and not available in the market. It mainly uses only Buttons, TextView, ImageView, HttpClientConnection, Threads, AsyncTasks and other "normal" Android stuff. It even does not use the webview.

ToBe_HH said:
HI there,
I have written an app and on some devices, using the app freezes the system. My main problem is, that I do not get any log information, because as soon as the device is frozen, logging completely stops and obviously the crash-reports normally would be generated after the crash, which does not work, because the device is frozen.
I have attached the device to my laptop via adb (via USB) and logcat everything, but the logging just stops as the device freezes. I have also checked all possible log locations (/data/tombstones, /data/anr and what else is in /data) and could not find anything.
Since the app crashes only on about 10% of all devices (the devices are identical and have the same firmware) I need to test the app on the device and cannot use the emulator. However if the app crashes, I can relieable reproduce the crash using adb monkey. On the other 90% adb monkey won't crash the device.
Is there anything else I can log / test / check? Is there a way to get a memory dump, once the device is frozen? Any other idea how I can get hold of any information?
Although I don't think this is relevant: The device is a XORO 9718DR tablet and the device is rooted. The app is written by myself and not available in the market. It mainly uses only Buttons, TextView, ImageView, HttpClientConnection, Threads, AsyncTasks and other "normal" Android stuff. It even does not use the webview.
Click to expand...
Click to collapse
What you are saying is an App Not Responding situation where the app does too much work on the Main Thread causing a UI Freeze. You could analyse the ANR Trace file from your phone... I'm not quite sure ... But ... You could use the Below links to know more in detail :
investigating an ANR
How to debug Android ANR
Interpreting an ANR stack trace

No ANR
Thank you niranjan94 for your reply. But by "freeze" I mean that the complete device freezes. It is not accessible via USB or network any more. All apps are frozen (e.g. I had an app in the background, which recorded the logcat and that app stopped the same second the device freezes). Therefore there is no ANR trace. Unfortunately. :crying:
BTW: There is also no tombstone in /data/tombstones....

Related

[Q] Need help tracking down resource leak in WM6

At least I think it must be a resource leak. I have multiple WM6 devices that all behave the same way when my application is run. After a while, maybe 15 hours, they gradually deteriorate and refuse to start other applications. At first, it will just be an application like Opera that will not start. Eventually, things like File Explorer will also not start. When I say they won't start, I mean that I get the "not signed with a trusted certificate or one of its components cannot be found" message.
My first thought was that there was a memory leak, but according to the output of GlobalMemoryStatus, the system's memory use is not increasing over time. Then I thought that it might be storage space since I'm generating a big log file. But the storage space still sits above 60MB when this happens.
Restarting the device gets everything back to normal. So far, this is what I know:
1. I'm using the RIL. I noticed today that after about 12 hours, I stop getting RIL notifications.
2. I'm monitoring memory with GlobalMemoryStatus, but the available physical memory doesn't seem to be decreasing over time
3. The thread count remains constant for the life of the application
4. My storage space is decreasing, but there is still over 60MB available when everything starts to go wrong
5. In the end, the device winds up with the screen lock on, even though it is not configured.
It seems that there must be some kind of resource leak. The only other thing I can think of are kernel resources. I tried to rule out things like event handles through static code inspection, but maybe there's something I'm missing.
Does anyone have any suggestions as to how I would troubleshoot this further? I'm using VS2008 and a Tilt2 and an HTC Imagio (it happens on other devices as well).
I tracked this down to a registry handle leak. What bothers me is that I had to do it by static code inspection. I just looked for things like CreateEvent, RegOpenKeyEx, etc.
Since this didn't seem to show up as consumed physical memory, does anyone have any methods for inspecting kernel resource consumption on Windows Mobile? Do I have to rely on KITL and Platform Builder with the emulator? I'm hoping that there's some way I diagnose this kind of problem with a real device. From my perspective, the device just started to fail and there were no external indicators to warn me of the impending failure.
sbaker25 said:
I tracked this down to a registry handle leak. What bothers me is that I had to do it by static code inspection. I just looked for things like CreateEvent, RegOpenKeyEx, etc.
Since this didn't seem to show up as consumed physical memory, does anyone have any methods for inspecting kernel resource consumption on Windows Mobile? Do I have to rely on KITL and Platform Builder with the emulator? I'm hoping that there's some way I diagnose this kind of problem with a real device. From my perspective, the device just started to fail and there were no external indicators to warn me of the impending failure.
Click to expand...
Click to collapse
hi!can somebody to help me?
i have asus p535 and i reset "start""settings"default settings"and i lost all from device.after apear align screen and remain like this
i think i have to install window mobile.can you tell me step by step how?
10000 thanks
Sorry, accidental re-post. Don't think I can delete it altogether...

I can no longer view networked PCs using ESFile Explorer???

Can someone help me out? I've been using this setup for years on several machines w/o a single problem. Now, all of a sudden, I try to view a networked PC to move some files over (like I've done thousands of times) and it says that the server can't be reached. It gives me some bogus ideas like firewal is on, IP address is out of range, SMB is off, yadda yadda yadda but none of these are true so far as I can tell. I tried deleting the server and scanning via the 'search' again and them same PC shows up. When I click it it gives the same error. So I attempt to manually edit the login credentials or manually create a new server and after I enter all the credentials it just sits on 'Adding Server, Please wait a minute...' Indefinitely. I tried rebooting the PC (Wind7 64-bit) as well as my device (unrooted SGS4 v4.3) and I'm not able to solve this issue. The only changes I can think of is the recent update to v4.3 but I also updated to v4.2.2 previously and had no issues. I've also done this for years on several devices and countless firmware versions & ROMs. I know some have been having issues with the addition of KNOX to 4.3 but I haven't even installed that nor do I plan on doing it. I checked by opening KNOX from the app tray to verify and it indeed still wants me to INSTALL. I am also getting weird warning pop-ups since 4.3 about something or another trying to access part of my phone that it's not authorized to which sounds like a KNOX/WiFi bug from what I'm hearing. This seems strange to me that I would be getting this warning when I haven't even installed it yet. Could this networking issues also be related and how can I correct this? This is SUPER annoying!

[Q/A][Discussion] NEC Terrain general discussion

Hello!
This is a discussion thread for NEC Terrain.
The hardcore steps, which are bootloader unlock, rooting and even repartitioning have found their solutions and can be found in:
http://forum.xda-developers.com/show....php?t=2515602 for the discussion
https://github.com/x29a/nec_terrain_root for an apk which opens for you an ability to have the system area of the phone writeable
https://github.com/alex-kas/nec_terrain for the last ideas on how recovery and boot images should be and a list of stock apps to disable with explanations
So, all questions regarding all the above should be asked in that thread as they are off-topic here.
Currently we have to use this device with its stock components. You are welcome to contribute with workaround related to known oddities here.
Note that many questions were already asked in the above mentioned thread and some of them have answers. However, since that thread is supposed to for the rooting/unlocking, it is more than logic to separate the topics and discuss the end-user phone features here.
If you have a serious idea towards a new custom ROM then you should go here
http://forum.xda-developers.com/android/software-hacking/rom-nec-terrain-custom-rom-t3162061
That thread is dedicated for the developers of a new csutom ROM for NEC Terrain
Thanks for understanding the thread aim and welcome!
First exploration
You can find apps which can be disabled with some explanation why in
https://github.com/alex-kas/nec_terrain/tree/master/system
The speciall account should be paid to the following issues:
Why stock Contacts and Phone must not be disabled
Why apps with provider in their name should treated carefully
Current impossibility to activate a soft keyboard (if you need chinese, for example).
The latter question of a soft-keyboard for this phone has been asked before in
http://forum.xda-developers.com/show....php?t=2806270
and has no answer. There is further discussion on this in my github (see above)
On more oddity which at least my phone has: when I travers to
Settings->wrieless & networks->more...->Mobile networks
I see as the last option "network operators". This option i constantly greyed out. It is useful in roaming as often different orpeators have different prices. Also, near the borders of a country som eforeignn operators can be captured. This is bad. Anyone with ideas on this?
i was wondering if someone with a fully functional Terrain upload their /system/app folder and its contents, I've seemed to remove an essential app somewhere and now I can't do phone calls or terrain hotspot.
Daxiongmao87 said:
i was wondering if someone with a fully functional Terrain upload their /system/app folder and its contents, I've seemed to remove an essential app somewhere and now I can't do phone calls or terrain hotspot.
Click to expand...
Click to collapse
I can do this tomorrow. I am able to phone call, hotspot, etc. I've noticed that with me, sometimes the phone UI won't show up when someone calls me so I cannot answer the phone... If this happens, just do a Wipe Data on the phone apk and reboot.
Sent from my LG-D415 using XDA Forums
@jasonmerc much appreciated! My backup phone just isn't cutting it for me!
Daxiongmao87 said:
@jasonmerc much appreciated! My backup phone just isn't cutting it for me!
Click to expand...
Click to collapse
No problem man . Just curious, what is your backup phone?
Sent from my LG-D415 using XDA
My nieces phone for her upcoming birthday. The excuse I'm making to myself is that I'm "test driving" it. It's called the Xperia Tipo, she's only 9 and would be using it at more or less a little toy; no SIM card. I have better ones actually, HTC One and a Moto X (2013), the latter being my favorite phone without a hardware keyboard.
I'm wondering about 2 questions, guys:
1. @Daxiongmao87, what is the hotspot you are talking about?
2. @jasonmerc, can you provide to me the list of your apps, enabled and disabled? Or, if you just uninstalled them (so no disabled) then only enabled.
I want to see the list given in adb shell by
pm list packages -e -f [for ENabled with file-names]
pm list packages -d -f [for DISabled with file-names]
I'm curious about this can/cannot do phone calls. I had established some dependence but you have said you CAN do calls with attsettingsprovider disabled and even see contacts. Very strange to me and I want to find the truth I.e. Can I or not eventually get rid of stock contacts at all.
Thanks in advance.
@alex-kas hotspot meaning wireless tethering. There's a system app with the package name containing hotspot. I believe jasonmerc already provided me with that earlier along with the phone apk, but ultimately did not help fix my issue. My symptom for the two issues are as follows:
Wifi Hotspot (Tethering)
-Under the Tethering & portable hotspot menu, toggling Portable Wi-Fi hotspot reveals a subtext that reads "Failed to set transmit power"
Phone Calls
-My phone no longer notifies me whether or not I have a SIM card. No icon or any indicator at all. My signal icon always shows zero bars. attempting to make a phone causes Contacts to crash ("Unfortunately, Contact has stopped.") and haults the phone call process.
I hope this information helps a little bit. More than likely i'm missing a vital app that I carelessly removed upon tinkering.
Daxiongmao87 said:
@alex-kas hotspot meaning wireless tethering. There's a system app with the package name containing hotspot. I believe jasonmerc already provided me with that earlier along with the phone apk, but ultimately did not help fix my issue. My symptom for the two issues are as follows:
Wifi Hotspot (Tethering)
-Under the Tethering & portable hotspot menu, toggling Portable Wi-Fi hotspot reveals a subtext that reads "Failed to set transmit power"
Phone Calls
-My phone no longer notifies me whether or not I have a SIM card. No icon or any indicator at all. My signal icon always shows zero bars. attempting to make a phone causes Contacts to crash ("Unfortunately, Contact has stopped.") and haults the phone call process.
I hope this information helps a little bit. More than likely i'm missing a vital app that I carelessly removed upon tinkering.
Click to expand...
Click to collapse
Have you read my github?
https://github.com/alex-kas/nec_terrain/tree/master/system
If not, try to see there. I spent quite a time and I'm sure my phone IS working in both aspects you mention. Pay attention to: contacts, phone, attsettingsprovider and installation of "dw contacts". All of that is by purpose. Perhaps, my phone would not work w/o "dw contacts" but I just learned that a replacement (which joins phone app and contacts app, which are disintegrated once you remove attsettingsprovider) MUST be.
You will find there files: lists of enabled and disabled programs. Compare with yours. In adb shell:
pm list packages -d [gives disabled packages] -s [if only system]
pm list packages -e [gives enabled packages, all, system and 3-rd party] -s [if only system]
My lists contain ONLY system apps. 'system' are those who reside in /system/apk OR in /data but are upgrades to initial system apps. Hope this helps. If you have put there superuser - it is system now, for example.
I can also imagine that moving some app to sdcard makes the system buggy. I had no full skype autostart then it was moved.
hotspot in the name does NOTHING with tethering.
@alex-kas you should have a full list of apps I have installed already, I PM'd you a list a while back. About to do the /system/app dump, most likely I'll package it as a zip or 7z file and upload and share from Google Drive.
Also as a little update, I mentioned the GPL stuff in my ATT thread. Waiting for a response
Sent from my LG-D415 using XDA
Here's the contents of my /system/app folder. Apparently I don't have ATTSettingsProvider.apk, BUT I still have ATTSettingsProvider.odex if that makes a difference.
https://drive.google.com/file/d/0BxupjEjigG4taFZhWXl3RjVULTA/view?usp=sharing
alex-kas said:
Have you read my github?
https://github.com/alex-kas/nec_terrain/tree/master/system
If not, try to see there. I spent quite a time and I'm sure my phone IS working in both aspects you mention. Pay attention to: contacts, phone, attsettingsprovider and installation of "dw contacts". All of that is by purpose. Perhaps, my phone would not work w/o "dw contacts" but I just learned that a replacement (which joins phone app and contacts app, which are disintegrated once you remove attsettingsprovider) MUST be.
You will find there files: lists of enabled and disabled programs. Compare with yours. In adb shell:
pm list packages -d [gives disabled packages] -s [if only system]
pm list packages -e [gives enabled packages, all, system and 3-rd party] -s [if only system]
My lists contain ONLY system apps. 'system' are those who reside in /system/apk OR in /data but are upgrades to initial system apps. Hope this helps. If you have put there superuser - it is system now, for example.
I can also imagine that moving some app to sdcard makes the system buggy. I had no full skype autostart then it was moved.
hotspot in the name does NOTHING with tethering.
Click to expand...
Click to collapse
http://pastebin.com/1yRtvVhz
Thank you for your assist!!
And @jasonmerc thanks a bunch!! Giving it a shot now
EDIT: back online with wifi tethering and cell network thanks again guys
Edit 2: By the way, has anyone experienced unexpected reboots during high RAM usage? Games for example?
Sent from my NEC-NE-201A1A using XDA Free mobile app
@alex-kas after successfully applying your custom recovery and resizing my partitions i seemed to have lost my boot animation and sound. It just shows a black screen. Is this intended? Perhaps with the new build.prop?
Yeap, i disabled bootanimation. It seems to increase the boottime even more.
Sent on the go
Yes, I've experienced reboots when doing multiple things. For me it's usually just watching a video or something... Perhaps it overheats and that's what causes the reboot. On average my Terrain's CPU is somewhere in the 120°F range, and if I use it it can go up to 145°F at times. It will sometimes even get so hot that I get a notification stating the device is too hot to continue charging, and I need to try charging again in a few minutes. Is this normal?
Sent from my LG-D415 using XDA
jasonmerc said:
Yes, I've experienced reboots when doing multiple things. For me it's usually just watching a video or something... Perhaps it overheats and that's what causes the reboot. On average my Terrain's CPU is somewhere in the 120°F range, and if I use it it can go up to 145°F at times. It will sometimes even get so hot that I get a notification stating the device is too hot to continue charging, and I need to try charging again in a few minutes. Is this normal?
Sent from my LG-D415 using XDA
Click to expand...
Click to collapse
Hmm I thought I replied to this. I experience overheats as well, but mostly when using maps. However, I haven't been able to see a correlation between reboots and overheating. I have a feeling that when available memory gets too low the system becomes unstable and inevitably reboots. With the new partition size I was able to install hearthstone without any need for apps like Link2SD, but upon loading all of its assets to start an actual game session it reboots every single time. When not attempting to play that game, during times where the phone feels sluggish or unresponsive, it often follows with a reboot.
Daxiongmao87 said:
Hmm I thought I replied to this. I experience overheats as well, but mostly when using maps. However, I haven't been able to see a correlation between reboots and overheating. I have a feeling that when available memory gets too low the system becomes unstable and inevitably reboots. With the new partition size I was able to install hearthstone without any need for apps like Link2SD, but upon loading all of its assets to start an actual game session it reboots every single time. When not attempting to play that game, during times where the phone feels sluggish or unresponsive, it often follows with a reboot.
Click to expand...
Click to collapse
This is exactly what I have denoted as the kernel bug, see
http://forum.xda-developers.com/showpost.php?p=61915007&postcount=293
In addition to the info there: reboots happen if several not so big files (say, 50MiB each) are read in a row, not just a single file of > 500MiB. Loading a large set of game assets just confirms this.
I traced this bug and the point is that its origin is a mystery to me. It is in a part which I would never imagine was changed from the linux source. Just no need for this.
In short, the ext2,3,4 driver, reading data, then caches them (linux always caches, all it reads, as much as possible). At some point the cache request to allocate the memory just ignores the negative answer (i.e. no memory), it just does not check this answer at all and caches to NULL, i.e. start of the memory, where the memory map is. As it is the kernel, it has right to write there, writes, kernel panics - reboot.
How come? I have no idea. This code was already working in about 2005 ... and bug-free in about 2008 ...
@alex-kas you get what you pay for I guess...
Sent from my LG-D415 using XDA
jasonmerc said:
@alex-kas you get what you pay for I guess...
Sent from my LG-D415 using XDA
Click to expand...
Click to collapse
What exactly you mean? The phone is not that cheap. If new. Especially from att.

Lenovo A358t crapware problems

Sorry, I know that this isn't the place for a A358t, but I didn't find a forum/thread dedicated to this device, so I went to the closest thing.
I have several problems with this phone that I can't seem to figure out.
First of all, it got 4 stubborn applications that wants to run... always. They are: engriks, engrils, Adobe Air and pro.
Engriks and engrils I can delete through the app manager, and 'pro' I can disable... which would work for me (would've being better if I could delete pro as well) but after a phone restart (or after sometime) [with internet/wi-fi] they reappear as working applications. Google didn't yield any results. I would like to get these apps deleted/removed or at least disabled so they don't run.
I've disabled Adobe Air but it keeps enabling itself for some reason... and then after some time starts crashing and closing almost every 5 minutes... so I disable it again and after some time it re-enables itself and the cycle continues.
There are 2 other apps that I can't Force Stop or disable at all (System Apps)... they are labled completely in Chinese, so I can't say what they are, what they do or anything about them... but I'm pretty sure it's just other crap that the phone can do with out.
I've tried to flash the phone to a different ROM (just reflash it to the original stock ROM as this one I think is compromised) but the SP Flash Tool doesn't seem to work on this MediaTek device... I've being battling drivers, apps, cords and just about everything today with this phone with nothing to show for it.
The problem with this phone is that it constantly crashes, bottlenecks, freezes, throws constant errors, app crashes/closes...
I managed to factory reset (recovery was in complete Chinese.... I don't know a gram of Chinese) and the first thing I see after setting up the phone is that the app Adobe Air crashed and needs to close...
If I could get any help with this I would greatly appreciate it... thanks in advance!
Root the phone and remove the apps from your phone completely

Stuck in safe mode, can't access data in Samsung Notes

About a year and a half ago, most of my Google Play apps needed to update, but I've accidentally tapped to uninstall them. The most stupid idea I could got, was to restart the phone in order to revoke that miss - since than, phone can't start normally. It always boot in the safe mode, no matter what I've tried. There's always pop-up after loading that says sth alike "there is something preventing your system to start normally. Please backup your data and do factory reset, yadyyada..." I've managed to transfer most files to PC, but I can't access 2 years worth of notes saved somewhere in Samsung Notes. According to this thread, they should be saved in \data\data\com.samsung.android.app.notes but I can't access them, since Android Studio throws error "package not debuggable". I tried using ADB backup, but that will result in 1 KB file (empty), probably because Samsung Notes has parameter allowBackup="false" in its manifest. There was some effort to rewrite it, but mostly failed, since I can't use Linux commands on Windows. There is a chance, that the data is no longer here. All packages seen in Android Studio show size of 4 KB. But when i do space analysis using the files app after loading the safe mode system, it shows to house 11 GB of system data and 12 GB of apps - which I don't have access to.
Is there any way to either crack that Samsung Notes app, or to repair that corupted system? Maybe get some log to see, whats crashing the system? Last resort solution may be rooting it?
Thanks in advance for your help. Mark

Categories

Resources