Tasker & Other Background Apps Closing (Android 9) - Android Q&A, Help & Troubleshooting

Hi all!
BIT OF BACKGROUND
Before I post this I wanna say I posted this earlier thinking it is a Tasker issue, into Reddit sub for Tasker. But it seems that it is an Android issue. I have in detailed mentioned what are the problems below. No one could identify this issue.
If you have any suggestion please help me out. Looks like this is the worst Android One phone I have got.
There is even a log in the end of the post. If someone can guide me on how to understand which app is force closing it, it will be great.
Thanks a lot in advance!
-------------------------
Hi,
I have been given a phone by office to use to send Whatsapp messages in the early hours of the morning.
This is a Infinix x604B (Indian Model) running stock Android (One) version Pie with security patch 5 March 2019.
I have unlocked bootloader and rooted with Magisk. (this issue was there since it came originally with Android 8)
I have a problem of Tasker and Autoinput not staying open in the background. I use these two along with
Whatsapp
Clipper
Autoresponder PRO (SMS
AutoResponder for WA
And the only one that doesn't fail to work in the background is AutoResponder for WA and Whatsapp.
Till now searching the forums and other places I have
1. Set the battery setting to "NOT OPTIMIZED"
2. Intelligent power saving standby - SET TO OFF
3. Battery Saver - SET TO OFF
4. Adaptive Battery - SET TO OFF (there is no option to exclude apps in this)
5. Developer Options - Background Process Limit - SET TO DEFAULT - STANDARD
6. Developer Options - Standby Apps - All the running apps are - SET TO ACTIVE
Under Tasker
1. App Check Method - App usage stats OR Accessibility (Both are used and still it closes)
2. Use Reliable Alarms - Always
3. Tasker has been given all permissions and others which connect with Android (only device admin is not permitted at the moment)
All the above don't work
As someone suggested in another post in Reddit, to use sys.keep_app_1 and I have added to build.prop and that doesn't bother at all. It still closes.
It barely takes 15 minutes to set the phone in idle stage and Tasker and AutoInput both will be taken out from the BG list.
In Accessibility options they both will appear as "This Service Is Malfunctioning" and have to disable and enable it back to make it work. Then it will be dead in 10-15 minutes. Very short time.
Till now i have reset the app, cleaned the preferences and started all over again without restoring the xml file for profiles and tasks. Still no change here.
Here is the Tasker log which I am sharing here. Hope you can get something out of it.
https://pastebin.com/zzdCugjP
Is there anything I can share to help?
Thank you!

Related

[GUIDE]Better Battery Life 101, App/System Settings - It's not the ROM

This post is about getting great battery life for the average, every-day user. It is not inclusive or exhaustive, so it will reference other posts. What is talked about is what I did, the user-level stuff, explained in a more user-friendly fashion than some of the more diagnostic-focused posts out there (still invaluable reading, though).
Note: I originally wrote this for the Hyperdrive ROM on GS4 thread, but I've had many requests to break it out into a separate [GUIDE] post and update it here for ease of subscribing and discussing. Also note, that therefore, this should be considered sort of Android 4.2 specific and may not apply to all versions of Android. So, here it is. I'll link the old post to here shortly.
Preface
Okay, I'm writing this because I believe that @sbreen94 @eschelon @iceandfire @Imoseyon @TrevE and @ktoonsez all have done awesome, awesome dev work from which I have benefited. There are SO many other devs, as well. These are some from whom I directly benefit, regularly, daily, or did at one time. If you want a name added to the list, I'll update my post. This post, though, is sort of Hyperdrive specific since @sbreen94 has added a few tweaks that make it SO EASY to address some major offenders of ... sucking the life out of your battery.
Why do I mention this? Because does anyone truly think that a ROM dev or Kernel dev, compiles code, puts it on their device, runs it for days/weeks, validates it with experienced, community testers, and then releases it, all the time thinking, "well, the battery life sucks, but I'm gonna push this out anyways."??? NO! So, then, WHY does every ROM/Kernel thread have post after post, of people saying “Hey, I loaded this ROM and my battery life sucks now.” Do you REALLY think it's the ROM/Kernel?
We also have those that think they have no apps loaded, or “only 3, 4, 5, or whatever number” - so it can't POSSIBLY be an app! If you think that, then do this, Wipe your Dalvic Cache, reboot your phone, and tell me the number of apps it says Android is now optimizing. That is the number of apps you have on your phone, not the number you personally loaded. That means each one of those is a potential culprit for causing battery drain.
BTW – at one time or another, I've probably been guilty of every of the above mindsets. So, I'm not calling YOU out, if YOU are reading this and think that I am. I'm just saying, it's not the ROM, and it's not the Kernel.
Background Reading
The below two threads had everything I needed to know to get started increasing my battery life. I, probably like many reading this, had for a long time followed along, envious of screenshots of people getting those 3, 4, 5+ hours of screen time, and day+ or days of battery. After reading these threads, doing the analysis, and basically just changing some app settings, I can now get the 4-5 hours of screen and full day of battery out of my GS4. Kernel doesn't have much effect, ROM doesn't have much effect, most all of them do what they're designed to do, and do it well. Sweet.
In the next section, Real World Battery Saving, I'll explain what I did, so if you want to skip the background stuff, you can.
These two threads contain basically everything you need to know about improving battery life. They have great details about diagnostics, what's what, etc. What many threads/posts like these sometimes lack, is, the straight-forward answer of “This is what you should do after analyzing x, y, z.” That's what's in the Real World Battery Saving section of this post.
[APP][2.1+][09 Sept. - V1.14] BetterBatteryStats
[GUIDE] Wakelocks Definition and how to prevent them
Read those threads, and do some analysis, and the majority of what I've posted below you'll figure out on your own. If you just wanna jump into fixing things without the above understanding, then just go to the next section. Provided there aren't any seriously misbehaving apps on your phone, you should be able to get great results without becoming a Wakelocks, Alarms, Deep Sleep, etc., expert.
Real World Battery Saving
For those of you that don't want to read too much more about the analysis of apps, etc., to get to better battery life, here's the summary of what's in the section below:
Minimize screen brightness
Disable all Push
Disable all system sounds (Dialing keypad tone, Touch sounds, Screen lock sound, Haptic feedback)
Install Xposed Framework and use:
Greenify Donation (Experimental features)
NLPUnbounce
Greenify any app that you don’t need to notify you of things - Note: If you pay for Greenify Donation and use Xposed, you can still get alerts from any GCM-enabled app (look for the blue GCM icon next to apps in Greenify)
Greenify every Google app (except Voice and Hangouts, both of these may significantly delay or prevent proper message notification, despite being GCM-tagged in Greenify, and they seem to behave okay on their own)
Uninstall GMail (use any other client with IMAP)
Disable all GPS (enable as necessary upon use) Note: I really don't do this anymore. With apps under control with Greenify, I just leave my GPS on and let apps use it when necessary. I have noticed that GPS will stay active during Airplane mode, though, so as not to have my phone dead upon landing, I generally always turn off GPS when in the air.
Disable the autostart of almost everything, at almost any time, on an app-by-app basis. AutoStart Check delivers in spades for this function, at no charge, though, I recommend donating (as I do for all apps here, I have either donated or bought them all, Lux, Greenify, etc.). Note: With Greenify, I no longer worry as much about stopping apps/services from auto-starting. I do still use Xposed plugin BootManager to prevent certain apps from starting, mostly just to increase boot speed (or so I feel like it might). I don't use AutoStart Check at all anymore.
Continuing on with details...
Note: Required app functionality. You don't have to use these if you know another way to do it. But, to accomplish what I recommend, there are 3 key apps you absolutely must have. I'm not going to explain them all in great detail, as there are plenty of other places that go into great depth on all of them. The 3 essential apps that I use to increase battery by more than 50% are:
Lux (Pro - I'll explain why below)
Greenify
Xposed Framework
In general:
You want your phone to sleep when not in use.
You want apps to not be doing anything when you're not using them.
You want your screen to only ever be as bright as it needs to be, no brighter (including, off when you're not looking at it).
Display Brightness
Lux – Get it here Lux Auto Brightness
Thread here: [APP][2.3+] Lux Auto Brightness 1.51
Update: After posting this, and getting a lot of questions/comments that Lux doesn't really rock like I think it does, I checked it out on a phone without using the Pro version. Okay, I agree, the free version really doesn't deliver. It doesn't poll right, and you can't really set your custom lighting scenarios and lock them in correctly without using Lux Pro. Basically, if you want to save tons of battery life without a lot of constant manual intervention, you're going to have to purchase Lux.
Screen uses more battery than anything. You can do all kinds of things to address this, for me, Lux has been a (battery) life saver. It's easy, it reads the ambient light in your environment. Open its dashboard, slide the slider to the brightness that works for you at that lumen level, hold down the link button in the middle, and there you have it, locked in for those conditions. You only have to do this a few times and you now have custom lighting profiles that fit your eyes' needs under all conditions. Note, sometimes, when waking the phone in the sun, you'll have to wait a few second for Lux to activate and bring the screen up bright enough. This means that Lux is behaving extremely well and not constantly running in the background (Wakelocks) sucking up battery.
Applications
For applications, firstly, if you have an app that has Push available, disable it. Nothing keeps your phone from deep sleep like a Push-enabled application. If you can't wait 5/10/15 minutes for updates, then you can't achieve maximum battery life. Sorry, I don't make the rules of Android app-physics, I'm just sharing them with you.
In my mind, I think of applications in categories. I guess, I have 4 now.. I started with 2. Point being, there are different apps that behave differently so you treat them differently with different solutions for extending your battery life.
Category 1 Apps I want running and want notifications from them. When configured properly, they generally do not misbehave and eat my phone's battery
Category 2 Apps that I cannot seem to control, regardless of their settings, but I still want to be able to use, but getting regular or instant updates from them is not that important to me
Category 3 Apps behave without any special settings and without any Greenification. Just load them, run them, use them, don't worry about them. I haven't seen them cause any sort of bad battery drain.
Category 4 Apps are apps you DO think are vital/desirable (to you) but cannot control their battery consumption with mere settings. For those, only the developer can help you, or you have to accept the battery loss that app's notifications bring with it.
Category 1 apps, well-behaved when configured properly, along with the settings I used to make them behave well and still deliver their updates to me.
Corporate E-mail: Built-in e-mail, TW or AOSP. Disable Push for any account, use Priority settings for 15 minute interval on work days. Non-prioirty times set to 1 hour.
Maildroid: For every account, you must do this separately, under Preferences / Advanced – Connection Management, select first account, the rule (usually 1. Default), Connection Management, Wi-Fi: Close connection when I exit mailbox, GPRS, 3G: Close connection when I exit mailbox, Interval to check mail: 10 (or to your liking), Check Mail Periodically. Go back, go back in (confirm settings were kept, I've seen it not keep them and have to do this a few times, per account). Alternatively, select Let device sleep, and it will only check when you wake it up. Go back to Accounts and select your next account, do this again. You must do this for all accounts listed.
Note about all mail client: If you have more than 2 or 3 e-mail accounts, Maildroid and all other IMAP clients I have tried get moved to Category 2. Basically, they start to keep enough Wakelocks that they keep the phone from going into Deep Sleep as much as I'd like. This is a difference of 1-3% per hour at idle, but if you're looking for 4+ hours screen time, then you need to Greenify them and just check e-mail manually.
Viber: Just make sure your Wi-Fi sleep policy is set to device and not constantly on, and Viber seems to behave pretty well as far as messaging apps go, but it's probably going to make the Category 4 list, as well.
WhatsApp: This one appears to work well (better than Viber from a wakeup perspective) and not have any sort of unnecessary battery drain. I generally don't use it any more since I feel they bait-and-switched me from free to fee, but I dethawed it to check it out. If anyone sees problems with it, let me know.
Category 2 Apps. These apps were keeping my phone awake at night with nightmares, and no amount of settings changes seemed to fix the problem altogether. If you have a solution of app settings that would move these to Category 1, please let me know. When I say solution, I mean, you've done the Wakelock and Alarm analysis and they're eliminated or minimized. For these, I Greenify them all. None of these apps' updates are so important to me that I can't just check up on them when I have a moment.
Facebook: I didn't play too much with settings here, but it seems that if FB is running, it's keeping your phone awake. I Greenify it and check it manually. I'd be interested in hearing if someone knows settings that will get it to not wakelock / alarm constantly.
FB Messenger: I love the chat heads and ease of use, but it's a big-time battery offender. I keep it installed and Greenified. If I get messages, I'll see them when I open the FB app, and when I reply, FB Messenger takes over and I use it normally until the conversation is done. At some point, Greenify takes over, and FB Messenger's battery damage is contained.
Google Maps: You can't fix this thing. No amount of settings will stop it from going after your phone. I love its functionality, though, so, unlike many guides that say uninstall it, I say Greenify it.
Google Goggles: A fun one to have around sometimes, but it will also chew up battery. Just Greenify it.
Google Play Store: There are plenty of apps and Android wakeups for the Play Store. I'm not worried about missing an update notification, or whatever else it might be sending my way. Greenifying it seems to have fixed the Google Play Services Alarms issue.
Almost everything else: If it's an app that doesn't need to provide you updates, just Greenify it. Why not? One of the first things I do after loading a new ROM and getting most of the configuration stuff done, is I go into Greenify, and I add every mundane app on my phone, for example: Vonage, Adobe Reader, Airbnb, Angry Birds, APN Manager Pro, Google Authenticator, Barcode Scanner, Citibank, Craigslist, Google Drive, DroidVPN, ES Task Manager, Fast Charge, FasterGPS, Flashlight, GasBuddy, GNotes, GooManager, GPS Status, Hyatt, Lucky Patcher, Office Document Viewer, Office Suite, OpenTable, Opera Classic, PayByPhone, SoundHound, Squeezebox, Street View, etc. My list goes on... You aren't going to lose their functionality, they don't suddenly stop when in use, and you don't have to worry about them ever causing problems you weren't thinking you had to look for.
Category 3 Apps that behave, no special settings, no Greenification
Alarm Clock Xtreme: I don't use the built-in Alarm Clock. I like all the features of Xtreme, it's never failed me, and it doesn't show up in Wakelock/Alarm offenders lists in my analyses.
Google Voice: Of all the Google offenders, this isn't one of them in my experience, and I love its features.
Lux: Nuff said.
WhosCall: A caller-ID type app. I don't love it, but haven't gone looking for something better, that said, it hasn't popped up on my battery draining radar, so that's a plus.
Hangouts: While I don't care for the new Google Talk, it sure doesn't seem to be a battery offender, and I use it to chat regularly.
Category 4 Apps are anything that would have gone into Category 2, but you want them as active as possible.
Line: In Settings, Chats and Voice Calls, I turn off Receive Voice Calls. This made Line tolerable (as in, way better), but it's still a Category 4 until (if ever) its devs reduce its number of wake-up Alarms
Exchange Services: Despite Corporate E-mail being a Category 1 now, Exchange Services is still keeping my phone awake more than I'd like. Nothing I can do here, though, so I live with it.
Viber: As stated, it's not a terrible offender, but it's still on the radar for keeping my phone awake. We'll see what their “any day now” major update brings. (someone remind me to update this post if I haven't post-Viber release)
Have Your Google and Your Battery
The Xposed module NLPUnbounce is awesome. I've given it a nice test, and it seems to perform excellent. NLPUnbounce allows you to use Google services as usual, including Android Device Manager features, like Remote Locate and Remote Wipe, but not do the crazy, crippling and disabling of Google Play Services like many guides have you do. It changes the polling rate of NLP (Network Location Provider) to something VERY reasonable. I haven't modified any of its settings, and it's reduced average idle consumption from ~4-5% to ~2-3%. I tested locating my phone and ringing it, all working.
Automatically Launching Applications
Not so much needed anymore. Just make sure you Greenify. For the "big things", use Xposed BootManager module.
AutoStart Check - Get it here https://play.google.com/store/apps/details?id=ro.rbrtoanna.autostartcheck&hl=en
Fire up AutoStart Check (or any other autostart configuration app), set your view to Group by App, and expand every one of them and look at just how many different places some of these apps are set to start. Your Gallery starts with your Camera? ES File Explorer starts when you mount media or remove bad media? Facebook fires itself up just because you plugged in your phone. Google Goggles sees fit to start with every picture you take - and of course, it will then either drain your battery trying to get a GPS signal while your GPS is off, or drain your battery by getting one – fail. If you use S Health, it starts when your time zone changes – that's important. YouTube, seriously, YouTube – change accounts, mount media, connect power, every boot – you obviously need YouTube to fire up. Yeah.
A note here, read some guides on these before turning off too many system services. For example, don't disable messaging, bad idea, bad things happen. But most of this stuff, turn it off. You aren't killing your ability to use it, you're just making sure it isn't turning on all the time. If you've also Greenified well, after using any of these, they'll hibernate in the background without you having to worry.
Disable all system sounds (Dialing keypad tone, Touch sounds, Screen lock sound, Haptic feedback)
This is explained in some of the other threads, but, if you don't want to do the research, basically, the background services in Android that manage these things keep your phone awake. Turn them all off, battery life goes up.
Media Scanner
@sbreen94 included in the Hyperdrive Tweaks tools a one-button solution to turning it off. If it's drainging your battery, or you just want to make sure it doesn't, go click the button. This thing is better than the Staples button!
I'm sure there's probably a more generic way of stopping/managing Media Scanner. Someone please let me know and I'll update this section!
Battery Save Apps
I used to be madly in love with 2x Battery. Others swear by JuiceDefender. I guess if you don't/won't want to take the time to optimize apps and Greenify, they might be beneficial. You know what I found, though, when I started down this path? Some of the biggest offenders of Wakelocks and keeping my phone from sleeping when it should, are these battery saving apps!!! I now get BETTER battery life WITHOUT 2x Battery!
Short thoughts on this and example concepts of what's going on...
It may sound counterinterintuitive, but it seems most of the apps are so vigilant they keep your phone awake when it could be sleeping. And the vigilance isn't so necessary when you've properly configure things to not need this sort of overactive management of things. I'd love to see 2x Battery properly manage my data connection for me, without Wakelocks, but what's to say that the app trying to sync when the data is off won't now stay awake with new Wakelocks trying to get out to the internet? There's a cascading effect of whatever approach you might choose, so try to think about that, and keep it in mind when you look at your Wakelocks and your Alarms and you do your analysis.
The End
Okay, so I think that's aobut it. I may have forgotten some things, and I know this is a long post. But, this leaves very little excuse for people to blame ROMs/Kernels, while at the same time giving you the straight-forward, real world answer to battery savings 101. Yes, there are apps and details I left out. If anyone thinks of some obvoius ones, just let me know and I'll happily update this post.
You don't have to analyze any statistics or logs to do this. The principles are sound, and you'll see a dramatic improvement in battery if you don't already get a day of usage and 3.5 to 4.5 hours of screen time on your GS4. You just make some of these relatively straight-foward, user-level, common-sense changes.
If these changes don't give you the results you'd like, then do the analysis work in the threads linked above and find out what's the real culprit. Profit, enjoy, be happy. And remember... It's not the ROM.
Thanks for the thread, Bill. Here are a few of my questions/comments:
Regarding Lux, I used it for a few days, but could never seem to get a setting that worked for me. Whether using periodic updating or any of the other modes, the brightness level always seemed to adjust either too frequently or too slowly. Then I started experimenting with night mode and it got even worse. Do you have any suggestions to a quick and simple setup that won't drive me insane?
In terms of greenifying different apps, I always make sure that my SMS app and alarm clock are not greenified, and I don't use any widgets on my homescreen, but what about apps like Better Battery Stats, Boot Manager (for Xposed) and Automagic (flow chart based automation app) that are monitoring events and automating my phone? Will Battery Stats stop recording data is I set it to hibernate? Will Automagic miss a trigger I've set if it's hibernating? I would like to greenify EVERYTHING that I know won't cause any issues, but notifications aren't the only thing happening in the background that I want to allow.
Then, expanding on the autostarts, I mentioned that I use the Xposed module Boot Manager. This doesn't seem able to handle all of the situations that you described, like apps being launched based on SD card state, network state, etc. Am I missing something in this app or will I need to go another route to get all the options you've descibed?
Regarding the SD media scanning, my current ROM is a very debloated lean and mean stock Touchwiz ROM that doesn't have a native way to disable media scanner like the AOSP ROMs I used to run. Is there an app that does ONLY this, as I prefer to use dedicated apps rather than giant monsters which can control tons of things I don't need.
Anyway, I already do a lot of the practices you're advocating here, but I'm always looking for ways to do things in a more efficient or streamlined way. Using Greenify, keeping the stock clock speeds, and making sure that nothing is syncing (I keep backgruond sync disabled, but use an Automagic flow to enable it periodically throughout the day and then turn it back off again), keeps my battery life pretty solid. Add to that Deep Sleep Battery Saver which automatically turns off my connections when the screen is off, but will periodically turn them back based on my preferences, keeps my battery level pretty much steady wheen the phone is idle.

[ TUTORIAL ] How to track and tune battery drain

Hi guys,
I can see a lot of posts where somebody complains about battery drain; most of the time no information provided, therefore telling them what causes it is a sorcery or gamble.
Here I would like to share some general steps what can you do to find the cause of the issue, how can you see which app doesn't let your phone go into deep sleep.
1.) First, check your battery stat in Settings. It's very easy and shows you the basics of your battery usage, giving you the first step on your way to debug the consumption.
2.) I know you read a lot about logcat. It isn't accidental, the logcat contains all the invisible information your phone does and suffer from in the background since the last restart.
Collect this file as it is described here or here. Don't upload it, try to analyse it at your own first. To do it, open the generated file with an advanced text editor, for example with Sublime and search for recurrent patterns (you can see it on the right side of the screen) or continuous issues. Search ( not casesensitively) for the following keywords: error, crash, fail, fatal, permission, exception, "Caused by". Anything can be suspicious if that happens repeatedly because your phone won't go into deep sleep, therefore it will use battery power.
Based on your findings you can search on Google or on this forum for the reason.
Please note that the logcat can (not necessarily does) contain personal information, for example WiFi network name, location, etc, therefore I wouldn't recommend to upload it if that is not necessary. Really, first check it on your own. Get familiar with debugging, spend a few minutes with reading it.
3.) Use an app to see if your CPU cores are going into deep sleep. An amazing app to check it is BetterBatteryStats where you can see how much time was your CPU in awake status, how much in deep sleep, etc. This kind of tools usually show you which service used the most battery (if it is the Android system then you can be sure not an app from the Play Store, but maybe an Xposed module causes it), which Wakelock kept your phone awake. The wakelock's name contains the developer or the app name which you can use to see which application was the one that used most of your battery juice.
4.) Install and configure Greenify. This tool puts your applications into a hibernated status, the best result can be achieved if you have Xposed and you activate the Greenify module there (unfortunately on Nougat it doesn't work at the moment, even you activate it in Xposed the app cannot use Xposed functionalities). Read this article if you would like to get more information about this fantastic app.
5.) On a rooted phone you can use Amplify to see the wakelocks. DON'T block anything immediately, let it run for a day to collect some stats and based on the result, check which wakelock runs the most of the time and which was running the longest. If it was a sync wakelock (for example SyncLoopWakeLock), can be if you block it you won't get messages, or receiving messages will be delayed. Take care when you set the frequency of the run of the wakelock, first try with a smaller number and if you can see it doesn't cause crashes, all your messages arriving right on time, increase the number.
6.) In some cases, using Force Doze can help to put your phone in doze which can help you to save battery time. You can get more info about this app here.
7.) Use Tasker or similar app to automate things, for example turn off WiFi if you leave your home or workplace, turn off mobile internet when you arrive home and connect to your WiFi network, etc.
Let me know if I forgot something to extend the list
FAQ:
- Will you check my logcat?
- No.
- Do you guarantee I will find the reason of my phone's battery drain?
- No. The above steps can help you to find, but it isn't guaranteed.
- Can you tell me which app uses the most of my battery?
- No. Read the above steps to figure it out.
Deus. said:
Hi guys,
I can see a lot of posts where somebody complains about battery drain; most of the time no information provided, therefore telling them what causes it is a sorcery or gamble.
Here I would like to share some general steps what can you do to find the cause of the issue, how can you see which app doesn't let your phone go into deep sleep.
1.) First, check your battery stat in Settings. It's very easy and shows you the basics of your battery usage, giving you the first step on your way to debug the consumption.
2.) I know you read a lot about logcat. It isn't accidental, the logcat contains all the invisible information your phone does and suffer from in the background since the last restart.
Collect this file as it is described here or here. Don't upload it, try to analyse it at your own first. To do it, open the generated file with an advanced text editor, for example with Sublime and search for recurrent patterns (you can see it on the right side of the screen) or continuous issues. Search ( not casesensitively) for the following keywords: error, crash, fail, fatal, permission, exception, "Caused by". Anything can be suspicious if that happens repeatedly because your phone won't go into deep sleep, therefore it will use battery power.
Based on your findings you can search on Google or on this forum for the reason.
Please note that the logcat can (not necessarily does) contain personal information, for example WiFi network name, location, etc, therefore I wouldn't recommend to upload it if that is not necessary. Really, first check it on your own. Get familiar with debugging, spend a few minutes with reading it.
3.) Use an app to see if your CPU cores are going into deep sleep. An amazing app to check it is BetterBatteryStats where you can see how much time was your CPU in awake status, how much in deep sleep, etc. This kind of tools usually show you which service used the most battery (if it is the Android system then you can be sure not an app from the Play Store, but maybe an Xposed module causes it), which Wakelock kept your phone awake. The wakelock's name contains the developer or the app name which you can use to see which application was the one that used most of your battery juice.
4.) Install and configure Greenify. This tool puts your applications into a hibernated status, the best result can be achieved if you have Xposed and you activate the Greenify module there (unfortunately on Nougat it doesn't work at the moment, even you activate it in Xposed the app cannot use Xposed functionalities). Read this article if you would like to get more information about this fantastic app.
5.) On a rooted phone you can use Amplify to see the wakelocks. DON'T block anything immediately, let it run for a day to collect some stats and based on the result, check which wakelock runs the most of the time and which was running the longest. If it was a sync wakelock (for example SyncLoopWakeLock), can be if you block it you won't get messages, or receiving messages will be delayed. Take care when you set the frequency of the run of the wakelock, first try with a smaller number and if you can see it doesn't cause crashes, all your messages arriving right on time, increase the number.
6.) In some cases, using Force Doze can help to put your phone in doze which can help you to save battery time. You can get more info about this app here.
7.) Use Tasker or similar app to automate things, for example turn off WiFi if you leave your home or workplace, turn off mobile internet when you arrive home and connect to your WiFi network, etc.
Let me know if I forgot something to extend the list
FAQ:
- Will you check my logcat?
- No.
- Do you guarantee I will find the reason of my phone's battery drain?
- No. The above steps can help you to find, but it isn't guaranteed.
- Can you tell me which app uses the most of my battery?
- No. Read the above steps to figure it out.
Click to expand...
Click to collapse
My Issue was That Whenever I Installed Or Update My Facebook App(Yeah Facebook App)The Phone would Ultimately Turn Into Bootloop.Any Version Or Update Higher than 139.0 would Do it.
So I Used The Procedure To detect The problem.
Some Files In /data were Causing This.
And Oh I solved The Battery Drain Problem.
Thanks For The TUTO.
Sent from my Nexus 6P using Tapatalk

