Question Apps keep draining resources in the backgroud despite having disabled background activity - OnePlus Nord 2 5G

I am facing the issue you see in the title. When I check the battery usage, I find a lot of apps that have been active in the background for hours and hours on end.
I specifically set those apps to be "battery optimized", and I disallowed foreground and background activity/data. Still, turns out these apps do not care and stay active on the background.
These are not system apps, it's WhatsApp, Infinity For Reddit and some more. I do not want these apps to do ANYTHING unless I open them! What should I do?

It's pretty normal for apps to run for hours (or all the time) in background , it doesn't necessarily mean they consume resources , what are their battery % consumption in the battery apps statistics ? On my phone whatsapp or Telegram only consume 2~5% of total per day (and I send/receive a lot of messages )
The option to restrict foreground/background activity don't block the app, it will only restrict some process to prevent the app do to something berserk and drain all the resources of the phone.
Unless you force disable them (from the options or with an app but sometimes the option doesn't exist unless you rooted your phone) and enable it each time you want to use them they will continue to run in background, especially social apps that need to listen to push notifications from internet all the time .

Pouic said:
It's pretty normal for apps to run for hours (or all the time) in background , it doesn't necessarily mean they consume resources , what are their battery % consumption in the battery apps statistics ? On my phone whatsapp or Telegram only consume 2~5% of total per day (and I send/receive a lot of messages )
The option to restrict foreground/background activity don't block the app, it will only restrict some process to prevent the app do to something berserk and drain all the resources of the phone.
Unless you force disable them (from the options or with an app but sometimes the option doesn't exist unless you rooted your phone) and enable it each time you want to use them they will continue to run in background, especially social apps that need to listen to push notifications from internet all the time .
Click to expand...
Click to collapse
How to block apps like instagram if I have root?

8vasa8 said:
How to block apps like instagram if I have root?
Click to expand...
Click to collapse
I use Titanium Backup Pro to freeze/unfreeze any app or system app but you can also block apps per ADB commands too if you have root

Pouic said:
It's pretty normal for apps to run for hours (or all the time) in background , it doesn't necessarily mean they consume resources , what are their battery % consumption in the battery apps statistics ? On my phone whatsapp or Telegram only consume 2~5% of total per day (and I send/receive a lot of messages )
The option to restrict foreground/background activity don't block the app, it will only restrict some process to prevent the app do to something berserk and drain all the resources of the phone.
Unless you force disable them (from the options or with an app but sometimes the option doesn't exist unless you rooted your phone) and enable it each time you want to use them they will continue to run in background, especially social apps that need to listen to push notifications from internet all the time .
Click to expand...
Click to collapse
thank you for your reply. That's the thing though, I don't want them to listen for anything!

Related

A few questions about how to use Greenify efficiently

Hi
First of all thank you Oasis for creating a tool to fix things that shouldn't be broken to begin with! You are an example for a lot of developers :good:
I've read the first couple of posts on the original thread but I still have a few things that are not clear..
The advice of Oasis himself is too hibernate only those apps that misbehave. He states that hibernating apps will also remove them from the memory, which will come with a performance/cpu usage penalty when you want to use them again.
In the video tutorial however Josh greenifies almost every application that doesn't need push notifications.
So this would mean that when I use an application that doesn't have notifications but I open frequently, for example Nu.nl, a dutch newsapp, it will always have to reload the app from scratch instead of loading it from memory?
So baically the best way to use Greenify would be to NOT just greenify most apps, but to use the analyzer frequently and see what's running in the background and greenify those that don't depend on notifications?
Then newsapps that don't push news, image viewers, file managers, system tools like SD Maid and simple games that don't use internet should be ok not being greenified?
Is there no big list available of apps that misbehave or are safe to keep de-greenified?
Thanks in advance for any help on this.
Basically you got it right. Use the built-in analyzer as well as disable service and autostarts to check apps' behaviour. For my experience, sometimes is better to disable a background service than greenify an app, if the app "misbehave" for this service only (of course you'll have to check if the app still works). An example: guaranteedhttpservice and tracksyncservice in shazam...
marchrius said:
Basically you got it right. Use the built-in analyzer as well as disable service and autostarts to check apps' behaviour. For my experience, sometimes is better to disable a background service than greenify an app, if the app "misbehave" for this service only (of course you'll have to check if the app still works). An example: guaranteedhttpservice and tracksyncservice in shazam...
Click to expand...
Click to collapse
Where can I find and disable things like tracksyncservice? I also use Shazam but I can't find both services you mentioned in Greenify nor TiB?
latino147 said:
Where can I find and disable things like tracksyncservice? I also use Shazam but I can't find both services you mentioned in Greenify nor TiB?
Click to expand...
Click to collapse
"Disable Service" (and "Autostarts") from play store.
marchrius said:
"Disable Service" (and "Autostarts") from play store.
Click to expand...
Click to collapse
Ah, I believed those were two functions withing Greenify I couldn't find
wtf, FB has 62! services! None of them where active though, until you open the app, then it was 3.
So you can choose between greenifying an app which will basically kill all services from an app, even background services on one hand, and choosing specifically which services too disable, like you did with Shazam.
The only issue with this second method being that you don't always really know what these services do.
latino147 said:
So you can choose between greenifying an app which will basically kill all services from an app, even background services on one hand, and choosing specifically which services too disable, like you did with Shazam.
Click to expand...
Click to collapse
Exactly. Take google play services for example. If you greenify it, you'll lose gcm and other functions and that's not advisable at all (in fact greenify hides it). But with disable service (and autostarts/system tuner)you can choose what to disable while still mantaining gcm, location services (when needed), sync etc. I can' remember what I did in system tuner regarding gplay services (I followed some tutorial), but with disable service I disabled analyticsservice (this one will reactivate itself unless you do some tweak with system tuner), refreshenabledstateservice, playlogreportingservice, googlehttpservice, playlogbrokerservice, adrequestbrokerservice, gcmschedulerwakeupservice, advertisingidservice, adsmeasurementservice, locationwearablelistenerservice, nlplocationreceiverservice, geocodeservice, dispatchingservice and playlogservice. A reboot is needed. Haven't lost a single function since weeks (gcm, location, autosync and every google app in general are working 100% fine).
Same story with play store. Apps wake it very often, so greenify it does more harm than good. Instead, you can disable pendingnotificationsservice, contentsyncservice and dailyhygiene (and will still be fully functional).
Of course these are little tips to increase performance and battery life even more. I use greenify for 90% and more of apps that "misbehave" and disable service/autostarts/system tuner for the remaining 10% "misbehaving" apps. However, an app "fixed" with such methods will stay cached while with greenify is completely closed (resulting in more cpu/time/battery consumption when loaded again).
The only issue with this second method being that you don't always really know what these services do.
Click to expand...
Click to collapse
Like I already said, for general purposes you'd better simply greenify the "misbehaving" apps. If you use it/it is woken very often, you can consider these methods.
Yes, it's a "trial and error" thing. Unless you're disabling services with self-explainatory names such as "pushservice".
Never installed Facebook official app but I heard many times that is a notorious hogger and takes many personal datas too, for which you can look for xprivacy xposed module as well.
I'll start experimenting with it today :good:

[Q] How to Extend Battery Life of Android Mobile ?

Hi there ! Today my simple question is how to increase battery life of android mobile ! Please tell me some tips cause I'm tired ?
use a taskkiller to Close unused apps!
mflapp said:
use a taskkiller to Close unused apps!
Click to expand...
Click to collapse
Never use a task killer
Hit Thanks if that was helpful
- Turn off all unnecessary connections. That includes GPS, NFC, Locationservices, Sync, etc. That alone will save you days.
- Turn off WiFi when you're not using it.
- Greenify all apps before you turn the screen off. Android keeps apps running in the background for quick access, but it eats battery. Yes, greenifying them will mean they take a second longer to open, but it'll save battery life.
- Turn down the brightness. Use LUX to go below 0%. (Which doesn't actually mean the screen turns off.)
- Disable or delete all bloatware, or as much as you can.
- Using a MicroSD? Drop a .nomedia file in every folder that doesn't need to show up in a mediaplayer. (pdf's, comics, etc). You can still open the files through a filemanager, but MediaScanner/Indexingservice won't freeze on them.
- Turn off all unnecessary sensors. Especially if you're using a Samsung, those have quite a lot of sensors.
Is there a way to get NOTHING running in the background?
Maybe you should remove bloatwares using titanium backup im doing this on my galaxy note before. Even on my s2
Sent from my GT-N7000 using XDA Free mobile app
You should download du battery saver from playstore
X3RATH said:
Is there a way to get NOTHING running in the background?
Click to expand...
Click to collapse
Developers options > Limit Background Processes > "No Background Processes".
Remember that this means that if you're writing an email, and you open the browser, the email is gone. If you're listening to music, that's it, you can't do anything else or the music app shuts down.
There is absolutely no need to use task killers or anything like that on an Android. Android is designed to run with apps cached for quick opening of them. And designed to run on little free memory.
As long as apps "behave", it will not affect your battery having them running in background. If the odd app does seem to cause trouble, try using Greenify to hibernate such apps.
Having no apps running will definitely cause more drain for you, as it takes more cpu power to initialize them every time you open them, or the system does. Hence why task killers do more harm than good. :good:
If you have battery issues, it's likely poor reception on data, an inefficient setup or app wakelocks. Use GSAM to see about that.

Background apps

Hello everyone, there are a way to set an app in background without the continuous spawn of the pop up message that "there are apps that draining battery"? There are a way to disable this advice (battery drain)? Am I not free to drain my battery in freedom, without harrassments? First time in 10 years and dozens of android phones....
Try Greenify to disable the battery draining apps. You can use the apps when needed and when you don't it automatically dozes the apps (puts in sleep mode). You can find it in playstore.

Is it possible to change overly aggressive RAM management?

My background apps are killed way too often. Is it possible to change that behaviour? Even music apps are killed while I'm playing music.
I have tried several custom roms and kernels but nothing seems to change the settings. Is either able to change RAM management settings?
I have also tried several apps that claim to be able to change RAM management settings without success.
Disabling battery optimisation doesn't help.
I have uninstalled unused apps and disabled autostart (boot completed receiver) for non-essential apps to reduce RAM usage.
When I use a RAM monitor it will show RAM usage at ~75% when apps are killed.
My old phone (Note 4) only had 3 GB ram but could still keep more apps in memory.
I don't have that problem.
Have you tried Greenify or similar app to hibernate unwanted apps running in the background? They will only open then when being used and will automatically hibernate again when closed.
ChazzMatt said:
I don't have that problem.
Have you tried Greenify or similar app to hibernate unwanted apps running in the background? They will only open then when being used and will automatically hibernate again when closed.
Click to expand...
Click to collapse
That's the reverse of what I'm looking for. I want the apps in the background to keep running.
Telorast said:
That's the reverse of what I'm looking for. I want the apps in the background to keep running.
Click to expand...
Click to collapse
Then you misunderstood what I wrote. Read it again.
It's exactly what you want, because then apps you don't want running won't take up your RAM and kick off the apps that you do want running. Like your flashlight app should NOT be running the background all the time. One example. Lots of devs think their apps are most important and should always run in the background, so when you "launch" them they are there instantly.
Like I said, I don't have your issue. My apps I WANT running stay running.
If you hibernate the UN-wanted apps, that will give more freedom to apps you DO want running in the background.
There are other apps besides Greenify which may do that task even better, it's just the most well known. It shows you complete list if apps running in the background and you can choose which you WANT to run and which you want to stay killed until you choose to activate them. Those apps will be forced hibernated from then on -- until you manually activate them. When you close them, they will STAY closed and not run in the background sucking up your RAM. It also allows you to go through your entire inventory and decide yes/no. For instance, weather widget, email, yes. Benchmarking app, NO.
Worth a try. Installed Greenify and added most apps with ignore background-free.
Telorast said:
Worth a try. Installed Greenify and added most apps with ignore background-free.
Click to expand...
Click to collapse
I even hibernate alleged background free apps, just in case.
ChazzMatt said:
Lots of devs think their apps are most important and should always run in the background, so when you "launch" them they are there instantly.
Click to expand...
Click to collapse
VERY TRUE!
This always infuriated me, not just on phones, PCs too, all the way back to the DOS days. An obsession with running in the background, as if it's particularly clever. :cyclops:
I've also found that turning off battery optimization for apps I don't want killed helps. I've had the same experience with music and podcast apps getting killed in the background and turning off their battery optimization usually fixes it.
There are some simple things to try that do not require any special apk's. One is to look in the apps section of the "Developer options" sub-menu. The default settings work well in most instances. Perhaps you accidently enabled closing of apps when a background limit has been reached or have ticked force closure of apps on exit.
Another place to look is in the "Power saving exclusions" sub-menu in the Battery settings. Music makes some boring forms of exercise less tiresome and provides additional motivation for activities that are challenging but fun (mountain biking). The music should not stop, but it might for default settings. Enabling a power saving exclusion for your music app will keep it running.
ChazzMatt said:
Then you misunderstood what I wrote. Read it again.
It's exactly what you want, because then apps you don't want running won't take up your RAM and kick off the apps that you do want running. Like your flashlight app should NOT be running the background all the time. One example. Lots of devs think their apps are most important and should always run in the background, so when you "launch" them they are there instantly.
Like I said, I don't have your issue. My apps I WANT running stay running.
If you hibernate the UN-wanted apps, that will give more freedom to apps you DO want running in the background.
There are other apps besides Greenify which may do that task even better, it's just the most well known. It shows you complete list if apps running in the background and you can choose which you WANT to run and which you want to stay killed until you choose to activate them. Those apps will be forced hibernated from then on -- until you manually activate them. When you close them, they will STAY closed and not run in the background sucking up your RAM. It also allows you to go through your entire inventory and decide yes/no. For instance, weather widget, email, yes. Benchmarking app, NO.
Click to expand...
Click to collapse
Been using Greenify for a bit now and doesn't seem to help much. It shows a bunch of hibernated apps but multitasking is still nearly impossible.
I had assumed the problem was related to the Mem Free settings rather than actual free memory but no one here has mentioned it. Is that because no one else thinks it's the problem or maybe I have misunderstood what those settings do?
I thought apps were free to use as much memory as they want until certain thresholds on total memory usage were met, then the system would ask or force apps to release memory.
Apps that let you edit those settings usually shows several thresholds where the system gets progressively more aggressive at freeing memory as memory is running out. But they all look hopelessly out of date so maybe it works completely differently today?

is RUN_ANY_IN_BACKGROUND a better way to "hibernate" an app? difference between "force stop" or use greenify/superfreezZ ?

i was wondering..... some apps like greenify or superfreezZ use accessibility usage to track the app behaviour and auto hibernate them, but since android 9 there is a new command to restrict the background activity of an app and it is RUN_ANY_IN_BACKGROUND
you can simply enable in app info>battery>background restriction set to RESTRICT.
is it a "better" way to hibernate an app and stop all trackers, alarms and services that DRAIN the phone battery? or maybe it's is less powerfull than "force stop" the app?
how does compare DOZE to RUN_ANY_IN_BACKGROUND ? i suppose 1st is a generall switch off for all apps, BUT only on screen off. when you use the phone the "bad" app could continue to do what he wants, wakelocks, call some strange domains to receive or updload datas.... BUT WHAT IF it is restricted by RUN_ANY_IN_BACKGROUND? the app is not force stopped but should be something like hibernated when it's not foreground....?
i found some info here
App Power Management | Android Open Source Project
source.android.com
realista87 said:
i was wondering..... some apps like greenify or superfreezZ use accessibility usage to track the app behaviour and auto hibernate them, but since android 9 there is a new command to restrict the background activity of an app and it is RUN_ANY_IN_BACKGROUND
you can simply enable in app info>battery>background restriction set to RESTRICT.
is it a "better" way to hibernate an app and stop all trackers, alarms and services that DRAIN the phone battery? or maybe it's is less powerfull than "force stop" the app?
how does compare DOZE to RUN_ANY_IN_BACKGROUND ? i suppose 1st is a generall switch off for all apps, BUT only on screen off. when you use the phone the "bad" app could continue to do what he wants, wakelocks, call some strange domains to receive or updload datas.... BUT WHAT IF it is restricted by RUN_ANY_IN_BACKGROUND? the app is not force stopped but should be something like hibernated when it's not foreground....?
i found some info here
App Power Management | Android Open Source Project
source.android.com
Click to expand...
Click to collapse
Force Stop = "Hibernate"
Force Stop = App is killed and removed from memory, and (for the most part) not be able to start itself up again. User can. I read you asked the exact same question elsewhere and some talked how apps can restart themselves. Yes, its true BUT its the exceptioopn, not the rule. The only app that ciones to mind at the moment in my past is Google Play. His statement is misleading in practical everyday use. Test it for yourself.
I havent used it, but, RUN_ANY_IN_BACKGROUND explicitly requires the "deny" or "allow" attribute. The app is still in memory and therefore would have some possibility of bringing itself back to life; much more so than a force-stop. Some apps are developed with running a service as a foreground app. Also, RUN_ANY_IN_BACKGROUND is a TESTING feature of android.
ie Force Stop > RUN_ANY_IN_BACKGROUND
I have a hot spot on my home screen (custom launcher allowing scripts) that turns my screen oof and then force-stops all apps that I do not want running in the background.
You want an app to stop consuming battery, then force-stop is the way to go.
"RUN_ANY_IN_BACKGROUND is a TESTING feature of android."
mhhh so u say that not every app will really stop his background behaviour for sure? i thought that the command is quite sure to keep a closed app a "not battery hungry" app, stopping some services, alarms.
basically if u would choose an app to force close apps, would u choose superfreezz (because it s foss) over other alternatives like greenify or brevent?
because i would avoid to install any app for this, IF the command RUN_ANY....... is to consider quite powerfull and acceptable to "stop draining " battery from malicious apps...
realista87 said:
"RUN_ANY_IN_BACKGROUND is a TESTING feature of android."
mhhh so u say that not every app will really stop his background behaviour for sure? i thought that the command is quite sure to keep a closed app a "not battery hungry" app, stopping some services, alarms.
Click to expand...
Click to collapse
If you want to stop it, the a force stop is the way. Its much more "powerful" than what you found.
realista87 said:
basically if u would choose an app to force close apps, would u choose superfreezz (because it s foss) over other alternatives like greenify or brevent?
because i would avoid to install any app for this, IF the command RUN_ANY....... is to consider quite powerfull and acceptable to "stop draining " battery from malicious apps...
Click to expand...
Click to collapse
I explained to you, I use a shell script to get the job done. No need for another app, that also may consume unnecessary battery and memory.

Categories

Resources