Skip to main content

Phone makers are messing with Android's memory management, and Google isn't doing anything about it

Google Play Store
Google Play Store (Image credit: Android Central)

The company that makes your Android phone is doing Android memory management wrong. Because the best practices and in some cases actual requirements for access to Google Play aren't observed, app developers are seeing a new set of headaches if the apps they build need to work while you're looking at another screen or have the display turned off. Thankfully, the Urbandroid team has brought things to our attention with Dontkillmyapp.com. Here you'll find detailed descriptions of the problem as well as a scorecard for popular Android vendors rating each one's level of abuse with 1-5 piles of crap. Fitting

The statement at the website's GitHub page explains:

Ultimately, every indie Android developer is at least partly affected by this issue.We at Urbandroid Team are affected heavily with our Sleep as Android app and we gathered so much information about hacks and workarounds that we felt the need to share the information. We started by contacting individual indie developers with offers to exchange information, which led to the idea of a more effective approach in the form of an open-source website.

The "issue" is that the companies making phones have changed how vital Android components like Doze work; have built apps that are designed to aggressively sweep and kill apps that are using system resources; and even building whitelists that say which apps are allowed to run while not on the screen. That's making apps that need to work in the background — like Urbandroid's Sleep as Android app (opens in new tab) unable to do what they were intended to do.

This all falls on the app developer's ears, as unhappy customers don't understand how memory management in Android works (nor should they need to) and why it's not just isolated to their affected app. Unhappy customers make for unhappy developers, which is five piles of crap bad for all of us.

Not all of Android is open

You might be thinking, "So what? Android is open source and companies that use it can do whatever they want with the code," and to some extent you'd be right. But all of that changes as soon as a phone maker wants access to Google Play.

Google Play Store access isn't freely given — there is an agreement that both sides need to follow.

Getting access to Google Play requires some rules to be followed, many of which seem arbitrary at first glance. That's a larger discussion for another article or two, but the gist of it is that Google wants to have a bare minimum of things in place on every phone so that every app in the Play Store will work as long as the phone is on a supported version. In other words, if an app's listing says it requires Android 4 or higher to run, every phone running Android 4 or higher should be able to install and use the app. No exceptions.

There are some detailed ways that a developer who wants or needs an app to be alive and working in the background — whenever you aren't actively looking at the screen — to do so in a way that's consistent across all phones. Google can then also improve other parts of Android and know what not to mess with if it wants all the apps to still work so it can try to stay backward-compliant.

That doesn't always work. Every person who's had a Nexus or Pixel phone will tell you that new versions of Android often lead to apps no longer working, and some never get updated. Sometimes a decision has to be made and cutting off an old feature to replace it with something new happens. And Google has stepped in its own mess a time or two and botched things up, like the initial release of Doze in Android 6.0.

It's important to be consistent if you want to use Google's other products. Even with an open source piece of software.

How did we get here?

Smartphone makers aren't doing this just for fun. Every company making phones wants you to like a product you buy from them enough to look at its brand the next time you buy a phone. If apps were being killed off for no reason it would not help that happen.

When we buy a phone there is usually one thing that's close to the top of the list of things we want from it: long battery life. One way to get longer battery life is to limit what a phone can do; that's why you only need to charge a "dumb" phone a couple of times per week. It's not really doing much, especially when it's not in your hands. Smartphones, though, need to do a lot of things.

Killing background tasks may be good for your battery, but it makes your smartphone dumb.

Google has a system that puts apps in a "sleep" state when they aren't actively doing anything but might need to in the future. It's done a lot of work — some good, some bad — to balance things so that you have a phone that can do things like track your steps, monitor your sleep, or act as a music player while the screen is off without draining your battery. It expects these methods to be used and rules to be followed so that we get that consistency from every app in the Play Store.

From Dontkillmyapp's list, Nokia is the example I'll use here, but the list of offenders includes OnePlus, Sony, and Samsung, too. Even Google itself is called out for making it difficult to exempt an app from getting "Dozed". Nokia includes an app on every phone the company makes that runs Android Oreo or higher that kills every background process 20 minutes after the screen is turned off. That means fitness apps are never going to work, but it also means that your alarm isn't going to go off if you have Android P.

How did we get to the point where our smartphones aren't allowed to be smart? Because we demanded longer battery life and companies making phones are also making bad decisions to give it to us. There aren't a lot of things that can be done to Android by a phone maker that will have a big impact on battery life. One of the things that can be done is to kill off apps that might not need to be alive. When one of the killed apps did need to stay alive it just doesn't work as intended.

