How to record memory usage to troubleshoot random, non-reproducible crashes/errors - Android Q&A, Help & Troubleshooting

I am the mobile device manager for my company. We use Samsung Tab S4 tablets (Oreo 8.1) and Mobicontrol MDM for field workers and have been experiencing issues that we have not been able to recreate. The app in question is CAPI by Confirmit. We have been working with their devs but so far they have not been able to explain what is happening.
We have an alert set up in Mobicontrol to alert us to excessive memory usage but every time we receive the alert we have to hope to catch it in time to be able to remote tot he device to have a look but we have yet to be able to catch it in the moment, by the time we gain access the condition has subsided. Sometimes we get the RAM alert only, sometimes we get it in conjunction with an app crash, sometimes the app crashes without an alert. It may be that the memory spike is too brief to trip the alert, or it may be that they are only coincidental and not related at all. we just don't know.
I have been trying to find some sort of "flight data recorder" equivalent that can run on these devices that will be monitoring so that when the app crashes, or when a preset memory threshold has been exceeded, we can inspect the recorded data from the time previous to the event to hopefully identify the cause(s). So far I have been unable to find anything that does this, and my efforts at using Tasker, Elixir 2 with E Robot, MacroDroid, etc have been unsuccessful.
One of the major limitations we face is that the devices are in the hands of technically unsophisticated users. We lock down the devices fairly tightly using Mobicontrol application whitelists to limit what they users can do, but whatever solution we might come up with would have to be able to be communicated to and reliably executed by these non-technical users.
I thought maybe that enabling Developer Options and configuring debugging in the power menu would be an easy way to get debug logs but we don't permit Google or other accounts so email, Drive, etc are not options and I can't figure a way to save the logs to a local folder accessible by Mobicontrol so we can remote to the tablet to retrieve it. Nearby devices, Wifi Direct, or adb/USB connections don't work, either.
Any ideas? Would appreciate any thoughts or comments that might help us drive toward resolution of this problem.
Thanks!

Related

[Q] phone process priority

Is it possible to raise the process priority for the phone app? I've noticed that when the processor is under heavy load and I try to place a call it can take up to a minute between pressing the call button and the call to actually go through. Since this is a phone, after all, I would like the phone parts to take priority over whatever app happens to be hogging the processor at the moment. Can this be done?
Possible, probably not worth the trouble.
I've only discovered one tool that will change process priority, it is part of the SDK, which leads me to believe the process priority it written into the Java script for the program, the list of applicable code I found here. There is a somewhat easier alternative which I believe will help you with your desired end result, use the free Market app AutoKiller Memory Optimizer. It allows to control at what level of available memory the system will automatically kill a process based on the process class. The developer page has sufficiently detailed information about what each class is and there are varoius default settings as well it is fully customizable.
It seems that Autokiller Memory Optimizer came with my ROM (KaosFroyo). Any suggestions on what the optimal settings are? I see the listings on the developer website, but it seems like most people are just using the defaults (or maybe what the ROM set).
Which ROM are you on? It doesn't lag making calls on XTRSense. It is slightly overclocked and runs good.
Sent from my Eris using XDA App
KaosFroyo. I have had this lag with every ROM I've tried.
Define what you mean by a heavy load and what you are doing to make it work hard. Our phones aren't high end at all and although it does run faster on these ROMs, it still can be choked.
Sent from my Eris using XDA App
Any process that slows the phone down. Installing a new app is a common culprit. I often don't know what it's doing because it's doing it in the background.
I am more than aware of the phone's limitations, but I think that, given that it is a phone, the phone's processor scheduler should ensure that the parts that make it function as a phone get highest priority, even to the point of totally stopping other processes.
One other thing I've noticed is that the lag is often correlated with the data indicator being active. I know that on CDMA the data connection can't be active during a call, so could it be waiting for the data connection to turn off? Is there a way to make this happen faster? For some reason this happens even when the phone is on wifi, but I'm not clear on whether the 3G connection is turned off when the phone is on wifi.
shoofy123 said:
Any process that slows the phone down. Installing a new app is a common culprit. I often don't know what it's doing because it's doing it in the background.
I am more than aware of the phone's limitations, but I think that, given that it is a phone, the phone's processor scheduler should ensure that the parts that make it function as a phone get highest priority, even to the point of totally stopping other processes.
One other thing I've noticed is that the lag is often correlated with the data indicator being active. I know that on CDMA the data connection can't be active during a call, so could it be waiting for the data connection to turn off? Is there a way to make this happen faster? For some reason this happens even when the phone is on wifi, but I'm not clear on whether the 3G connection is turned off when the phone is on wifi.
Click to expand...
Click to collapse
You can use Systempanel to see what processes are running. In my case Youtube, Maps, Google search, Pandora, and Shazam randomly start backup processes. I downloaded Autokiller to see if it keeps them ended. The only concern I have is I want to be reasonably sure it wont end the alarm process.
The thing is I don't particularly care about these processes running. Given the limited resources of the phone I think it is a fruitless task to try to keep it from ever getting slow and still enjoy all of the awesomeness of Android. I just want the actual calling parts to be able to take top priority no matter how slow the rest of the phone is running, just like most desktop OSes give the mouse high priority.