Understanding Emui power saving settings...

... which I struggle a bit with .
Is there any good guide for dummies around that helps understanding how all the power saving options in Emui works, I would really appreciate a link (or If any Emui wizard can post here).
If I get issues with an app when screen goes off I usually seem to be able to fix it by changing those settings, but It would also be nice to understand what all the options do (which I don't ).
Also: what are the best power settings for some important apps like:
Netflix
Chromecast (Google home)
Android Wear
Facebook
Instagram
Messages
Twitter
Slack
Snapchat
Same question.
Me too, for ALP-L09 Mate 10 device, 8.0.0125(C432).
I don't use global Energy Saving settings (all off), app start for my apps is set to manual (battery settings), battery optimization off (Apps&Notifications, Apps, Settings, Special Settings, ignore Battery Optimizations).
But still, I do miss several app notifications, and the apps do not start syncing after rebooting the phone.

Mate 10 Pro - broken notificattions

Hi guys, I have serious issue with my Mate 10 Pro. I started to notice, that my phone is not notificating me about new e-mails (gmail and outlook apps), new messages (hangouts) or reminders (to-do app). I Googled everything about this but nothing helped. I set background apps to "manage manually" and turned on "Ignore battery optimisation". I have also locked the apps in multitasking and added widgets to home screen. Nothing helped.
Also I have noticed that during the night all apps are gone from multitasking. What is going on? I never had such issue with any Android phone or tablet before.
Can anybody help me please?
yurij666 said:
Hi guys, I have serious issue with my Mate 10 Pro. I started to notice, that my phone is not notificating me about new e-mails (gmail and outlook apps), new messages (hangouts) or reminders (to-do app). I Googled everything about this but nothing helped. I set background apps to "manage manually" and turned on "Ignore battery optimisation". I have also locked the apps in multitasking and added widgets to home screen. Nothing helped.
Also I have noticed that during the night all apps are gone from multitasking. What is going on? I never had such issue with any Android phone or tablet before.
Can anybody help me please?
Click to expand...
Click to collapse
Which firmware do you have
I had same issues with some apps but now, it works fine, at least with apps I'm using
sonydesouza said:
Which firmware do you have
I had same issues with some apps but now, it works fine, at least with apps I'm using
Click to expand...
Click to collapse
8.0.0. 125 (C432), no update avaliable
yurij666 said:
8.0.0. 125 (C432), no update avaliable
Click to expand...
Click to collapse
I have 127-C432 o'er update from 115-C432.
Never had 125 ?
sonydesouza said:
I have 127-C432 o'er update from 115-C432.
Never had 125 ?
Click to expand...
Click to collapse
I have single SIM version, from Orange with data plan. I would try factory reset but I consider it as a last resort
yurij666 said:
I have single SIM version, from Orange with data plan. I would try factory reset but I consider it as a last resort
Click to expand...
Click to collapse
Ahh.
Ok.
Bloody hell orange ?
Your problem is very likely being caused by Huawei's by-default aggressive battery optimisations.
There are two sections of settings to look at in fixing this;
1. To stop critical (to you) apps being forcibly closed, go to SETTINGS -> BATTERY -> LAUNCH, change your selected apps from "automatic" to "manual" and make sure "Run in Background" is enabled for them.
2. To allow critical (to you) apps to continue running with the screen off, go to SETTINGS -> APPS & NOTIFICATIONS -> APPS -> SETTINGS -> SPECIAL ACCESS -> BATTERY OPTIMISATION, change "Not Optimised" to "All" at the top of the screen, then set your critical apps to "Not Optimised."
It's a true pain that it's a two-fold process in different sections of the settings and that they're so tedious to get to, but once you've discovered where they are, it (sort of) makes sense.
Cephalus said:
Your problem is very likely being caused by Huawei's by-default aggressive battery optimisations.
There are two sections of settings to look at in fixing this;
1. To stop critical (to you) apps being forcibly closed, go to SETTINGS -> BATTERY -> LAUNCH, change your selected apps from "automatic" to "manual" and make sure "Run in Background" is enabled for them.
2. To allow critical (to you) apps to continue running with the screen off, go to SETTINGS -> APPS & NOTIFICATIONS -> APPS -> SETTINGS -> SPECIAL ACCESS -> BATTERY OPTIMISATION, change "Not Optimised" to "All" at the top of the screen, then set your critical apps to "Not Optimised."
It's a true pain that it's a two-fold process in different sections of the settings and that they're so tedious to get to, but once you've discovered where they are, it (sort of) makes sense.
Click to expand...
Click to collapse
I have already done these two steps. Didn't work. For example this morning I checked my phone, no notification. I opened gmail app, suddenly there is big 7 next do my new e-mails. Even then there was no notification in status bar.
yurij666 said:
I have already done these two steps. Didn't work. For example this morning I checked my phone, no notification. I opened gmail app, suddenly there is big 7 next do my new e-mails. Even then there was no notification in status bar.
Click to expand...
Click to collapse
Have you checked that the app has notification permissions? SETTINGS -> APPS & NOTIFICATIONS -> NOTIFICATIONS MANAGEMENT
This is admittedly a far stretch as by default all apps should have notification permissions, but it's worth a try - and unfortunately is the only remaining idea I have.
Cephalus said:
Have you checked that the app has notification permissions? SETTINGS -> APPS & NOTIFICATIONS -> NOTIFICATIONS MANAGEMENT
This is admittedly a far stretch as by default all apps should have notification permissions, but it's worth a try - and unfortunately is the only remaining idea I have.
Click to expand...
Click to collapse
Yes, did that too. Even set those apps to priority. I guess I will really have to try that factory reset. What also bothers me is, that sometimes I want to unlock the phone (fingerprint or button) I hear the unlock sound, but the phone lights up like 5 seconds later.
yurij666 said:
Yes, did that too. Even set those apps to priority. I guess I will really have to try that factory reset. What also bothers me is, that sometimes I want to unlock the phone (fingerprint or button) I hear the unlock sound, but the phone lights up like 5 seconds later.
Click to expand...
Click to collapse
I doubt that the factory reset will help you. Well, at least with the to-do app reminders part. As I've described in my post (https://forum.xda-developers.com/mate-10/help/local-notifications-t3737241), almost any to-do app fails to show the reminders (all possible optimization turned off, all permissions given), and it either has smth to do with our firmware, or with the apps not being adopted for the Oreo (some noticeable changes in notification API).
But if his phone takes 5 seconds to wake up, something is seriously wrong. I would highly recommend a factory reset if for nothing else than fixing the 5 second wake up time.
i have the same issue with almost all apps that i am using
did everything in google and still no luck
not sure is it app issue , huawei , android .... me ?
common i dont want to open and check all apps all the day to see if there is update or not just push it to me as soon as it get .
Same here, I have BLA-L09 8.0.0.128 (C432). I've tried all battery and notifications settings and I've also factory reset my phone. Google now does not update news, Gmail does not notify new emails, 3rd party widgets do not refresh, and the app for my car does not sync via Bluetooth (I have to remove the the BT profile and create it again to sync 1 time then stops)
I had the same problem with my previous phone (samsung note 3). It turned out to be due to IPv6 being enabled. Have you tried disabling it?
Cephalus said:
Your problem is very likely being caused by Huawei's by-default aggressive battery optimisations.
There are two sections of settings to look at in fixing this;
1. To stop critical (to you) apps being forcibly closed, go to SETTINGS -> BATTERY -> LAUNCH, change your selected apps from "automatic" to "manual" and make sure "Run in Background" is enabled for them.
2. To allow critical (to you) apps to continue running with the screen off, go to SETTINGS -> APPS & NOTIFICATIONS -> APPS -> SETTINGS -> SPECIAL ACCESS -> BATTERY OPTIMISATION, change "Not Optimised" to "All" at the top of the screen, then set your critical apps to "Not Optimised."
It's a true pain that it's a two-fold process in different sections of the settings and that they're so tedious to get to, but once you've discovered where they are, it (sort of) makes sense.
Click to expand...
Click to collapse
Thanks for this! I had already done #1, but #2 I had no clue about. It seems to have fixed the delay in notifications from the Outlook app.
Novi84 said:
Thanks for this! I had already done #1, but #2 I had no clue about. It seems to have fixed the delay in notifications from the Outlook app.
Click to expand...
Click to collapse
I wonder why Gmail is not listed as an app that can bypass the battery optimization?
jaseman said:
I wonder why Gmail is not listed as an app that can bypass the battery optimization?
Click to expand...
Click to collapse
Because its preinstalled app. Anyway both settings doesn't works. I'm selling this peace of **** phone because it has no use anymore. Worst phone ever.
Can't get notifications from most of apps. So why do I need a smartphone like this...
And even battery, doesn't lasts full day from the time I wake up, till I go to sleep. so Huawei is the last phone I ever bought.
so is there any chance to have this issue fixed ?
by update perhaps , can we contact them or complain so they notice ?
i really search about phones before i buy it and choosed this one from the e specs and reviews
but i didnt expect there is a (SMART)PHONE would have a problem like this at all it is unbelievable
and i dont want to sell it .. just want this issue to be fixed
Just a thought...I read here and elsewhere that putting widgets on your home screen helps notifications comes through due to the fact that the widget keeps the apps open. I did this with my Honor Note 8 and, along with the other bits of advice above, got most of my notifications to work.

TSheets and Location Services

I currently have a Nokia 7.1 running android 9. I’m running into an issue where I’m being clocked out in TSheets because location data isn’t available. I’m able to clock in, but after about 21 minutes of the phone being locked (screen off, not using the phone), it clocks me out.
This is the notification error I receive when I’m clocked out:
“You’ve been clocked out
Your company requires location while on the clock. Please turn on location for TSheets in you device’s Settings.”
This is what TSheet support sees in the log:
https://imgur.com/a/tfq9odd
I checked on a few things like turning off battery optimization, and battery saver. Also, I made sure that location was turned on. Looking further into the issue, I made sure that android wasn’t optimizing the TSheets apps by going in Settings>Battery>Battery Usage, clicking on the TSheets app>Battery optimization. From there I located the TSheets app and LoactionServices and tapped on “Don’t optimize”.
One more thing is that I was coming from a Samsung S8 (no issues at all with TSheets) to the Nokia 7.1. I used google backup which download and installed all of my previous apps on the Nokia. After I ran into issue with the TSheets app, I uninstalled the app, and tried to reinstall it. I noticed that I was able to search and find the app in the play store, but it would not let me install it; it simply did not have an install button. I checked a couple of other apps, and they were fine. I found a workaround to get TSheets installed by doing a standard search for TSheets, so it appears in a list. To the right of the app is a menu button (3 dots) which let me install TSheets again.
Can anyone think of anything I'm missing, and the reason why I cant get TSheets working correctly on my Nokia 7.1?
You could try the solutions suggested here: https://dontkillmyapp.com/nokia
It seems to be the case that Nokia doesn't really look at the 'don't optimize' setting they provide. I think uninstalling the evenwell powersaving app via ADB should do the trick. I haven't tried it myself, though.
If you do, please report back.
EDIT: I had a 6.1 for a short while, before the Nougat update, and it used to aggressively close my stuff, but I've been experimenting with my 7.1 (since the latest update, I have the January 1 patch) and it doesn't kill my music with screen off, it doesn't kill my (exotic) navigation with screen off, in short, I don't suffer any issues whatsoever with regard to power saving.

Categories

Resources