Google needs to tighten the clamps

I hate saying this. Android is an open source project that has seen some incredible development by companies not named Google over the years. Companies using Android should do what they want and push every boundary to make it better. But then we get back to that consistency for apps from the Play Store thing again.

Users — including users who are the type who know and understand an issue like this — deserve better. Google needs to make that happen when it comes to apps from its store, and alter and enforce whatever it takes to make it so. Do it without any user involvement whatsoever, and do it consistently no matter how big the company "offending" is or how many phones it sells.

We deserve it.

Jerry Hildenbrand
Jerry Hildenbrand

Jerry is an amateur woodworker and struggling shade tree mechanic. There's nothing he can't take apart, but many things he can't reassemble. You'll find him writing and speaking his loud opinion on Android Central and occasionally on Twitter.

64 Comments
  • So it's app developers fault Google's very own Pixel 3's are having memory issues?
  • Did you read the article at all? 'Even Google itself is called out for making it difficult to exempt an app from getting "Dozed".' . . . Does that sound like its an app developer's fault? Not really. Sounds more like its Google's fault that the Pixel 3's are having memory issues. Now if you're referring to an app being killed when its in the background, yup, still Google's fault. But only minorly so. Apparently you 'can' get the app to stay alive, but you gotta jump through some hoops ta do so. Although other device manufacturers require even MORE hoops to be jumped through to keep them alive.
  • Even media apps with persistent playback controls in the notification shade were getting killed. That has nothing to do with Doze. That's the system ignoring the one thing that should NEVER let an app get killed.
  • Reading comprehension isn't your strength, but that's okay
  • Maybe phone companies sould be sorta pragmatic and start the design process with adequate battery size as first consideration. I'm told that batteries are starting to look like gerrymandered congressional districts in Texas. Once the optimum battery situation is established then fit everything else in. Let the phone size be whatever it is. Some stupid crap might have to be left out but such is life.
  • That would sound good in theory, but not in practice. You need to know how much of a draw all your components cause before you can choose an appropriate battery. If you chose a 1000mAh battery for the device, but then all the components use up that 1000mAh within 30 minutes... then that battery isn't very fitting for it now is it?
  • A larger battery will always provide better battery life with all other things being equal. You're trying to make an obtuse argument and it didn't work.
  • That sounds great, but these aren't unknown numbers. Manufacturers know exactly what each component will draw, and as a rule it is either the same or better as last item used.
  • I agree with Jimmy here, put bigger batteries in and we won't have to kill apps just to make the battery last through the day....
  • Don't know why so many apps need constant access to resources, it makes sense for some but many it does not. Between that and so much bloatware makes me miss Windows Mobile.
  • Alot of apps 'want' constant access so the app dev can see how the app is being used, and to be able track your habbits so it can report back to an ad company. 98% of apps (just choosing a number here folks) that are free, contain massive amounts of ads... which has to be pulled somehow. But yea, the amount of apps that actually 'need' the access, are slim.
  • How does this compare to IOS app management?
  • I think IOS basically only uses memory when an Application needs it, for instance, Google Maps application cannot download offline maps unless the application is open, it would work in the background. I forgot the thread on an IOS forum but I'm certain Apple just shuts down programs when needed to keep a certain set of memory available.
  • Aka does exactly what Android does.
  • Sort of. Apple has "services" that apps can use for background tasks. They made a point of this during whatever keynote it was that they announced multitasking.
  • https://www.reddit.com/r/Android/comments/abygy6/apps_being_able_to_full...
  • I'm relatively new to Android. How do I get to a command prompt to type those adb commands?
  • Wrong place to be bud. Go to Google.
  • You use ADB commands from a computer, not your phone. And if you don't know how to bring up a command prompt you shouldn't be messing with ADB until you've done a LOT more reading. Otherwise you may as well just write the "I've deleted my system partition and my phone won't start, help!" Forum post now.
  • lmao that last sentence was funny.
  • Let me state this first: I totally agree with the article, and that we really do deserve better... But I have to throw out this silly bit of controversy cause hey, insert reason here! Lol We 'deserve' better huh? Sounds more like you meant to say "We're entitled to better" ;D ;D Joking folks joking!
  • I've found this to be particularly bad on my Note9 while trying to chromecast Youtube. I queue up several videos, but if I have Youtube off the screen, or even just let the screen go to sleep, the connection drops and the queue of videos is erased. After much searching, I finally stumbled upon a Reddit thread that showed me how to adjust the settings so Youtube wouldn't keep getting disconnected from casting.
  • And another annoying thing about casting YouTube is the bitrate of the audio gets lowered because for some reason, the YouTube apps don't support opus or 256k AAC.
  • @ultimate_ed That's very strange, usually after you cast something you can shut off your phone completely and it should continue playing, unless you're casting your screen. Are you sure you're using the cast button from the YouTube app itself, not casting your screen?
  • Interestingly, HTC is better at memory management than Google, and still maintains very good battery life... at least on the U11 and prior. Although OEM's should do better, what about shoddy apps, like the Android Central mobile app?
    Seriously. Out of 141 apps on my phone, the AC app burns more battery than everything, using three times as battery as streaming virtual reality content over mobile data. Something is seriously wrong with it, and I had to set to force close every time.
  • 141 apps? Goddamn. I think I have like 30 at most.
  • Being on-call and on the road a lot, I keep a lot of crap that most people would not, lol.
  • That may include system apps?
  • Welcome to Add-droid Central
    That's from all those adds constantly loading s*it up.
  • It's amazing the difference it makes if you only run ad-free paid for software.
  • To be fair, I think Google's gaffs in this department were just that, gaffs, because they are being fixed. For example, just a few/6 months back, casting from the Netflix app would be halted the moment the device's Play Store App decided to auto-update apps. So Netflix casting would be impossible until all the Play Store apps were updated, or you forced the Play Store app to not auto-update. Today though, that problem is long gone.  
  • No. I don't agree, at all. I want my phone to be aggressive about what is running in the background. There is a reason I get 2.5 days on a single charge with my OnePlus 6t. For the apps I KNOW I want to run in the background there are 3 things I do to let them. 1- Disable battery optimization for them. 2- pin the app to the last used list 3- Disable deep optimization altogether. This generally isolates the apps I know should always be running from the junk. Everything else should damn we'll be caged and kept from running as it is obvious app developers aren't optimizing their app for the latest and greatest versions of Android.
    Ive been on Android since the G1 days. I've seen this damn argument for years and it does not fly as I've seen my phone's memory absolutely get hammered by too much **** in it. To the point that I had my phone rebooting once every 4 days to clean crap out. And that was on Nexus devices. Now that we are seeing things in the 8 GB of RAM + range it opens up some breathing room to let Androids memory management do it's thing without being overly aggressive.
  • I agree with this dude. I prefer longer battery life than apps running in the background without control. Of course with a way to let my choice of apps to run on the background if need be.
  • @SiliconAddict You forget one important thing, you are the exception not the rule. If apps that were built for background functionality asked every user to go make those settings changes, as 99.99% of them are nonsavvy, noone would use those apps.
  • That's kinda their point. If they instead designed a function that put your phone in airplane mode 20 seconds after you turned the screen off until you turned it back on, your battery would last for DAYS...but it wouldn't be a very functional device unless you just like carrying it in your pocket. If you kill off all of the functions that make a smartphone smart, you're back to a Nokia 5200 brick phone, albeit with a bigger screen.
  • I still get a couple days on one charge from the U11, even with apps in memory. The exceptions are the bad apps, and I force close those.
  • Yes, I agree. I prefer Sony and am quite happy with their memory management, but then I use very few apps and the BlackBerry Hub, and it isn't unusual to get a battery drain of 1% per hour. That's because in an emergency I want plenty of battery remaining.
    I reboot every couple of months just in case.
  • Aggressive memory management can play a lot in how apps get killed off, and doze isn’t too bad if memory management isn’t out of whack. Mfgrs can adjust the lmk( lowmemorykiller) to too high, or too low in relation to the hardware, and memory amount. Mfgrs adjust for their own relationships to battery life/apps, and damn other apps , and how they operate. I call this lazy optimization, and cheating just to show that their phone last longer than another. Even adjusting the I/o scheduler can have a effect on battery life vs app killing. You can’t just blame doze, there are so many other factors behind the scene, that on stock roms, that you’ll never see. Rooting a phone, and having access to these parameters, and having the knowledge to not wantonly “f n” it up , can increase battery life, and agressive app killing to a minimum.
  • It's not our fault. They could make the batteries bigger! I don't care about a super slim phone, I want battery life. Phone makers have made it hard to get a big battery in most cases. Loved my Moto X Play for it's 2 day battery.
  • Some people prefer a slim phone so they can keep it inside their pockets. If my favorite brand release a 4.7 or 5.1 all screen phone I would buy that without thinking. But alas... they won't.
  • That seems to be Microsoft's philosophy with Windows. "If you're not happy with our sloppy memory management techniques, don't blame us--just buy more memory."
  • Memory management for Windows is fine. It's their over abundance of their services running in the background that is the problem.
  • Most of which can be turned off by the average user with no issue whatsoever. But Microsoft doesn't really advertise what their services do until you get to the MSCE level, and by then it's really a moot point.
  • Whatever OnePlus is doing it's working, my 6 is the fastest and most battery efficient phone I have. Using oxygen os and going back to my pixel 3xl feels like I stepped back in time ...
  • I don't know if anyone else noticed what the author of this article said right at the end, but I sure did, and I quote " Do it without any user involvement whatsoever, and do it consistently" WOW... I don't know about you, but that was a pretty bold statement to make. In a time where a smartphone is such a intrical part of our lives where we keep all of our information on it personal, business, photos, letters, and even our debit and credit cards, we do this in the hopes of making our lives easier, by using different apps thru out the day, however when the people who either design them or the companies who manufacturers the devices are dictating how we use them, well personally I think that's a slippery slope I don't want to be on. What I'm saying is that we go out we work and earn money so we can get what we need and sometimes want so as to make our lives more enjoyable and in some cases make life easier, but when we'd get to the point that we don't have any say so in how we use something that plays such intrical part in our daily lives then where are we? If I spend my hard-earned money to purchase a device such as a smartphone then it should be up to me how and when and where I use it. It should not be left up to either people who design apps, manufacturer of the phone, or the carrier from whom I purchase the phone from to tell me what I can or cannot do with said device and that should hold true for anything that we buy. I should have the option of how and what a app does on my phone if I'm okay with letting who knows who knowing everything that I'm doing, where I'm going, how I'm getting there, how long it took me to get there, and what I'm doing when I get there, then that should be left up to me, and it should also be up to me if I don't want app running in the background sending information. In a day where we keep all of our sensitive information on a smartphone so that we can have it at our fingertips any given moment of the day then I definitely should have the option how a app works on my phone, if you want it to run in the background when you don't know what it's doing then that's fine but as for me I prefer to know exactly what's going on with my phone and who has access to my information, in a world where everyone now is complaining about his or her privacy and who has access to their information, and how it is being used it's up to you, so if your fine with not knowing who or how this information is going to that's should be up to you, as for me I prefer to know exactly how and what my personal information is being used and I should have the option if I want that information being given out or not.
  • This is OUR fault guys. We demanded that phones be slim, fast, beautiful screens, great battery life - and that simply violates the laws of physics. Slim batteries have lower ma/h than larger batteries. Big high resolution screens have higher energy demands. Faster processors have higher energy demands. Heat also impacts battery performance. Add in GPS/ 3 or 4 wifi radios, bluetooth receiver/transmitter - your little phone is doing a LOT. Plus add in that when companies benchmark their devices, they're in a lab under optimal conditions, meaning that while they may be looping a video, they're not doing what we do with our phones: looping a video while twitter, email and facebook are pushing notifications and our favorite time-killing game is suspended in the background. So we complained when the 'real-world' battery tests didn't come close to the lab ones - so what's left ? Kill the apps when we're not looking so that our phone usage looks more similar to the 'lab' tests, thus giving us better battery life. Which is great! Until.. we figure out that really, the battery life isn't better. They simply changed our phones without our consent.
  • Um, my Nexii, my pixels and my one plus phones have never had any issues with memory management. I have apps on OnePlus 5T right now that have not been removed from memory and I haven't used them since Thursday. Google music/YouTube music I use all the time. If I listen to something going to work pause and leave it, I'll be able to go back to it the next day and continue listening to the same song, at the same point on the way the following day. I do this everyday. YouTube is the same way, Pubg, chrome, they don't go anywhere. Instagram, Twitter and things like that load in at the same place, then auto update for me. The Galaxy s9 I got for my dad though, that thing is trash, it kills music apps as soon as the song is done playing in the background.
  • yes, because they are under direct control from google. but of course, you pay for this (DEARLY) -> and I do not only mean in dollars and cents, you are also/always lacking micro sd card, more recently the support and upgrades are time limited, then uncle sam regulates what hardware vendors are "safe" (safe for ******* what?!?) -> best example with nexus 6p, which was never upgraded to pie, because the trump administration, who knows about computers about how much a monkey knows about quantum physics, deemed huawey unsafe... lol
  • The 6P was never supposed to get Pie
  • Wouldn't the garbage apps that companies put on phones and tablets be part of the battery life problem? I have a Samsung Galaxy Tab-E and a Motorola G6. The G6? Battery life sucks waaay beyond 5 piles of crap, it freezes every time I wake it, and is jyst a terrible waste of electronics. My Tab-E? Came loaded with garbage that eats the heck out of memory and battery life.
    Just found out they have made it darn near impossible to install custom fonts from anywhere but the Galaxy app store, too. I figure if I buy something, well, it belongs to me. If I want to shut down apps making my equipment drag or be charged twice in 24 hours, then I SHOULD be able to do so. I installed an app killer to help with bloatware but it didnt originally do anything noticeable. I figured out that I can turn the killer on, but then I STILL have to go app by app and manually put them in 'sleep' mode! The simple thing to do would be make a phone, install what it needs for compatibility and the basic functions of a smart phone and then (gasp!) LEAVE IT ALONE! Google is a tech GIANT, why they keep biting their own hand is a mystery.
  • LineageOS is your friend.
  • "Nokia includes an app on every phone the company makes that runs Android Oreo or higher that kills every background process 20 minutes after the screen is turned off. That means fitness apps are never going to work, but it also means that your alarm isn't going to go off if you have Android P." HMD is doing far worse than that. They are leaving the software to be altered by the Chinese company Evenwell which fills their precious Android One phones not only with substitute system managers but potentially a ton of other crapware.
    And Google is OK with this anx they're kept on the Android One program.
  • open source my ass!
    how is this open source?!? you get access to some source (NOT all), phones cannot be directly unlocked (for developers) and are generally manufactured in labor camp, communist / criminal countries like ******* china. china should not even be allowed to sell anywhere anything at all in the (so called) free world, till they learn how to make nice, at least with their citizens
  • The US should not be allowed to sell anything anywhere at all till they stop being the number one terrorist organization on earth churning out brainwashed idiots like you by the herd. The so called labour camps provide free meals+living quarters which is a lot better than the average benefits you get here.
  • Open source refers to ASOP, the kernel of Android. It is open source, then entire source code is free for you to view, and manipulate. The services that use ASOP however are not open source. They are proprietary.
  • Firstly I hate that the word "We" is used, unless you mean 'we' the press? Because most of the people (friends, family, work colleagues) want is the battery to last one day. Another reason why phones are poor for battery life is the insistence (by the press/media again) for phones that are 1mm thick. The thinner the phone the smaller the battery. Its like the notch, so many complain in the press but its thier insistence that we don't want bezels that is now leading to a flipping hole in the display! Sorry but I for one am happy with bezels (they give my hands something to hold onto without touching the screen) and I'd be happy with a fatter phone that has a decent sized battery. Then again I am getting old and maybe I have turned into my dad and these things are beyond me now, fashion first am I right? Lol
  • "There aren't a lot of things that can be done to Android by a phone maker that will have a big impact on battery life." They could put in a bigger battery, or make an optional "backpack" cover that increases battery life for those that need/want it. Most of the polls I've seen about battery life have indicated that people are willing to put up with thicker devices for longer battery life.
  • In a desktop os the user can choose to close or minimize a program. I wish android had an easy way to do this. I should be able to decide which apps are running in the background. If I'm done with an app I should be able to just exit out of it. If I want it to continue running I would leave it running. The os shouldn't be deciding this for me.
  • Google is probably the worst when it comes to memory management, why would they care? Lol
  • I created an account just to call bull**** on part of this article. My Nokia 6 on 8.1 runs apps from one day to the next without any issues. My fitness apps are fine, as is keeping whatever apps I please open for as long as I want. I don't know what app Nokia is using to "kill everything after 20 minutes" but it's certainly not in my Oreo.
  • Have you ever heard the phrase, "The plural of anecdote is not data" ? That describes your retort.
  • I disagree...there are too many apps that have no business running in the background, running in the background. Let the phone user decide which apps run in the background.
  • Great article, articulately written and simple to understand. Thanks
  • Oops, wrong section.