Clocksync, why needs to be sync?

hi there
i wanted to know what is the real reason for we have to use an app such as clocksync (great by the way).
for instance, my old 10 years nokia doesn't need "resync" and keeps the right timing while my smartphone now needs to have the time corrected otherwise it will drift away plenty of minutes.
and also, in order to sync with clock sync, i need a data connection, but if i travel overseas and i keep my data roaming disabled, i will never be able to do that, correct?
thanks
gabrio
Who says you have to use the app? I use it mainly on my touchpad because the clock gets reset sometimes and the market doesn't work because of it, unless this happens on your phone you don't need to use it. Yes you need a data connection for it, or wifi.
It is hardly ever really out on time but I like to be precise so even since the days of WM have used applications similar to clock sync and clock sync therefore is essential to me...
Sent from the valley of the shadows....
I'm ClockSync developer, your question is answered in the application FAQ:
Q: Why would I need ClockSync, Android already has Automatic setting for Date & time?
Not all the mobile operators support automatic time synchronization mechanism called Network Identity and Time Zone (NITZ), therefore this setting may have no effect at all. Even if your provider supports NITZ, the information it sends may be inaccurate. There are also devices without SIM card, especially tablets that have no access to the network time. If Android Automatic mode works fine for you, then you are lucky and probably don't need ClockSync, otherwise it's recommended to disable it to avoid conflicts and getting incorrect time, see also a question about wrong time after synchronization below.

[Q] Multiple Android devices, synchronized alarms, remote(?) snooze/dismiss

