Question Prevent apps from being killed? - OnePlus 9 Pro

Is there a way to prevent an app from ever being killed? I have 2 examples:
1) Fitbit app (background sync service, specifically) - when this stops running, some features on my watch quit working until I launch the app and sync manually.
2) Battery monitor app - I've tried AccuBattery (my preferred app), GSam, and BBS, but they all get killed and restart, and therefore give inaccurate information. BBS doesn't die as often as the others, but I don't like it as well. All 3 have persistent notifications, so I can tell when they last restarted.
I've set Battery Optimization to "Don't Optimize" for all of these. I've tried turning off all 3 of the settings under Advanced Optimization (probably unnecessary, no noticeable difference). I've also Locked each of these from recent apps. Are there any other settings I'm missing that could prevent an app from being killed? Possibly something new to Android 11? Fitbit and AccuBattery worked fine on my previous OP7P with Android 10.

terlynn4 said:
Is there a way to prevent an app from ever being killed? I have 2 examples:
1) Fitbit app (background sync service, specifically) - when this stops running, some features on my watch quit working until I launch the app and sync manually.
2) Battery monitor app - I've tried AccuBattery (my preferred app), GSam, and BBS, but they all get killed and restart, and therefore give inaccurate information. BBS doesn't die as often as the others, but I don't like it as well. All 3 have persistent notifications, so I can tell when they last restarted.
I've set Battery Optimization to "Don't Optimize" for all of these. I've tried turning off all 3 of the settings under Advanced Optimization (probably unnecessary, no noticeable difference). I've also Locked each of these from recent apps. Are there any other settings I'm missing that could prevent an app from being killed? Possibly something new to Android 11? Fitbit and AccuBattery worked fine on my previous OP7P with Android 10.
Click to expand...
Click to collapse
I have try to to go to developer mode and go to standby application. go inside and set the app you want to always on to active and remember still set battery to don't Optimize and locked the app. Do not click the clear all button.

fifasax said:
I have try to to go to developer mode and go to standby application. go inside and set the app you want to always on to active and remember still set battery to don't Optimize and locked the app. Do not click the clear all button.
Click to expand...
Click to collapse
Interesting, I haven't seen that before. Thanks for introducing me to something new. All of the apps in question are currently grayed out and say Exempted, so they shouldn't ever be put into standby.

