Skip Navigation

How can Apps constantly Auto Start themselves in the background and what can you do about it?

This stuff drives me so mad. I recently have noticed higher than usual over-night drain on my phone and decided to investigate a bit. So I connected my phone to my machine, closed out all the apps waited a few seconds and ran adb shell top with a few parameters to see what is actually running.

And would you look at that, despite the phone telling me that nothing is running at all, the microsoft copilot, ebay kleinanzeigen (a german craigslist), google photos and google search either have not been closed or somehow started themselves. Also I have not received any notifications for these Apps in the last few seconds.

First of all, how are these Apps even doing it? With the two Google Apps I kinda get it, since they are System Apps, but in the case of ebay Kleinanzeigen and microsoft copilot it makes 0 sense since they are regular 3rd party Apps. How can they bypass seemingly all optimizations and start themselves (I haven't used the Microsoft copilot app in months). Also is there any way to prevent this from happening or at the very least get some kind of summary how often these Apps ran in the background. Sadly the Android battery information page is totally useless. With many of these Apps I don't care about notifications or anything and I never want them to run after I close them in the task manager.

20

You're viewing a single thread.

20 comments
  • Android starts apps whenever a broadcast receiver for them gets triggered, unless the app crashed. Broadcast receivers can be messages exchanged between apps, connection events, battery charge events, you name it. Anything the OS might want to update an app for may cause a broadcast event. You cannot disable this mechanism; it's the reason Android can put apps to sleep for days and still have them respond to important events as if they're constantly running in the background without actually wasting any CPU on them.

    Most of the time, you don't want to kill these background tasks. If they're doing something for more than a few seconds, they'll need to show a notification (though you won't see that if you've hidden notifications from the app). Killing them will only make the phone restart them the next time an event they're subscribed to gets triggered, which will cost you CPU time. Force stopping apps may stop services from randomly restarting, but if a notification comes in, the app may get started again.

    To figure out battery drain, check the battery stats in the settings first. That should show you what apps have been active in the foreground/background for how long.

    If that fails, you can start doing a deep dive into Battery Historian and its successors.

    Also make sure you exit any terminal sessions on your phone, if you use them, because terminal emulators often keep a wakelock, which might let the screen turn off but leave the phone running (so the commands don't get killed when the phone goes to sleep).

    Based on the screenshot you showed, most of the CPU time seems to have gone into the Android system itself (system_server, your launcher, and so on). If you use any widgets, try removing those. Maybe also check if the launcher throws any errors. A simple adb logstat *:E should give a (long) overview of crashes and errors your phone is running into. Some of them may be unimportant, others could be the reason your phone got drained.

You've viewed 20 comments.