I have a somewhat complex question, and I am hoping that someone knows a good approach or apps that I can use.
I have Android devices in multiple rooms around my house, primarily set up as clocks, all on the home wi-fi network, of course. I have a primary phone, a couple of retired phones with wi-fi only, a couple of tablets with wi-fi only. (My eventual goal is to have them all connected together for several purposes, including an intercom system; this current project is a stepping stone.)
I have reminder alarms that go off all day long. Due to physical problems, the ability to control an alarm remotely is very handy.
I used to have the reminder alarms on my chumby, and I could ssh into that and control the alarm. I could change the alarm time, snooze, turn alarms on or off, etc. I used to just ssh into the chumby, then leave that konsole open on a virtual desktop on the linux machine, and switch to it when I needed to access the chumby. I also had an android remote control for it, very spiffy.
Sometimes, though, I was in another room and I didn't hear it. Problematic.
Yes, my obvious solution is to put all the alarms on my phone and carry it with me all the time. Except if I were the sort of person who has a mind like a steel trap, I wouldn't _need_ the reminder alarms in the first place It doesn't help much if the phone alarm is going off and it's three rooms away. Either I won't hear it, or I'll have to get up to shut it off, and I might not be able to.
So here's what I'd like to do:
* For each alarm, ALL the android devices sound off.
* Snoozing or dismissing the alarm from one device snoozes or dismisses the entire alarm (they all stop making noise, and they all start again when the snooze is up).
* Snooze or dismiss the alarms from my linux box with the same effects as from the android devices.
* Have some way to direct the alarms to just my phone until further notice--when I am going to be out of the house, I'll still need those reminder alarms, and the poor dogs don't need to deal with alarms sounding for hours until I get home.
1) It seems like the easiest way to manage this would be to set up something like a streaming media server on the linux box, and have it play on each of the android devices at times set up in a crontab. I *think* it was possible to stream media through multiple chumbies at the same time, so surely it's possible to do it through multiple android devices? Yes?
But I don't know how to use one to snooze a program set off by a crontab. I also don't know how to divert all the alarms to my phone [for use when leaving the house] if the alarms are primarily controlled by a linux server at home. I don't think my wi-fi reaches that far.
2) It seems like the next-most easy way to do this would be some kind of script that remotely controls the various android devices, but I have no idea where to start. I do know that you can access the terminal on an android phone, you can write shell scripts, and that you can ssh into phones if you have the right apps. What I don't know is how to control the android alarms from the command line or how to synchronize media on multiple devices.
Again, I'd want to snooze/dismiss alarms from any of the android devices on the wi-fi network, or from my linux computer.
I'd want to be able to turn off all alarms except the primary phone occasionally. It'd be awesome if the other devices could automatically detect if the phone were on the network, and only sound if it were present.
3) Other options? Are there apps or programs or scripts or methods that I don't know about, that would make this easy-peasy? Am I fretting when there is already a solution?
Thank you.
Bump? Please? Anyone? Anything?
Well, I'm just throwing my thoughts out there. This definitely sounds like a difficult task.
I assume that you are not able to write your own android apps, neither am I. So we just can't build our own solution.
I don't have an idea that solves all your questions, but I have some ideas for some of them.
Regarding your need to change the behavior if you leave your perimeter:
There are apps that can trigger predetermined tasks based on your location (wifi, GPS, etc), so you could use that.
You definitely need some kind of Webserver, connecting your phone to the other devices when you're on UMTS.
There are apps like "Android lost" that enable you to remotely control your devices, for example triggering alarms, etc. Maybe you could put that into some use.
Regarding your idea with the streaming server:
Could you set up all the devices so they start playing as soon as the server starts streaming? Maybe let vlc constantly run listening to your server on all the devices. Or a Internet radio is probably better because it can run in the background playing "silence" the whole time.
Create a shortcut on all devices to send a command to the server to stop the streaming, those servers should be manageable through ssh.
Install a normal alarm on your phone. Combine this with the location based triggering, so it is only turned on while your outside your house. Have a shortcut on your phone to manage the server and the house alarms as well.
I think this might work and should be actually be possible to realize.
I know this is not well written at all and not really in a straight line, I just made it up on the fly.
I'll try to turn it into a Tl;dr
1. Set up Internet radio server on your home network.
2. Tune all house devices in to said server.
3. Play alarms over Internet radio
4. Use command shortcuts to turn off alarm
5. Use app to automatically toggle the alarm on your phone based on your location.
6.???
7.profit
Let me know what you think, especially if it was any help at all. I like projects like that!
Sent from my GT-I9300 using xda app-developers app
Okay, great, that is really helpful and gives me a place to start Thank you!
I do have Tasker, and I'm willing to buy other apps if they look like they'd help, but I think Tasker is probably going to be my biggest help with the location detection.
I do not have any idea how to tell Tasker "turn off alarms on [primary phone] phone if [home network] is detected, turn on X, Z, and Q alarms if [home network] is not detected." I've played around a bit with it and realized that getting Tasker to execute specific actions with other programs--in this case, Alarm Clock Xtreme--is really kind of obscure, if it's even possible. It must be possible, yeah?
--Wait, is there an alarm clock for the Alarm Control Freak that will *also* detect [home network]? I loooove the way I can use Alarm Clock Extreme: unlimited numbers of preprogrammed alarms, just toggle the ones I need; all kind of options with respect to what happens when the alarm goes off, choice of snooze duration, etc etc. If there's one like that that _also_ has the option to detect location, that would be awesomeness.
Or...hmmm...I suppose I could have it freeze Alarm Clock Xtreme if it's on [home network] but activate it if it's off. I really do have to get around to rooting the phone, I suppose.
...
Do you have any suggestions for what to use for streaming from the house server, and what apps to use for receiving the streaming? Oh, I see you mentioned VLC (for some reason my brain parsed that as VPN); I'll look into that.
I think if there's a decent app for listening to streaming (suggestion welcome!), and the server can stream to all the devices at once, I can probably figure out how to use just one device to ...mute the server? (With the app itself, or a shortcut, or a short ssh script maybe.) Since they all need to be listening 24/7, muting is the thing to do, right? If I turn off the server, that could make them disconnect or stop listening, right?
I still need a snooze mechanism, though. Among other things, sometimes I need to postpone whatever the reminder alarm is going off for; sometimes I need it to help me keep track of the passing of time after the alarm goes off. It's complicated. I need to be able to snooze.
...
Question: In this setup, how do we prevent the alarms from going off on all the devices when the primary phone has left the house? I can see how we get the alarms on the primary phone TO go off, but not how we turn off the streaming alarms. I mean, I don't know how to tell the server to stop serving if it can't detect [primary phone]; is that possible?
It's not that I object to music playing when I'm not home. It's that if the dogs wake up while I'm gone, they'll need to pee. I'd really, really like not to have to clean that up every time I leave
Hm. A kind of bulky and inefficient way to do it could be turning off the streaming on the devices. Perhaps have them turn off the streaming app when the phone leaves the network, and then start it up again when they detect it again.
This is slightly problematic, because my house has very, very, VERY bad reception inside. We have to have a repeater (effectively a second network) for The Spouse's computer, which is FIFTEEN FEET from the wi-fi router. With no walls between. Really, really terrible reception. My phone drops off the wifi network, and immediately reconnects, dozens of times in a day. So does my laptop.
Soooooo I probably need a better metric than "is [primary phone] visible on wifi? No? TURN IT ALL OFF!" Maybe this is better: "Has [primary phone] been off the network for 15 minutes? Okay! TURN IT ALL OFF!" But reconnecting would still be a bit of a pain, unless the other devices only check for re-connections when the streaming app is already off. Hmmmm. I suppose they could check, say, 20 minutes before an alarm is due to go off, then 5 minutes before, and otherwise not check at all.
Except that, drat, it's the server that knows the alarm times, not the devices. They're _mostly_ on the hour, but not always. And what if I forget and it's partway through a "snooze" when I'm heading out the door? They should definitely shut off rather than continue once the snooze duration is up.
...
Nuts, it looks like this is not going to be the jumping-off point for a whole-house intercom system the way I hoped it would be. Not if everything is strung though the server, which is only working with streaming media. I could really, really use that intercom system. I just want to be able to touch a shortcut on one device and have all the rest of them repeat whatever that device hears. Then tap it again [to stop broadcasting] and let someone else respond, if they want to, from another device, the same way.
This will eventually need to reach to an outbuilding, with either a cat6 line run to it or a wireless repeater, so bluetooth won't do. I'm wondering if Skype set up to call all the other devices in the house would do it, but I want push to talk, not push to dial. (Not to mention the pain in the neck of giving each wi-fi only device a whole voip setup.)
(The various intercom apps I've tried don't work very well. The first time one of the devices leaves the home network, they never seem to reconnect and accept transmissions again. Even the apps that are _supposed_ to work if they have ANY kind of reception, including mobile data or other wifi networks.)
...
You've given me a lot to think about, thank you. But I know I am not there yet. I am wide open to further suggestions, for mechanisms, for apps, for anything!
Just a quick reply to signal you that I'm still there
I, hopefully, will come back later with a more detailed answer.
Regarding your WiFi connection problems, are you living in an area with a lot of different wireless networks present? Because this sounds to me like the channel your WiFi router is set to is already overcrowded. At such a close distance, as you described, there should be excellent reception. Unless other signals interfere, causing your mentioned frequent disconnects.
Solution: Download the free app "WiFi Analyzer" from the market and run it to see if other networks are causing interferences.
Regards, Ichwillquark
ichwillquark said:
Regarding your WiFi connection problems, are you living in an area with a lot of different wireless networks present?
Click to expand...
Click to collapse
Ah, no, actually. Quite the opposite. We're way out and surrounded by non-technically-minded people. We're the only wireless network anywhere near here, according to, for example, OpenSignalMaps and The Spouse's various wardriving type apps. Hm, pretty sure he uses Wifi Analyzer too, actually.
It's the freaking HOUSE. We can't get _any_ reception inside; not wifi, not cell, not radio, not TV. Go three steps outside the house and we have crystal-clear cell and radio reception. We've _tried_ to change "channels" on the wifi router, change routers, change DSL modem, all kinds of things; nothing works. It's the freaking house.
Being so remote is part of the problem. I have reminder alarms that go off all day; if I leave, I am gone ALL day. The poor dogs!
...
Thanks for bouncing the signal and letting me know you still exist I do too. Would love to hear anything else you have to suggest. [Hey! I think I finally hit the minimum post limit necessary for being able to click "thanks!" Spiffy!]
I don't know how helpful to you this could be, but Timely, a recently created alarm clock app has alarm syncing. I don't know to which extent (snooze sync?) but it might be worth inquiring to the creator(s).
There's a trial function too from what I can remember, but after that you will need to purchase whichever functions you'd like to keep.
https://play.google.com/store/apps/details?id=ch.bitspin.timely
If this suits you, I imagine it would be more convenient than a convoluted Tasker task.
polobunny said:
Timely, a recently created alarm clock app has alarm syncing.
Click to expand...
Click to collapse
"Manage, dismiss and snooze alarms on all your devices at once"
Oooooooh, that sounds WONderful!
That does sound a lot easier than running a media stream from a server, and working out scripts to snooze or dismiss.
I don't _see_ any mention of anything except a ringtone for the alarm sound, either on Play or on their website. I'll try it out and see.
...
The Tasker [or some other location detection] looks like it's still going to be necessary, though, and I still don't know how to do it. I need to disable the alarms on ALL the other devices when I--and the primary phone--leave the house. But the alarms on the primary phone still need to go off.
So I do still need some way for [something] to detect the phone, and to disable the alarms on [everything else] when it leaves the house.
...
Oh, POOP. Timely is not *compatible* with some of the devices.
Those are rooted Sensations with ancient versions of Android. If I put updated ROMs on them, will they be able to handle more recent apps? I mean, they can't even get Google Play, currently, they're still using Market. We didn't want to mess with them, because re-setting up a phone is annoying enough once, and we _thought_ they had all the apps they were going to need.
elfchick said:
Oh, POOP. Timely is not *compatible* with some of the devices.
Click to expand...
Click to collapse
I might be wrong, but this might be just because the resolution of some of your devices is not supported. Which doesn't necessarily mean that the app won't work just fine, it's just the market trying to safe you from an inconvenient user experience. A possible workaround would be to download the app on a supported device, extract the apk, and then install them on the unsupported ones.
Other workaround would be to get an app that spoofs the information that is send to the market about your device's resolution. I just read about this possibility today. The xposed framework has an applet that does that.
Interesting about the possibilities of getting an app installed without the Market's "approval"; I'll try that if Timely responds to the questions I sent them. And hey, if it's just that I have a really old ROM on there...well, it might be worth updating the version of Android on those phones anyway.
...
I just read about NFC tags, and I wonder if I could use them for this. Apparently you can buy NFC tags and program your phone to recognize them. So you can, for example, save battery by tapping the phone to a pre-programmed NFC tag on your door as you are leaving, and the phone will turn off wi-fi.
Perhaaaaaaaps I could use this in some way to turn off alarms in the house as I am leaving. Tap the NFC tag, a script disables the alarms on everything but [primary phone]. Tap it again when I get home, re-enable the alarms. That way nothing has to be constantly checking for the presence of [primary phone]. I can be scatterbrained, but if I put it by my keys I *should* manage to see it and remember to tap it, and tap it again when I get home and put my keys away.
Very intriguing. This seems like it _might_ be something I can script. As soon as I figure out just what I need to do to disable and re-enable alarms automatically.
Don't forget it's necessary for your phone to be NFC enabled. So definitely the Sensation cannot use the NFC directly, don't know which phone is your primary so that's to consider.
polobunny said:
Don't forget it's necessary for your phone to be NFC enabled. So definitely the Sensation cannot use the NFC directly.
Click to expand...
Click to collapse
Yeah, thanks The Sensations were retired this year when we replaced them with HTC Ones, so not a problem. I thought it'd be more clear, though, throughout the thread, if I use phrasing with descriptors like [primary phone] instead of expecting people to rmemeber which of my devices is which. (I found this thread hilarious; I could almost have been the one who wrote it: http://forum.xda-developers.com/showthread.php?t=2486180 ...very helpful.)
I'm thinking touch the NFC tag on the way out and the way in, and [...profit?] the HTC One somehow sends signals to the other devices to disable/re-enable their alarms. Don't know how to do this yet, but it seems like a MUCH better idea than having all the other devices constantly scanning the network to make sure they can find [primary phone]. Especially since they might be trying to find it while it's temporarily disconnected.
Hey elfchick, just following up as you mentioned that syncing multiple devices for an Alarm clock app was just a first step and I was wondering if you had taken this concept any further?
I've got several unusual ideas about setting up tablets as Home Automation devices and wondered if you had taken this idea any further.
Thanks, Earl