Disable all power management*, Android does fine without it. Address any remaining power hogs individually on a case by case basis.
Power management will cause erratic behavior and can even increase battery usage even after its lame "adjustment" period.
To check if it is fully disabled go to Developer options>Standby apps, all buckets should show to be in their active state (and can't be manually assigned), if not power management is enabled.
Make sure allow background usage isn't disabled on the apps you want to run.
*yeah turn all those optimizing toggles OFF.
Only fast charging should be toggled on if you use it.

blackhawk said:
Disable all power management*, Android does fine without it. Address any remaining power hogs individually on a case by case basis.
Power management will cause erratic behavior and can even increase battery usage even after its lame "adjustment" period.
To check if it is fully disabled go to Developer options>Standby apps, all buckets should show to be in their active state (and can't be manually assigned), if not power management is enabled.
Make sure allow background usage isn't disabled on the apps you want to run.
*yeah turn all those optimizing toggles OFF.
Only fast charging should be toggled on if you use it.
Click to expand...
Click to collapse
How does one disable all power management? I don't see any sort of global switch for that. Turning it off entirely seems drastic, but I agree that power management is generally more trouble than it's worth.
I did verify that the apps in question are allowed to run in the background and use unlimited data.

terlynn4 said:
How does one disable all power management? I don't see any sort of global switch for that. Turning it off entirely seems drastic, but I agree that power management is generally more trouble than it's worth.
I did verify that the apps in question are allowed to run in the background and use unlimited data.
Click to expand...
Click to collapse
It seems like you're setting up right. Check the Stand by apps status.
When you first load Accubattery it gives an option to disable task killing in settings, Pro version.
Uninstalling then reinstalling it sometimes works for me; clearing its data does not. I was getting the same error message until I just reinstalled it
Just don't take Accubattery too seriously... it's useful up to a point.
I'm on Pie. Google really screwed up 10 and especially 11... so yeah it could something new as Google insists on changing things even if they're already nearly perfect
If that fails check with Accubattery for guidance with 11. They are responsive to emails.
They may also be punching out an update.

Related

[GUIDE] Battery Saving Steps/Mods/Roms | 7/6

Battery Save Like RandomKing​
I find myself regularly repeating many of these suggestions on many threads to many different people on how to extend your battery life. When not in use, my phone loses at most only 1-2% battery per hour! So I'm making one thread in the Epic forums dedicated to maximizing battery life while trying to explain why these steps will work. Some battery improvements come at the cost of performance or lack of certain services. This must be distinctly understood, or nothing wonderful can come of these steps.
Step 1: Brightness & Battery​
Let's face it. Our Android phone screens are huge. This feature is the largest, and completely unavoidable battery-drain. The only way to limit it is to not use the screen... ergo... not use your phone. But that clearly makes no sense, so how to limit that drain? Well, a good step is to turn down your screen's brightness to the lowest you can read clearly, don't hurt your eyes! For night-time use, there's an app that can turn the brightness down even lower called Screen Filter(Thanks to iModMM for the find!). Also, choose a nice dark background, something in the black color range. For all phones, the darker the color, the less brightness used, less power consumed! But for our Epic's Super Amoled screen, specifically, a black pixel is technically an "off" pixel. That's right, every black pixel on your screen is a part of your screen not being powered, since the Super Amoled does not need backlighting. Blackle is also a good alternative to the standard Google site for a black themed search engine, though it doesn't seem to be mobile optimized. Also, lock your screen with that nice little button on the top right side of your phone. Don't wait for it to lock itself! As far as the battery itself goes, charging to 100% can be tricky. The moment that led turns blue, your phone has generally reached 100%, but it will generally trickle charge between 97 and 100 after that. A good way to charge to 100 percent is to use an external charger, which generally come with 1 or 2 spare batteries for about $20. This way, the moment your battery dies, shut down, and pop a fresh one in.
Step 2: Using a Custom Rom​
At this point, there are many Epic 4G custom roms out, and if you're in this forum, you've likely rooted or are trying to root. Well I will not go into rooting directions here. Take a look at one and see how it fare's out-of-the-box for you. If you choose to use my customized rom, you will find a task manager with a preset ignore list, ready to use as a one-tap app-closing widget; as well as the service-freezing patch mentioned below in Step 8 ready for execution through a terminal, and my entire setup(among many other mods, apps, and tweaks tested for the greatest battery performance). These are just roms I've used myself to great results. Many others exist. Updated 7/6:
RandomKing's Customized Rom
2.2.1 EC05 v.1 Plus [Journaled w/Genocide 1.0] [Screenshots]
SyndicateFrozen Rom
2.2.1 EC05 v.1.2
Bonsai Rom
2.2.1 EC05 v.4.1.1 Not Supported on XDA. Sorry.
Midnight Rom
2.2.1 EC05 v.5.3
Step 3: Disable Unnecessary Services​
First and foremost, disable all location services, wifi and gps based. This will affect certain apps like weather apps, you'll simply have to deal with static locations. Next, disable data sync. Contacts will not synchronize with Gmail while this is off. You will have to enable it sporadically. The Gmail app also will not function while this is off, I recommend using the email app and simply adjusting the refresh interval. You can always manually check your own email . Likewise, you may put your phone into airplane mode altogether if you don't plan to use it for an extended period of time, such as school, work, swim meet, movies, or on an airplane.
Step 4: Task Killers and JuiceDefender​
First, let's get JuiceDefender out of the way. It's a neat app, and in certain ways, effective. However, it's own effectiveness comes with certain contradictions. It disables nearly all signals, which will include, for example, Google Voice. In my experience, this app hindered certain other services, and if anything may have drawn further on my battery. My recommendation is to stay away from it. Now onto Task Killers, they are good, and they are evil. Let me explain. Many of us may find issues closing all the apps we open, and sometimes forget we left something open. A task killer can easily ensure that you've closed all of your programs. Now onto the bad. Task killers can try to kill certain system services. This is generally BAD. Certain services shouldn't be killed, and others can't be killed, and the ongoing battle only further drains your battery while trying to kill services that AREN'T actually bad. So on that note, the worst part of task killers is AUTO-KILL. Disable it! Kill it! Kill it with FIRE! I use Advanced or Adao Task Killer, with no auto-kill. It is one of the only widgets I use, and I simply tap it before I lock my phone each time.
Step 5: Widgets​
If you don't need them, don't use them. Almost all widgets make continuous unnecessary calls to the Android system, and this can be a huge battery draw. Even simple widgets. Through all my testing, there's only 2 widgets I have approved thus far: Advanced Task Killer, Power Control. Other disapproved widgets: Pandora, Winamp, Weather(ALL OF THEM), etc.
Step 6: SetCpu, Voltage Control, and Over/Underclocking​
As with much of this thread, this is opinionated and empirical theories. Through my testing, Overclocking is unnecessary, and guaranteed to draw on the battery. Most of these roms come from fantastic devs and are, by default, blazingly fast. Overclocking is completely redundant in my opinion, and I'm generally all about speed. Underclocking/undervolting may preserve more battery, but my opinion on the matter is similar to my feeling on widgets. If you don't need it, don't do it. If you feel the need to use these apps, a generally accepted setting for battery preservation is to undervolt to 800 max. and 100 min. (if your phone can handle it, some may experience wake-locks, raise min. to 200) on conservative governor, adjusting your profiles for when the phone is locked, unlocked and etc.
Step 7: Unnecessary Apps​
Free apps are great, aren't they? But how many have you gathered, just because they're free? Now how many of those don't you use, but regularly draw on your phone regardless. There's an easy way to roughly check. Open your settings. Now go to Applications. Manage Applications. Take a look at which are running that you have not opened. Using a task killer prior, and waiting a couple minutes to see what re-opens may be a good way to check which apps are continuously running in the background and evaluate if they can be removed.
Facebook --- Notorious for running in the background. Disabling notifications may help.
Latitude --- Largest offender of location service usage. Neat app. Huge battery hog.
QIK/Fring --- Any video chatter really. If you don't use them, remove or disable them.
Browser --- Large ram usage. Try Dolphin Mini or Miren.​
Step 8: Freeze Services​
Using Titanium Backup Pro, MyBackup Pro, or Bloat Freezer (yes, non-free apps) freeze any of the following services:
sns --- (Will disable sns)
snsaccount --- (Will disable Facebook contact integration)
drm --- (May affect media programs like mediahub)
drmcontent --- (May affect media programs like mediahub)
systemupdater --- (Best disabled if on custom rom)​
Enter the following commands into the Android Terminal to manually freeze the above services:
Code:
su
pm disable com.sec.android.providers.drm
pm disable com.sec.android.app.sns
pm disable com.samsung
Simply enter the previous commands into the Android Terminal while substituting "enable" for "disable" to manually defrost these.
If you would like a shortcut for this method, check out the patch in This Thread Also Included In RandomKing's Rom..​
Step 9: Journaling​
Journaling... some love it, some hate it. The fact remains, journaling enables extra write cycles. While this will prevent data loss, it also means more cpu usage. It follows that battery should last longer with journaling disabled. You can use chris41g's mod HERE to turn Journaling on/off at will.
Step 10: Turn it Off and Spend Time With Loved Ones​
That's right. You're obsessing with your phone. Leave it be. Do something meaningful and memorable. Have fun with life! This is just a phone.
More coming as it comes to me! Including mods, apps, etc. aimed at improving battery life. Feel free to leave your own suggestions or questions! If this guide and it's features have helped you in anyway, leave THANKS so I know whether or not to keep up on it!​
Y is this in q&a?
Sent from my Nexus S 4G using XDA Premium App
Because its an answer to many questions posted here.
-Sent from my Random Epic.
many good suggestions here RandomKing.
this stuff is all so useful to us newer users out here, maybe this should be stickied (either here or in general).
jarcher1971 said:
many good suggestions here RandomKing.
this stuff is all so useful to us newer users out here, maybe this should be stickied (either here or in general).
Click to expand...
Click to collapse
Thanks! I have no control over where this belongs, I just know its an answer to many questions and would be noticed here.
-Sent from my Random Epic.
has anyone noticed an effect on the phone's ability to sleep when you manually reorder the apps alphabetically in the app drawer? I kept having problems and factory reset 2x. Now I did find 3 troublesome apps that although not apparently running in the background, kept my phone from sleeping simply by being installed. I also stopped ordering my apps, deleted the troublesome apps and now it seems my phone is working correctly. I wonder if that (editing the default order) could also prevent the phone from sleeping? Any thoughts?
rando991 said:
has anyone noticed an effect on the phone's ability to sleep when you manually reorder the apps alphabetically in the app drawer? I kept having problems and factory reset 2x. Now I did find 3 troublesome apps that although not apparently running in the background, kept my phone from sleeping simply by being installed. I also stopped ordering my apps, deleted the troublesome apps and now it seems my phone is working correctly. I wonder if that (editing the default order) could also prevent the phone from sleeping? Any thoughts?
Click to expand...
Click to collapse
Can't say I've noticed this, but I've been on launcherpro for quite some time now. Perhaps you could share more details on your setup?
-Sent from my Random Epic.
I'm non rooted stock EC05. I used to use EDIT in the app drawer to rearrange my apps in alphabetical order (they don't arrange themselves automatically this way after rebooting). I had noticed in spare parts that my phone was never sleeping and killing my battery. I did a factory reset and it worked as advertised. I slowly added apps back until I found two that seem to prevent my phone from sleeping so I uninstalled them. Phone worked fine for a while but then started acting up again. I repeated the procedure, leaving only the apps my wife's phone had (hers always sleeps like a baby), but then my phone started up again. Tried another reset but this time decided to leave the apps in the order they put themselves and so far so good...wondering if that was doing something or if it is an app update that goes bonkers?
rando991 said:
I'm non rooted stock EC05. I used to use EDIT in the app drawer to rearrange my apps in alphabetical order (they don't arrange themselves automatically this way after rebooting). I had noticed in spare parts that my phone was never sleeping and killing my battery. I did a factory reset and it worked as advertised. I slowly added apps back until I found two that seem to prevent my phone from sleeping so I uninstalled them. Phone worked fine for a while but then started acting up again. I repeated the procedure, leaving only the apps my wife's phone had (hers always sleeps like a baby), but then my phone started up again. Tried another reset but this time decided to leave the apps in the order they put themselves and so far so good...wondering if that was doing something or if it is an app update that goes bonkers?
Click to expand...
Click to collapse
Hmm. If you can't narrow it down to a certain app, I'm not totally sure what it could be. Have you tried clearing the data/cache of Twlauncher? You could try a launcher like LauncherPro, you don't have to be rooted to use a different one.
No but if the problem comes back up I will try some of those...these are the 3 apps that when loaded caused problems: NIV Bible, Document Scanner, [I now have relacement apps for each of these now] and most recently Espn Score Center, but my wife had all of thse but the doc scanner and had no problems
i would check in spare parts to see which apps may be holding a partial wake lock. for me the facebook app was not letting my phone sleep until i disable all of its notifications.
jarcher1971 said:
i would check in spare parts to see which apps may be holding a partial wake lock. for me the facebook app was not letting my phone sleep until i disable all of its notifications.
Click to expand...
Click to collapse
Likewise. This is why I removed facebook altogether. The new mobile site has proven to be pretty useful now.
-Sent from my Random Epic.
Yeah I found the same thing...but I would log out of Facebook too. Also the problem reappeared after a factory reset and I had not gone into Facebook. Are you saying that even if you don't log in, it can stop your phone from sleeping? My phone started doing it again a few days ago for no apparent reason, and I was able to stop that behavior by: finding and moving 2 apps from the phone to SD card (I thought I had gotten all of them), clearing any cache from different apps, and rebooting.
jarcher1971 said:
i would check in spare parts to see which apps may be holding a partial wake lock. for me the facebook app was not letting my phone sleep until i disable all of its notifications.
Click to expand...
Click to collapse
That wouldn't tell me anything when I had the problem. The only thing was Android System....and....the phone wouldn't sleep even if in airplane mode! Which meant it had to be a process or app doing it all the time. I had never thought to clear cache, but I wonder why doing that works? Also there's a menu option in Spare Parts about Button Behavior which leads you to believe you can make the phone sleep but the menu says "only available in Ver 1.5". I've checked the market and can't find a ver 1.5 Spare Parts...
rando991 said:
That wouldn't tell me anything when I had the problem. The only thing was Android System....and....the phone wouldn't sleep even if in airplane mode! Which meant it had to be a process or app doing it all the time. I had never thought to clear cache, but I wonder why doing that works? Also there's a menu option in Spare Parts about Button Behavior which leads you to believe you can make the phone sleep but the menu says "only available in Ver 1.5". I've checked the market and can't find a ver 1.5 Spare Parts...
Click to expand...
Click to collapse
I believe it means android 1.5, because that says "End Button Behavior", and no new phones have Call and End buttons on them. Because the "Fancy Screen Rotation" says 1.5 only also.
Sent from the only thing i need.
RandomKing said:
Step 6: Unnecessary Apps[/CENTER]
Free apps are great, aren't they? But how many have you gathered, just because they're free? Now how many of those don't you use, but regularly draw on your phone regardless. There's an easy way to roughly check. Open your settings. Now go to Applications. Manage Applications. Take a look at which are running that you have not opened. Using a task killer prior, and waiting a couple minutes to see what re-opens may be a good way to check which apps are continuously running in the background and evaluate if they can be removed.
Click to expand...
Click to collapse
I think you mean "Now go to Applications. Running Services." Going to Manage Applications will show all non-system applications and not tell you what is currently running, AFAICT.
Or am I mistaken?
Thanks for this thread.
prodigyplace said:
I think you mean "Now go to Applications. Running Services." Going to Manage Applications will show all non-system applications and not tell you what is currently running, AFAICT.
Or am I mistaken?
Thanks for this thread.
Click to expand...
Click to collapse
No, there is a "Running" tab inside Manage Applications. An app doesn't have to have a service to be running.
Sent from the only thing i need.
zanderman112 said:
No, there is a "Running" tab inside Manage Applications. An app doesn't have to have a service to be running.
Click to expand...
Click to collapse
Thanks for clarifying, Zanderman. Somehow I never noticed that tab before.
rando991 said:
That wouldn't tell me anything when I had the problem. The only thing was Android System....and....the phone wouldn't sleep even if in airplane mode! Which meant it had to be a process or app doing it all the time. I had never thought to clear cache, but I wonder why doing that works? Also there's a menu option in Spare Parts about Button Behavior which leads you to believe you can make the phone sleep but the menu says "only available in Ver 1.5". I've checked the market and can't find a ver 1.5 Spare Parts...
Click to expand...
Click to collapse
Sounds to me like a system process may be the cause rather than any particular application. For me also I had issues early on with the SNS service forcing itself to restart continually and being a battery drain. It usually takes a force stop on that service followed by clearing data in the sns app and rebooting to fix. Don't know if that will work for you, but hope it helps.
Sent from the communications console of the NX-01 using a universal translator
My tips you can add:
1. I always, no matter what, always have brightness on lowest setting! If you have a hard time seeing in sun, than do auto, but turn off when don't need to, I have on low 24/7. Then at night, I have this app called screen filter which lets you lower brightness then default setting(good on eyes).
2. I always have auto-sync off. If you want emails etc. configure with ur preferences. And most of the time background data. But with background data off, you don't have access to market and have to enable for use. Don't get notifications. Lately, haven't been getting WhatsApp messages. This is optional.
3. In wifi settings, network notification turned off. Haptic feedback and all vibration disabled. Sounds on key clicks or anything disabled. Auto rotate screen off. No window animations. Screen timeout, 15 seconds. Keyboard timeout, 3 seconds. In location, use wireless networks and gps satellites unchecked.
4. No live wallpaper! No bright colors! I use a black background for wallpaper!! Try to go a little dark, not bright, stay away from white! Id recommened, the full black wallpaper. Also on ur homescreen, avoid widgets! Especially ones that use live web feed like, facebook, scorecenter. These are battery suckers!
5. I delete all apps I do not use! Stock and user. Download titanium backup to fix this issue. I freeze, system updates, swype, drm content, drm content launcher, sns, snsaccount. I uninstall the stock browser, use dolphin!! I also uninstall, all sprint bloatware, my files, gmail, email, talk, news and weather. Uninstall all stock and user apps you don't use! Check spare parts to see what runs in the background that you don't use. Another thing to add, I uninstall swype and android keyboard and use better keyboard gingebread edition 8.
6. Disable refresh interval in facebook, do it manually when you are going to use it!
7. Use setcpu. Undervolt to 800max and 100min on conservative governor. Set profiles, when phone is locked and etc.
8. Now lets talk about juicedefender and task killers. Juice defender will work and is a good app! BUT: if ur a person like me, I text a lot in whatsapp and when u lock screen it disables data, so u wont get texts. Download it, take a look at it, try it out. I recommend using agressive mode. Now lets talk about task killers. Personally, I think they dont work at all, and actually waste battery then save it. I just would say don't use one, and use samsungs stock task killer(actually works!)
9. Use a custom rom and kernel. Always be up to date on updates. I usually use, SRF and midNight. All about preference.
10. Extended battery FTW!!! Buy a seidio extened battery! May cost some money, but will greatly increase battery!!! Or get a cheap asian knockoff on ebay.
11. Disable data and put phone into airplane mode when it wont be in use for a period of time. Like at school or work. I usually keep data off during school. You will see a difference with data on and off.
12. Always keep wifi, bluetooth, gps, 4g off when not in use. They will drain battery crazy!!! Wifi will search for networks constantly, same basic thing with gps and bluetooth.
13. Also do full charges!! At night shut off phone and let it charge for a good 8 hours. Then in morning, turn on still plugged in. The charging indicator will be red, leave it alone till its blue. Go get dressed and eat some breakfast lol. Then when you come back it should be blue. And when on boot, let it finish media scanning, don't interrupt it!!
I can guarentee if you follow my tips, you will see a significant increase in battery life!
These are my tips!! I will add more if I can remember some more!
Typed this all on my Epic!!

Battery optimization

What exactly does that feature do on an individual app? Security apps like cerberus recommend not using it.
Sent from my Nexus 5X using Tapatalk
Hi
km8j said:
What exactly does that feature do on an individual app? Security apps like cerberus recommend not using it.
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
During Doze mode (this kicks in when you've not moved or used the phone for a period of time, such as overnight when it's left alone) stops apps from waking the phone or running background tasks, the idea being if the phone isn't being used, it's a waste of power for apps to keep going off on line chattering or receiving notifications and displaying them to the user. Notifications that you might have got immediately, don't ping through until you press the power button the next morning.
I suspect security apps like Cerberus don't want to partake in Doze mode as they want to wake your phone up every few hours regardless and scan it, or be able to download new signatures any time.
Despite setting an app to not be optimised, it still gets stop from waking the phone using alarms during Doze (alarms are something an app can set to say wake the phone up and run the app every 10 minutes or on the hour etc). However the developer of the app can work around this by setting a new type of alarm, for Google this work around is easily detected and it wouldn't surprise me if they start alerting on the Play store about apps that are potential battery drains because they by-pass Doze. Of course some apps have to, for example an alarm clock to wake you in the morning, or something like Tasker that you set to run things at specific times, so it will be up to the developer to explain why and the person downloading to make a decision about it.
Regards
Phil
Hi
PhilipL said:
However the developer of the app can work around this by setting a new type of alarm, for Google this work around is easily detected and it wouldn't surprise me if they start alerting on the Play store about apps that are potential battery drains because they by-pass Doze. Of course some apps have to, for example an alarm clock to wake you in the morning, or something like Tasker that you set to run things at specific times, so it will be up to the developer to explain why and the person downloading to make a decision about it.
Click to expand...
Click to collapse
That was my post in October, this happened to Tasker: http://www.androidpolice.com/2015/1...y-reasons-this-time-its-the-notorious-tasker/
It seems Google has perhaps pulled the plug on Tasker a bit too quickly due to a BETA version, but I think overall this approach is good for Android if it gets rid of battery draining apps, which usually are up to no good downloading ads or sending back data for marketing reasons. Obviously some apps are the exception to this like Tasker, which will need this exception to continue working correctly, as otherwise it will be restricted to one wake-up every 15 minutes only when the phone goes into doze mode.
Regards
Phil
PhilipL said:
Hi
That was my post in October, this happened to Tasker: http://www.androidpolice.com/2015/1...y-reasons-this-time-its-the-notorious-tasker/
It seems Google has perhaps pulled the plug on Tasker a bit too quickly due to a BETA version, but I think overall this approach is good for Android if it gets rid of battery draining apps, which usually are up to no good downloading ads or sending back data for marketing reasons. Obviously some apps are the exception to this like Tasker, which will need this exception to continue working correctly, as otherwise it will be restricted to one wake-up every 15 minutes only when the phone goes into doze mode.
Regards
Phil
Click to expand...
Click to collapse
Interesting reading. The question is why they even allow apps to use permission for ignoring doze, whe it most liley means ban in Play Store. Should be available to system apps only.
Note: Google Play policies prohibit apps from requesting
direct exemption from Power Management features in Android 6.0+ (Doze and App
Standby) unless the core function of the app is adversely affected.
Click to expand...
Click to collapse
Now the question is what authority can JUDGE whether certain app needs it or not.