[Q] Play Services cut-off my cellular abilities when there's no internet

Hi everyone - I actually don't know who else to ask but this issue has been driving me mental for the last couple of months. After days and nights of investigating and looking through various forums and articles, I think I can find (or try at least) the words to describe my problem more...technically))
So OK, first off the device is Huawei Ascend G510-0100 running KitKat under the Cyanogenmod platform but the issue was already present with the factory's 4.1 ROM. I thought rooting the phone, installing just brand-new everything and having a bloatware/clutter-free Android OS would rectify all the causes of this nightmare but no. I'm not the only one with this problem: Google-search the issue and you'll find numerous forum threads where users seek for a solution to this "software loophole" as well as one of my friends (Galaxy S2) and another one with the HTC One X+ so I rule out my phone's model, OS version or just my device being faulty from the list of potential causes.
So - every time I turn my WiFi off on purpose or when I go out of my house (where logically my phone looses home's wireless signal) - the location services and the app synchronization processes stumble, mess up, run into and furthermore cause internal system mess-ups from such "unexpected" losts of internet. After that I can't make a phone call, send SMS or run USSD codes (checking credit balance etc) but I can still receive calls and texts - basically I fail to reach my cellular services but the service can still reach me. Turning Airplane Mode on and then off or simply restarting the phone altogether temporary fixes the cellular problem until the next time the internet becomes unreachable to Play Services. I tried turning location and sync off, tried different location/sync options...I wish I could disable Play Services but then I wouldn't be able to use the Play Store - | tried messing around with probably every single option available and possible but the Play Services still failed me and.......I honestly don't know what am I missing and where to look next
Edit: (I never use the mobile data btw)
Any suggestions? Anybody? I'm hopeless at this point :crying:
Thank you all...
...
Anyone? Please...

Detection of Keylogger

Good morning,
I have a Galaxy Tab S that is rooted. Yesterday morning I woke up to a Skype message tone hoping that my family had sent me a message. However, I noticed that messages were sent to few of my contacts with an attachment from my account. It is obvious that something fishy is going on. I am just not sure how bad it is. My tablet is the only device with my skype account.
I ran two antivirus software scans 1) Kaspersky - no issues detected and 2) AVG. AVG identified two warning
1) "Unsecure privilege mode detected. Your device is running in High Privilege mode (i.e., it has been rooted) we recommend using only genuine firmware"
2) Enabling 'USB Debuggin' is not recommended unless you use your device for software development purposes.
I just rooted my device and am not using any custom ROM. I have rooted it about close 3 years now and never had any issue. With regards to the second message, I don't ever recall enabling the 'USB debugging' and I can't even find that option to turn it off.
Can someone please let me figure it out what is going on with my situation and what are the next steps. I haven't rest my accounts as it was useless cause this is the only way to access the internet. I would first solve the virus or keylogging issues (if the case) and then fix on working resetting the accounts.
I use only my office machine (which I am using it right now) to access my bank accounts or my personal emails. The tablet is mostly for Streaming apps, games, and Skype.
Any help would be greatly appreciated. Thank you for your time and advice.

Categories

Resources