[Guide] How I Resolved My Battery idle Drain On HTC 10 Running Nougat

Hello
By following many, many XDA forums, downloading/ buying apps, trial and error, advice, ect. I think I may have a solution to the battery drain some of us experience with our devices. I feel confident my process applies to most phones running Nougat.
*This procedure will also cover most Android devices running 6.0 and up.
This guide is on the assumption you are rooted, and removed all bloatware. But may help some for the non-rooted idk.
*Create a Nandroid backup...Reboot.
*Delete any battery saving apps/ task killers/ antivirus apps.
1. Disable Wi-Fi. (You can re-enable later) Personally, I leave it disabled until needed.
2. Clear data in Google Play Services, Google Maps, and Google Play Store.
3. Go to Settings> Power> Battery Optimization> Reset App Preferences...Reboot.
4. In Settings, turn off Body Sensors, Bluetooth, Vibration, Location, Auto Sync, disable 'Backup and Reset'. (You can enable later)
5. Delete/ disable all apps you do not use. Less apps means less background operations while idle, a good thing. Delete Facebook/ Instagram/ Twitter apps, Viber, Whatsapp, and any other known battery hogs. (You can download again them later)...Reboot.
6. Follow this link. Thanks @MeggaMortY !!! The link cuts down some of the wakelock/ chatter/ cpu usage during idle.
https://forum.xda-developers.com/oneplus-3/how-to/guide-stop-google-play-services-t3549760
Follow the steps he has provided. I personally used MyAndroid Tools Pro for disabling Services and Broadcasts.
Next...
*Download App Ops from PlayStore. Open App Opps, and scroll down to Google Play Services. Select 'Prevent Phone from Sleeping' -Select 'Ignore'...Exit App Ops.
*Download Greenify from Play Store.
Using Greenify settings, select:
1. Shallow Hibernation, and Automated Hibernation.
2. Greenify System Apps (Requires Donation Package)...Exit Greenify.
*Download ForceDoze from Play Store.
*Personally, I use ForceDoze. (Try using your personal doze app if you wish).
In ForceDoze settings select:
1. 'Turn off ForceDoze While Charging'.
2. 'Ignore Lockscreen Timeout'.
3. 'Disable Wi-Fi during Doze'.
4. 'Doze delay '0' seconds'.
5. 'Disable Motion Sensing...Exit ForceDoze'.
*Return to phone settings, go to Power> Battery Optimization> All Apps list. Select ForceDoze, Greenify, App Ops, MyandroidTools, (Or whatever app you used to disable your services) as 'Do Not Optimize'.
Reboot to recovery (Also assuming you are using TWRP).
Select 'Advanced Wipe'.
Wipe 'Dalvik/Art Cache' and 'Cache'...Reboot.
Charge to 100%.
Remove charger. Let idle for 6+ hours minimum let to your battery monitor (BBB or GSAM, ect) have a good look. You can trim the excess fat afterwards...Then slowly add your social/ email/ sports/ weather/music apps. I would suggest you use your browser instead for these things. (Less battery stress during idle).
I also keep sync off, and manually sync, and only use Wi-Fi / Location/ Bluetooth when needed. (Optional, but saves battery)
**After you see your improvement, feel free to try out the device settings/ apps that balance functionality with battery savings!
*Mileage may vary depending on how many apps/ settings you have enabled (smartwatch, Facebook, ect. The less apps/ settings running, the better).
Sorry for the length. but I wanted to make this easy to follow.
Hopefully, this at least reduces some of the drain. Let me know.
fossils-n-dents said:
Hello
By following many, many XDA forums, downloading/ buying apps, trial and error, advice, ect. I think I may have a solution to the battery drain some of us experience with our devices. I feel confident my process applies to most phones running Nougat.
This guide is on the assumption you are rooted. But may help some for the non-rooted idk.
*Create a Nandroid backup...Reboot.
*Delete any battery saving apps/ task killers/ antivirus apps.
1. Disable Wi-Fi. (You can re-enable later) Personally, I leave it disabled until needed.
2. Clear data in Google Play Services, Google Maps, and Google Play Store.
3. Go to Settings> Power> Battery Optimization> Reset App Preferences...Reboot.
4. In Settings, turn off Body Sensors, Bluetooth, Location, Auto Sync, Disable Backup and Reset (You can enable later)
5. Delete/ disable app you do not use. Less apps means less background operations while idle, a good thing. Delete Facebook/ Instagram/ Twitter apps, and any known battery hog. (You can download again them later)...Reboot.
6. Follow this link. Thanks MeggaMortY !!! The link cuts down some of the chatter/ cpu usage during idle.
https://forum.xda-developers.com/oneplus-3/how-to/guide-stop-google-play-services-t3549760
Follow the steps he has provided. I personally used MyAndroid Tools Pro for disabling Services and Broadcasts.
*Download App Ops from PlayStore. scroll down to Google Play Services. Select 'Prevent Phone from Sleeping'...Exit App Ops
Using Greenify settings, select:
1. Shallow Hibernation, and Automated Hibernation.
2. Greenify System Apps (Requires Donation Package)...Exit Greenify.
*Personally, I use ForceDoze. (Try using your personal doze app if you wish).
In ForceDoze settings select:
1. Turn off ForceDoze While Charging.
2. Ignore Lockscreen Timeout.
3. Disable Wi-Fi during Doze.
4. Doze delay '0' seconds.
5. Disable Motion Sensing...Exit ForceDoze.
*Return to settings, go to Power> Battery Optimization> All Apps list. Select ForceDoze, Greenify, App Ops, MyandroidTools, or whatever app you used to disable services as 'Do Not Optimize'.
Reboot to recovery (Also assuming you are using TWRP).
Select 'Advanced Wipe'.
Wipe 'Dalvik/Art Cache' and 'Cache'...Reboot.
Charge to 100%.
Remove charger. Let idle for 4 hours minimum. (You can peek in an hour, but you gotta start over).
Milage may vary depending on how many apps you have installed. The less the better.
Hopefully, this at least reduces some of the drain. Let me know.
Click to expand...
Click to collapse
Will this work on other phones? I have an s7 edge
orlans21 said:
Will this work on other phones? I have an s7 edge
Click to expand...
Click to collapse
It should. This should apply for Android devices in general. Make a backup, give it a try.
fossils-n-dents said:
It should. This should apply for Android devices in general. Make a backup, give it a try.
Click to expand...
Click to collapse
Not rooted and don't have twrp
orlans21 said:
Not rooted and don't have twrp
Click to expand...
Click to collapse
I would suggest all the steps except the cache wipes in TWRP. Remove Whatsapp, Facebook, Twitter, ect. Disable google Now, Google Drive, Google Photos, (You can connect them later).
You want the minimum of apps interfacing with Google Play Services/ Android system during your first idle run.
fossils-n-dents said:
I would suggest all the steps except the cache wipes in TWRP. Remove Whatsapp, Facebook, Twitter, ect. Disable google Now, Google Drive, Google Photos, (You can connect them later).
You want the minimum of apps interfacing with Google Play Services/ Android system during your first idle run.
Click to expand...
Click to collapse
I already have google drive, photos, whatsapp, Facebook disabled. Google now I'm not opted in if that's alright. I can still do the cache wipes in stock recovery as well. I do use the official twitter app and 3rd party twitter apps.
orlans21 said:
I already have google drive, photos, whatsapp, Facebook disabled. Google now I'm not opted in if that's alright. I can still do the cache wipes in stock recovery as well. I do use the official twitter app and 3rd party twitter apps.
Click to expand...
Click to collapse
Give it a go with what you have installed. Preferable if you disable the Twitter apps, and re-enable them later.
Hopefully, you will see a better idle time.
fossils-n-dents said:
Give it a go with what you have installed. Preferable if you disable the Twitter apps, and re-enable them later.
Hopefully, you will see a better idle time.
Click to expand...
Click to collapse
Well just to show you what I've been getting I did a factory reset last week because I was getting annoyed by this and these are what I got. I wasn't happy with them.
orlans21 said:
Well just to show you what I've been getting I did a factory reset last week because I was getting annoyed by this and these are what I got. I wasn't happy with them.
Click to expand...
Click to collapse
My personal experiences taught me Google Play services is not broken, nor is Android OS. It's the inefficient way that apps send/ receive data, take constant analytics, perform background tasks, pushing notifications, ect. Then, Google Play services must tend to these apps, plus do it's own tasks, send/ receive data, analytics, and Android OS tries to keep it all together.
(It reminds me of Windows 10 high cpu/ disk usage while idle before I hardened it from Microsoft servers as best I could).
All of those processes hammer away at your cpu, and kill your battery while you sleep a little at a time. Or a lot.
I have no idea how to read a Logcat, and this will probably be seen as overkill to some, but my results speak for themselves.
Try it. You can always download apps after you see your result. Good Luck.
fossils-n-dents said:
My personal experiences taught me Google Play services is not broken, nor is Android OS. It's the inefficient way that apps send/ receive data, take constant analytics, perform background tasks, pushing notifications, ect. Then, Google Play services must tend to these apps, plus do it's own tasks, send/ receive data, analytics, and Android OS tries to keep it all together.
(It reminds me of Windows 10 high cpu/ disk usage while idle before I hardened it from Microsoft servers as best I could).
All of those processes hammer away at your cpu, and kill your battery while you sleep a little at a time. Or a lot.
I have no idea how to read a Logcat, and this will probably be seen as overkill to some, but my results speak for themselves.
Try it. You can always download apps after you see your result. Good Luck.
Click to expand...
Click to collapse
Would you like to pm me so we can go through this process step by step?
orlans21 said:
Would you like to pm me so we can go through this process step by step?
Click to expand...
Click to collapse
I sent PM 5 times. It says I have 0 sent messages. Will try again
fossils-n-dents said:
I sent PM 5 times. It says I have 0 sent messages. Will try again
Click to expand...
Click to collapse
I don't think whatever we did worked. I think its the rooted process that fixes it
fossils-n-dents said:
Hello
Using Greenify settings, select:
1. Shallow Hibernation, and Automated Hibernation.
2. Greenify System Apps (Requires Donation Package)...Exit Greenify.
*Personally, I use ForceDoze. (Try using your personal doze app if you wish).
In ForceDoze settings select:
1. Turn off ForceDoze While Charging.
2. Ignore Lockscreen Timeout.
3. Disable Wi-Fi during Doze.
4. Doze delay '0' seconds.
5. Disable Motion Sensing...Exit ForceDoze.
.
Click to expand...
Click to collapse
are you using both greenify and forcedoze together???
timytimy said:
are you using both greenify and forcedoze together???
Click to expand...
Click to collapse
Yes.
fossils-n-dents said:
I sent PM 5 times. It says I have 0 sent messages. Will try again
Click to expand...
Click to collapse
Here are the results for the 2nd test. What is up with that Samsung accessory alarm? Pm me when you see this. Whoops accidentally upload the wrong picture
Here you go.
Results from last night idle test. I wanna know what all those android alarms are.
orlans21 said:
Results from last night idle test. I wanna know what all those android alarms are.
Click to expand...
Click to collapse
I would guess to say Samsung apps, Notification pushes, scanning for updates, ect. This looks like the behavior of Android dealing with multiple apps sending/ receiving data (Anaylitics, polling, crash reports, ect) causing the wakeups. My way (Unscientific) is to delete/ disable them all, and add them one by one, until you notice this behavior again. (Takes days of installing, and many idle runs).
Or, you could post the BBS idle dump (At least 6 hours idle) on the XDA Better Battery Stats forum, and let one of the guys take a look. They will tell you the offending app/ process far quicker.
But, at 1.0 drain per hour, you may be on the verge of 0.8-0.5 per hour idle drain (Or better). Wi-FI off will do even better. Simply engage Wi-Fi when you need it.
If you can, make a backup of your current setup, if something goes wrong, you can always revert back to it and start over.
Everything else looks great for a non-rooted device.
fossils-n-dents said:
I would guess to say Samsung apps, Notification pushes, scanning for updates, ect. This looks like the behavior of Android dealing with multiple apps sending/ receiving data (Anaylitics, polling, crash reports, ect) causing the wakeups. My way (Unscientific) is to delete/ disable them all, and add them one by one, until you notice this behavior again. (Takes days of installing, and many idle runs).
Or, you could post the BBS idle dump (At least 6 hours idle) on the XDA Better Battery Stats forum, and let one of the guys take a look. They will tell you the offending app/ process far quicker.
But, at 1.0 drain per hour, you may be on the verge of 0.8-0.5 per hour idle drain (Or better). Wi-FI off will do even better. Simply engage Wi-Fi when you need it.
If you can, make a backup of your current setup, if something goes wrong, you can always revert back to it and start over.
Everything else looks great for a non-rooted device.
Click to expand...
Click to collapse
How would i be able to get the BBS idle dump? is wifi off and having data on overnight a better option in terms of minimizing battery drain? I also know i have scanning for updates off since i deny that all the time
orlans21 said:
How would i be able to get the BBS idle dump? is wifi off and having data on overnight a better option in terms of minimizing battery drain? I also know i have scanning for updates off since i deny that all the time
Click to expand...
Click to collapse
Click where the circle is, You will see 'Share Data As'...Dumpfile should be checked by default. Click save.
It will be stored a the root of your memory card, or root of internal storage (Phone). I cannot remember which.
Access the dumpfile by plugging USB to computer. It will be a *txt* file. It should be visible as soon as you access storage. Then copy the dumpfile to your desktop, and upload to XDA BBS forum.
For me, drain is slower as I don't have any processes for Wi-Fi running at all in the background. You should try both ways to compare what is best for you. (Yes, yet another idle run).
Turning off 'Scanning for Wi-Fi' is good. Shutting Wi-Fi off completely is better. All those little processes add up. The less processes running, the better.
You should really practice the 6 hour idle runs, as more process come to the forefront in longer runs. Sometimes, extra idle drain from processes kick in after 3-1/2 hours. I used to get 0% idle drain in the first 3 hours, Then android would go nuts. LockerMaster app was the culprit. Got rid of it.

How to prevent apps from getting killed

Hi all,
I'm running several apps that should run all the time (AdGuard, Network Speed Meter) or for a long time (speed trap warner,...) but OxygenOS kills them after a certain period. Some of them restart automatically, some don't. Of course all of these apps are 'not battery optimized'. Is there any chance to prevent OxygenOS from killing them?
Are there custom ROMs that can overcome this problen?
I'm on the latest OxygenOS Pie Beta, but the behavior was similar on Android O...
Thanks a lot,
W
Did you try locking the app via recents menu?
Thank for the info, didn't know that.
Unfortunately it doesn't help, Adguard and the network monitor don't appear in recents. The speed trap warner automatically starts and stops when I'm in the car, i don't want to open recents manually every time.
Battery - Battery optimisation - Don't optimise
safwankatharudheen said:
Battery - Battery optimisation - Don't optimise
Click to expand...
Click to collapse
This is not changing anything,e ven with disable battery disabled, even with adaptative battery disabled.
I have the same problem. I have not found any solution whatsoever. This is really frustrating. I've made sure apps aren't optimized. Advanced optimization is disabled. Developer options background limit is at standard. I've pinned the apps in recent apps and it still happens. Apps get killed all the time.
For example,
1. I use Google Fit to start tracking a run. Within 10 minutes of tracking, the app is closed and workout not tracked. Its not even like i touched the phone and opened other apps during this.
2. I have VoIP account setup in the default dialer. Calls come through only 50% of the time cause the dialer is closed.
3. YouTube Music, constantly gets closed if i simply pause the music. Within 2 minutes, the app is closed.
4. Trying to transfer 15GB of files through Explorer app from phone to file server, never succeeds if i don't watch the app and keep the screen on.
5. Plex gets closed and therefore my photos don't auto backup with the phone is plugged in.
This is absolutely ridiculous! Why the hell a phone with 8GB of RAM is killing apps is beyond me!
Custom ROM on the same phone, like Lineage OS, no issues. Can have optimization on, battery manager on and all. In fact, battery life is better on custom when its not killing the apps! Seems to be the only solution until OOS can stop killing apps so aggressively.
M3drvr said:
I have the same problem. I have not found any solution whatsoever. This is really frustrating. I've made sure apps aren't optimized. Advanced optimization is disabled. Developer options background limit is at standard. I've pinned the apps in recent apps and it still happens. Apps get killed all the time.
For example,
1. I use Google Fit to start tracking a run. Within 10 minutes of tracking, the app is closed and workout not tracked. Its not even like i touched the phone and opened other apps during this.
2. I have VoIP account setup in the default dialer. Calls come through only 50% of the time cause the dialer is closed.
3. YouTube Music, constantly gets closed if i simply pause the music. Within 2 minutes, the app is closed.
4. Trying to transfer 15GB of files through Explorer app from phone to file server, never succeeds if i don't watch the app and keep the screen on.
5. Plex gets closed and therefore my photos don't auto backup with the phone is plugged in.
This is absolutely ridiculous! Why the hell a phone with 8GB of RAM is killing apps is beyond me!
Custom ROM on the same phone, like Lineage OS, no issues. Can have optimization on, battery manager on and all. In fact, battery life is better on custom when its not killing the apps! Seems to be the only solution until OOS can stop killing apps so aggressively.
Click to expand...
Click to collapse
My app is not killed when i lock it in the switch app menu
There's a whole website regarding that issue on several devices, maybe it helps: dontkillmyapp(dot)com/general#user-solution

Android Deep Sleep app?

I am testing a faulty app that it's being faulty during deep sleep, therefore to fasten testing I would need an app which can force the phone to enter deep sleep mode immediately.
Any idea?
Macrodroid or Tasker maybe
Sent from my SM-N986U1 using Tapatalk
Hello
look for an app called napptime it may help you.
Jay
j1978 said:
Hello
look for an app called napptime it may help you.
Jay
Click to expand...
Click to collapse
As he said naptime is the better option for this?
Thanks guys!
Try disabling all power management apps ie all the toggles in Device Care are toggled off except fast charging.
Do not enable sleep for any; Developer options>stand by apps, all buckets should show as active if not power management is active.
Close apps when done with them especially ones like Brave.
The phone will automatically go into a deep sleep state at screen off unless a 3rd party apk is misbehaving.
On my 10+ running on Pie this is how it runs best and gets the best battery life.
Goggle Play Services, Gmail, Playstore, Google Backup Transport, Google Framework and Samsung cloud backup are prime offenders*.
Disable these and all Google, Samsung, carrier and apk feedback. I use Karma Firewall to find rogue apks and lock the phone down as well as a package blocker.
I also use Battery Tracker from the Galaxy Store.
Nominal battery usage is 7-10%@hour heavy usage like vids and surfing. Off screen usage with AOD on is 1%@hour.
*enable when and as needed
Try Naptime and what blackhawk says!
TheViciousGames said:
Try Naptime and what blackhawk says!
Click to expand...
Click to collapse
You'll need to play with it; what works with my configuration may not work for others.
These are my current observations. My stock AT&T 10+ variant is heavy modified and watched over. As I intend to continue to use the current Pie firmware, I continue to tweak it.
What I've observed though over the last year to my dismay is any power management interferes with functionality sometimes randomly and unpredictably. It actually ends up increasing battery usage within a few days although initially it may seem to improve it.
Apparently it causes system conflicts.
I have no power management active other than the screen is set to "optimize" in Device Care and even Device Care is package blocked then unless I wish to use it to clear the cache (which the factory load version does very well).
I toggle Google Play Services/Gmail on as needed and a few other battery hogs. Point is I know their status; no random shutdowns or apk failures... and the best battery life I've ever seen on this device.
You need to go explore, find the resource hogs one by one and find a way to tone them down.
All the shotgun get it done power management apks failed miserably for myself multiple times....
Android runs very well by its self once your rein in a couple problem apks.
Many times the factory loaded versions run better then their updated versions. Gmail, Gmaps, Device Care... may or may not be true on your load; trust nothing!
ReeX said:
I am testing a faulty app that it's being faulty during deep sleep, therefore to fasten testing I would need an app which can force the phone to enter deep sleep mode immediately.
Any idea?
Click to expand...
Click to collapse
Naptime
for me, forcedoze was the best, you can download apk
blackhawk said:
Try disabling all power management apps ie all the toggles in Device Care are toggled off except fast charging.
Do not enable sleep for any; Developer options>stand by apps, all buckets should show as active if not power management is active.
Close apps when done with them especially ones like Brave.
The phone will automatically go into a deep sleep state at screen off unless a 3rd party apk is misbehaving.
On my 10+ running on Pie this is how it runs best and gets the best battery life.
Goggle Play Services, Gmail, Playstore, Google Backup Transport, Google Framework and Samsung cloud backup are prime offenders*.
Disable these and all Google, Samsung, carrier and apk feedback. I use Karma Firewall to find rogue apks and lock the phone down as well as a package blocker.
I also use Battery Tracker from the Galaxy Store.
Nominal battery usage is 7-10%@hour heavy usage like vids and surfing. Off screen usage with AOD on is 1%@hour.
*enable when and as needed
Click to expand...
Click to collapse
When I go into standby mode in developers options each app has 3 options. Frequent, rate, working set. What should I put them on?
Also what exactly does standby mode do? Is it manually disabling that app while not in use or only when you close it? As far as closing the apps, will closing them via the recent apps screen suffice or do I need to force close them?
And my last question is what do you mean by disabling an app such as play services?
Sent from my SM-N986U1 using Tapatalk
TheViciousGames said:
Try Naptime and what blackhawk says!
Click to expand...
Click to collapse
yungzoe0624 said:
When I go into standby mode in developers options each app has 3 options. Frequent, rate, working set. What should I put them on?
Also what exactly does standby mode do? Is it manually disabling that app while not in use or only when you close it? As far as closing the apps, will closing them via the recent apps screen suffice or do I need to force close them?
And my last question is what do you mean by disabling an app such as play services?
Sent from my SM-N986U1 using Tapatalk
Click to expand...
Click to collapse
It shows the app's bucket state when power management is enabled.
Your power management is enabled... and likely wasting battery even though it's suppose to do the opposite. If power management is disabled as I suggested, all buckets are locked to active.
Right now I have GPS enabled; I disable Device Health Services com as it was constantly accessing the internet.
Usually closing the app is all that's needed.
Use Karma Firewall and Battery Tracker to help ferret out bad apps.
Depending on your model, OS/firmware load, 3rd party apks and settings configuration your system may respond differently.
I have heavily modified them on this 10+ Pie variant; it's an ongoing process. I have around 88 apks packaged disabled as well.
Androids wuv to be played with...

Categories

Resources