There lot of interrogations and frustrations concerning slowdowns/battery drains on Android, sometimes not really fair.
You need to control your build and knowing what is going on into it, because most programs you install live from their own and can downgrade your stability and your battery performance.
A detailed guide is provided here in order to have a good battery drain with very smooth and reliable android experience on Hd2, gathering tips and advices users need to know when they come to this Os or want to improve it durably.
Following this guide, you will be able to have hundreds of apps into a super smooth, stable and battery friendly android build.
Most importantly, without transforming your smartphone into a dumbphone :
- Wifi and sync always on
- Mails checked every hour
- 148 applications installed (no I don’t need them all ;-) )
- 6 widgets running on the screen or in background (check screenshot) : Folder organizer, News, Facebook, Current widget, Powersnap, switch pro, pure calendar, pure grid calendar.
- In standby, it can last for 4 days :
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
- Smartphones are more and more looking like a laptop, so I consider that 5 or 6 hours with the screen alight is good.
The assumption is the battery drain can be affected by several factors:
1) Screen brightness.
2) Memory management if wrongly configured
3) Program launching in background if wrongly configured
4) Program updating in background if wrongly configured
5) Build and Kernel
6) Wm rom, radio, Sd card, Cpu in standby
7) Extras : Backups, customizing etc
Once you have the good utilities and understand how it works, it is easy to setup and need no more tweaks, unless you install new apps.
To keep a battery trace, current widget with logs and battery snap are mainly used.
1) Screen consumption
The screen battery consumption is huge when we use the phone. It was the same on windows mobile, and was to expect when buying it with that huge size.
Therefore, the screen brightness is an important factor to deal with.
In order to keep a good battery life when your phone is on, you need to keep your phone around 300 MiliAmpers or less. You have to keep in mind that a 75% brightness = 500Ma.
The best behavior is to keep your screen :
-25% brightness at home, with no sun.
-50% brightness mostly of the time
-75% and 100% brightness in very rare occasions with direct sun exposition.
In order to swich fast between this settings, and since we don’t have for now a functional kernel with auto brightness, using a brightness widget is recommended.
I personnaly use “Brighness level”, and launch it by swiping a dock icon into launcher pro.
Ps : Take care to not press 0%, or your screen will be completely dark. You can revert by guessing where the icons were, but it is tricky.
2) Memory management
In order to keep your hd2 fast and battery friendly, it is better to keep your phone with more than 200Mo free ram (when you are not using it).
There is a great free program for that, called task panel X. With it you can choose which program you want to close every time you put your phone in standby.
It is very important that you choose well the apps that need to stay in memory, and the others.
It is pretty simple: Keep the widget you use and system apps. Discard all the others by including them in the autokill list. It is a bit long to do if you have hundreds apps, but you have to do it only one time.
Example:
3) Programs launching automatically in background
You need to control the apps you install. Problem is that some programs are launched automatically into your memory at any time. I was surprised to see that programs that don’t need to be to stay in memory (when I don’t use them) launch by themselves at anytime. “Mabilo wallpapers” was the best (or worst) example.
You need an app to control that. I recommend “Startup Auditor”, and set carefully wich apps that can launch by themselves or not. Same as with task panel, just keep system apps and widgets. You can keep too your mail app. If you don’t use the Gmail app program, remove it from the list.
You will see into task panel that very few programs keeps running despite of that. You have to question yourself: “Ok this one is great to find new wallpapers, but it is constantly running in my memory and I don’t know why (suspicious) -> Do I really need it ?”
4) Programs updating in background
Programs that you authorize to launch automatically in your memory are often in order to update automatically things. (Mail, weather, facebook, tweeter etc…)
It is important that you know what they are, and where are located their update settings in order to not to waste uselessly your battery. Checking mails each hour or two hour is sufficient. Checking every 15mn cause obvious battery drains.
For most needs, manual updates for social apps or weather is sufficient, because it take only two seconds when you want to see them. If manual updating is not available, choose the longer updating interval (one day for example)
5) Builds
The following is based on my personal opinion; you are free to use and test every build you want.
First, i don’t recommend using sense builds due to personal bad experiments. I had crash and a lot of slowdowns, but most importantly it was battery draining due to all the htc third apps hard coded into. It is a build very hard to control.
I use and recommend a shubCRAFT 1.5 with stock Cyanogen mod 6 Final :
http://forum.xda-developers.com/showthread.php?t=740963
Don’t forget to download the 1Go user data file in order to install more apps.
It’s a build very fast to boot, smooth, efficient and highly customizable. The kernel provided in it is good for now.
Launcher Pro is used here, very smooth and easy to customize.
6) Wm rom, radio, Sd card, Cpu
SetCpu can be usefull, depending on the kernel you are using. There is a lot of threads on it, the most important setting is to downclock your cpu at standby.
Sd card
There is some evidences that your sd card can drain your battery. If you follow this guide and still have battery drain, it can be the cause. Check into this post :
http://forum.xda-developers.com/showthread.php?t=781433
I use a Kingston 16Go class 10 micro sdhc card with no issue.
Registry tricks :
I had before these regitry settings into windows mobile rom, no idea how it affect Android :
http://forum.xda-developers.com/showthread.php?t=585729
Radio
I use 2.12.50.02_02
Ppp or rmnet
I don't have dataplans, so i can't tell about rmnet or ppp battery drains, but my suggestions to users who use it, is to activate it when you turn on your phone or every one hour, with a third app like Tasker.
SuperUser permissions
Polo735 suggest that, in rare cases, the superuser permissions program can be faulty and need te reinstalled, otherwise it drains your battery.
Symptoms are : When installing an app requiring superuser permissions, no pop up granting it appear.
See his post here
7) Extras :
If you like the screenshots design, it is the stock Shubcraft froyo framework with a custom black toolbar form manup revolution theme, compressed for speed. You can download it bellow and copy the file to /sdcard/Android/root/system/framework/ You have to set some custom colors into the cyanogens mod settings:
-Toolbar color in black
-Clock color in white
-Date and toolbar title in white.
Have fun !
Nice one, thanks!
Blame73 said:
Nice one, thanks!
Click to expand...
Click to collapse
Happy to help
Sichroteph said:
I don't have dataplans...
Click to expand...
Click to collapse
This is possibly the major reason of your low battery consumption...
Wildcopper said:
This is possibly the major reason of your low battery consumption...
Click to expand...
Click to collapse
Na, I use data most of the and with it turned on I get between 7 and 10 mA in standby,
Nice thread was already using most fixes just different apps, any chance of a link for task panel x can't find it on market.
And like the brightness app, lol first thing I did was press 0%
Sent from my HTC HD2 using Tapatalk
Sichroteph said:
Happy to help
Click to expand...
Click to collapse
I'd recommend you give bangsters build a shot, according to shu8i's Twitter he's offline till October :-\ bangster us constantly updating and everything is pretty stable
Sent from my HTC HD2 using Tapatalk
whynot66 said:
Na, I use data most of the and with it turned on I get between 7 and 10 mA in standby,
Nice thread was already using most fixes just different apps, any chance of a link for task panel x can't find it on market.
And like the brightness app, lol first thing I did was press 0%
Sent from my HTC HD2 using Tapatalk
Click to expand...
Click to collapse
Try this link from your htc hd2, should bring you directly to the market :
market://search?q=pname:com.taskpanel
Sichroteph said:
Try this link from your htc hd2, should bring you directly to the market :
market://search?q=pname:com.taskpanel
Click to expand...
Click to collapse
Thanks but Not there for me :-( where are you based? Must need the market enabler
Sent from my HTC HD2 using Tapatalk
whynot66 said:
Na, I use data most of the and with it turned on I get between 7 and 10 mA in standby
Click to expand...
Click to collapse
I use data and get 5mA in standby (screen off).
If this was true, the 1230mAh battery should last 1230/5=246 hours in standby mode running Android, which is 10.25 days, right?
We all know this isn't true.
The battery consumption gadget is cute, but not precise
whynot66 said:
I'd recommend you give bangsters build a shot, according to shu8i's Twitter he's offline till October :-\ bangster us constantly updating and everything is pretty stable
Sent from my HTC HD2 using Tapatalk
Click to expand...
Click to collapse
Agree, it is a good build too. Cyanogen makes thing so smooth. I recommended Shubcraft, just because i have no drawback to say about it, but fortunately there are other builds we can use.
Wildcopper said:
I use data and get 5mA in standby (screen off).
If this was true, the 1230mAh battery should last 1230/5=246 hours in standby mode running Android, which is 10.25 days, right?
We all know this isn't true.
The battery consumption gadget is cute, but not precise
Click to expand...
Click to collapse
Who's gonna leave there phone in standby for ten days to test it, infact who's gonna leave their hd2 in there pocket for 30minutes, fact is my data is on I've just been to my current widget log and for the last ten minutes (logging every 2mins) my usage was 4mA, 5mA, 3mA, 6mA, 4mA
So you tell me? Guess the current widget doesn't work
Is there any other battery widgets so I can run multiple ones and compare.results?
I left off charge last night for 8 hours while I slept and used 5% I think its pretty accurate reality.
Sent from my HTC HD2 using Tapatalk
Wildcopper said:
I use data and get 5mA in standby (screen off).
If this was true, the 1230mAh battery should last 1230/5=246 hours in standby mode running Android, which is 10.25 days, right?
We all know this isn't true.
The battery consumption gadget is cute, but not precise
Click to expand...
Click to collapse
I made a simplier calculation. I lost 1% per hour, so 4 days in standby. maybe a more rigorous way. Current widget is not always very precise, but it can help a lot to trace possible battery drains.
whynot66 said:
Thanks but Not there for me :-( where are you based? Must need the market enabler
Sent from my HTC HD2 using Tapatalk
Click to expand...
Click to collapse
I extracted the Taskpanel X apk from a titanium backup ... Don't know if it will work for you.
Sichroteph said:
I made a simplier calculation. I lost 1% per hour, so 4 days in standby. maybe a more rigorous way. Current widget is not always very precise, but it can help a lot to trace possible battery drains.
Click to expand...
Click to collapse
Yeah, that's more accurate. That's approximatively what I lose too. But it's definitely draining more than 5mA.
It's not THAT bad, but Windows Mobile is still way more energy efficient.
My guess is that there are some things that should be turned off but aren't, hardware wise, when the HD2 runs under Android.
Wildcopper said:
Yeah, that's more accurate. That's approximatively what I lose too. But it's definitely draining more than 5mA.
It's not THAT bad, but Windows Mobile is still way more energy efficient.
My guess is that there are some things that should be turned off but aren't, hardware wise, when the HD2 runs under Android.
Click to expand...
Click to collapse
That's not the point of this thread. I am pretty sure this it is useful to new users because wm and android are obviously different to manage. I want to bring something rational here, talking about screen consumption and memory management. Not about "something" we can't see but drains.
I saw several windows mobile threads concerning battery life frustrations too, so it would be more constructive to make some real battery tests between this two Os. For now, what some users complains are just "feelings" for me.
Hey, I didn't want to belittle your thread, the OP is definitely useful
My point was, right now even with all tweaks, the situation is not really satisfying, and hopefully soon we won't need any tweaking anymore because the developers will have perfected the HD2 port.
One thing that may help some people:
Make sure that your phone is using superuser permissions correctly. A while back on an earlier build I installed setcpu and autokiller. I thought they were working correctly but my battery life was poor. I tried opening superuser permissions and it crashed. I uninstalled Superuser Permissions, then reinstalled. Now setcpu and autokiller work correctly and battery is very good.
There is no indication that these apps aren't working besides the "... granted superuser permissions" popup. If you don't know to look for that message you may not realize there is a problem.
polo735 said:
One thing that may help some people:
Make sure that your phone is using superuser permissions correctly. A while back on an earlier build I installed setcpu and autokiller. I thought they were working correctly but my battery life was poor. I tried opening superuser permissions and it crashed. I uninstalled Superuser Permissions, then reinstalled. Now setcpu and autokiller work correctly and battery is very good.
There is no indication that these apps aren't working besides the "... granted superuser permissions" popup. If you don't know to look for that message you may not realize there is a problem.
Click to expand...
Click to collapse
Never saw that problem before, nevertheless with no doubt it can help a lot.
Added in first post, thanks.
Related
Since no one replied to this message in the official CM 5.0 thread. I have decided to create a new thread and hope to find a solution to this problem.
My alarm clock would stop working randomly ever since I flashed to CM 5.0, from Beta 4 to 5..2, the problem persists. If i set an alarm that is about one hour from now, it would go off. But the real alarm I need which is supposed to go off at 8 am in the morning never goes off. Anyone had similar problems? I read Cyanogen's warning about the alarm clock problem. But seems he's just trying to remind you to reset your alarm after flashing to CM. Unluckily, I've reset my alarm numerous times and it never goes off in the morning.
Anyone can give me a hand? Thanks in advance! Overall, CM is a great ROM which gives me the option to use open vpn, which is vital for me since I'm living in China behind the GFW.
Are you by chance using any taskillers?
I do use a task-killer program. But I always keep the clock app on while i'm sleeping to try to make sure the alarm goes off on time. But it never does in the morning.
Don't use task killers on the N1, there really is no need.
cyanogen said:
Don't use task killers on the N1, there really is no need.
Click to expand...
Click to collapse
I wouldn't say that's accurate... The phone does slow down noticeably when you have 20-30+ things open
Sometimes a lot of them are running as well (using TasKiller, a lot of Yellow, including Camera, Gmail etc even when not in use and no emails being downloaded). This probably affects battery life as well.
Paul22000 said:
I wouldn't say that's accurate... The phone does slow down noticeably when you have 20-30+ things open
Sometimes a lot of them are running as well (using TasKiller, a lot of Yellow, including Camera, Gmail etc even when not in use and no emails being downloaded). This probably affects battery life as well.
Click to expand...
Click to collapse
Do you have any evidence to back this up? Yes this was a problem on older devices because many things would be fighting over the tiny amount of RAM.
You'll see lots of processes running but that's just the way Android works. Since it doesn't really benefit from simple caching like a normal linux system would, it just keeps everything running and kills unused stuff when memory is low. Most of the things you see running are either paused and using no CPU, or are services that would be periodically launched anyway.
http://developer.android.com/guide/topics/fundamentals.html#lcycles
Keeping these processes alive should actually be saving you battery rather than using it. It's more expensive to launch and restore the state of an application or service after being killed than it is to simply resume one that's been paused.
cyanogen said:
Do you have any evidence to back this up? Yes this was a problem on older devices because many things would be fighting over the tiny amount of RAM.
You'll see lots of processes running but that's just the way Android works. Since it doesn't really benefit from simple caching like a normal linux system would, it just keeps everything running and kills unused stuff when memory is low. Most of the things you see running are either paused and using no CPU, or are services that would be periodically launched anyway.
http://developer.android.com/guide/topics/fundamentals.html#lcycles
Click to expand...
Click to collapse
Yes. The phone gets slow when TasKiller shows 30 things in it. I click close all, and it's faster. Do you know my personal experiences more than I do?
Paul22000 said:
Yes. The phone gets slow when TasKiller shows 30 things in it. I click close all, and it's faster. Do you know my personal experiences more than I do?
Click to expand...
Click to collapse
I think there is likely one or two specific misbehaving applications that are giving you trouble, rather than the way the system works as a whole, thats all.
I think what Cyanogen is saying is that android does not handle running processes the way other os's do They have a lifecycle that is non-obvious to someone just looking at a process list. If you insist on killing tasks outside of the activity/service lifecycle they you _will_ get service failures (like the alarm clock) its up to you what you value more.
I have not installed any sort of task manager (outside what's in astro but I don't use it) and never see any noticeable slow down.
Anyway - back on topic.
Yes I have the same issue, never had it before.
Since flashine 5.0.2 my alarm doesn't work in the morning.
The linux kernel keeps a buffer cache of recently used files in RAM. So whenever an application wants to access something on the flash, instead of going to the flash file system, it can just get it from the file buffer cache in RAM, a significant speed increase.
If the RAM is currently being taken up by unused android apps, then that leaves less room for the buffer cache, so in theory, by killing off unused android apps more quickly, that will allow the linux kernel to allocate more space for the buffer cache and thus speeding up the system.
Am I way off here?
Dave
cyanogen said:
Do you have any evidence to back this up? Yes this was a problem on older devices because many things would be fighting over the tiny amount of RAM.
You'll see lots of processes running but that's just the way Android works. Since it doesn't really benefit from simple caching like a normal linux system would, it just keeps everything running and kills unused stuff when memory is low. Most of the things you see running are either paused and using no CPU, or are services that would be periodically launched anyway.
http://developer.android.com/guide/topics/fundamentals.html#lcycles
Keeping these processes alive should actually be saving you battery rather than using it. It's more expensive to launch and restore the state of an application or service after being killed than it is to simply resume one that's been paused.
Click to expand...
Click to collapse
I would have to agree with Cyanogen on this one. When I first got my N1, I looked towards task killers to help alleviate slowdown, but in the end, I think it's just the placebo effect in a way; you did something to try to solve the problem, and so therefore you perceive a difference.
In other words, task killers aren't needed on this beast of a phone. As for battery life (if that's an issue), look into SetCpu.
Thanks for the reply Cyanogen. I think not using task-killer, or at least not killing the clock app got my alarm working this morning. But I use task-killer not for the purpose of saving ram, but for using less data. Some programs such as facebook or a twitter client would try to connect to the internet every once in a while. I'm on a low data limit plan in China. So I don't want those programs to eat up all my data. When I'm on wifi at home, I don't worry about that. Thanks again.
Same problem. Don't use taskkillers, flashed last CM last night and didn't wake up on time this morning - alarm didn't work, thought I checked that clock icon was on place on notification bar
amwayorlando said:
But I use task-killer not for the purpose of saving ram, but for using less data. Some programs such as facebook or a twitter client would try to connect to the internet every once in a while. I'm on a low data limit plan in China. So I don't want those programs to eat up all my data.
Click to expand...
Click to collapse
Have you thought about using something like APNDroid or Toggle Data, to just switch off the cell data when you don't want to use it?
Or, Modify the behavior of the applications you don't want using data?
I have my facebook and twitter for example set to manual update only (for battery saving purposes) because there's nothing there that is critical important info, and I don't need to be notified.
Nice thread though, I'm pretty sure I try to keep people informed that task-killers aren't needed and cause issues, everywhere where it comes up. I find humor that people will still argue, even with a developer, this fact. I've had 150+ hours uptime with no slowdown (and 30 apps running) on the stock rom (without highmem support).
bofslime said:
Or, Modify the behavior of the applications you don't want using data?
I have my facebook and twitter for example set to manual update only (for battery saving purposes) because there's nothing there that is critical important info, and I don't need to be notified.
Nice thread though, I'm pretty sure I try to keep people informed that task-killers aren't needed and cause issues, everywhere where it comes up. I find humor that people will still argue, even with a developer, this fact. I've had 150+ hours uptime with no slowdown (and 30 apps running) on the stock rom (without highmem support).
Click to expand...
Click to collapse
Then please inform us of a thread that can verify what you all are saying. Not in an argumentative tone, my linpack score drastically improves after 16 hours of uptime, and a task-killer.
Rom:CM 5.0.2 -OC Kernel
wesbalmer said:
Then please inform us of a thread that can verify what you all are saying. Not in an argumentative tone, my linpack score drastically improves after 16 hours of uptime, and a task-killer.
Rom:CM 5.0.2 -OC Kernel
Click to expand...
Click to collapse
This has basically been discussed into the ground. In my eye's, its a fight vs what I like to call "Windows XP mentality", and that there was benefit on phones like the G1. With the copious amounts of memory on the N1 and droid, they cause way more harm, and immeasurable good (if any).
Summary thread: http://forum.xda-developers.com/showthread.php?t=627836
I've linked to quotes from others.
Threads/posts of interest: http://forum.xda-developers.com/showthread.php?p=5494890#post5494890
And: http://forum.xda-developers.com/showthread.php?p=5298630#post5298630
Well, this discussion is very interesting, but lets return to our problem with non-working alarm.
I have picked up lots of bits of information about how to maximize space issues and maximize battery life for those of us who are in love with these amazing new NAND builds....especially those of us with European HD2 phones who only have 512MB to play with
I have compiled them below for ease of reference - I claim no originiality for these ideas...I am just bringing them together...so MAJOR THANKS TO ALL THOSE OUT THERE! You know who you are...
I have already posted this on the DFT thread as I love that particular build, but they should (might!) work for other builds and I post it here for further reference as it took me a long time to sift through the threads to find it all.
Space
1. Before flashing your phone, using DFT Stock Desire, for example, you can edit the flash.cfg file and change the following line:
cache ya 40M >>to>> cache ya 15M
This reduces the cache by 25M with no discernible impact on the speed of the build (imo).
This should give you in excess of 130MB free after a clean flash on that particular ROM. Expect that to drop to around 100MB once Market, Flash and a couple of other apps update themselves.
Some NAND ROMs will not even have this as an option, and others may look a little different. You can read about how the flash.cfg file is structured here.
2. Immediate install Z4 to root your device. You will need to get it from here. (Note: it may get stuck on 'Rebooting'. Wait a minute or so and then manually reboot - it will work fine and SuperUser will now work after the reboot)
Put it on your SD card and then install a file manager from the Market to browse to it and then install and run. Follow the details on the thread...
3. Install Move2SD. You can get it from the Market. Full details are here.
This allows you to move most (not quite all) apps to SD. It is the best option I have found to move most of those awkward apps.
I have now installed pretty much all of my apps that I used to run on non-NAND builds and have moved about 90%+ of them to the SD card. At time of writing I have loads of apps installed and still have over 70MB free
Battery
1. Install Battery Monitor Widget or Current Widget from the Market so that you have a way of tracking your current usage.
2. Install Set CPU - free for XDA members from here, but also available on the Market.
After setting your Main Screen to 'OnDemand' and 'Set on Boot', assign SetCPU a couple of profiles. I tend to use:
>> Screen Off: Max/Min 245000, Scaling 'OnDemand', Priority 50%
>> Battery <25% Max 384000/Min 245000, Scaling 'OnDemand', Priority 50%
You can play to your hearts content here, but these give me consistently 7ma in Standby.
Also, you can reduced the sampling rate to 20000 and 'Set on Boot' in Advanced if you like.
3. Avoid power hungry background stuff like animated wallpapers and turn off GPS, Wireless etc. There are LOADS of apps out there that can do this automatically for you free from the market, but I have found that making sure my GPS is off (I have a widget to show me) plus SetCPU is plenty. It may work for you though.
4. Some have reported that Darkstone's suggestion makes a major difference to their power consumption:
"To fix high power drain / usage in standby (60mA or 70mA) disable 'Use wireless networks' in Settings>Location menu. You will now get 7mA or less constantly. I discovered this as the main culprit last night. Also works in other builds."
Anyway, there you go - a few consolidated thoughts - happy NANDing!
How to root Gauner HD V0.3 ? root not the same /system/...
Thank you !
dungphp said:
How to root Gauner HD V0.3 ? root not the same /system/...
Thank you !
Click to expand...
Click to collapse
Not sure I'm afraid...have you tried it? I tried it and Z4 got stuck on the 'Rebooting' screen, but when I manually reboot it had solved it...
dungphp said:
How to root Gauner HD V0.3 ? root not the same /system/...
Thank you !
Click to expand...
Click to collapse
isn't that the v0.3 itself already been rooted at the first place?
I installed Root Explorer and gotten root access immediately...
But can't check permission some folder to change themem or something !
When you do this
"To fix high power drain / usage in standby (60mA or 70mA) disable 'Use wireless
networks' in Settings>Location menu. You will now get 7mA or less constantly. I discovered this as the main culprit last night. Also works in other builds."
Click to expand...
Click to collapse
You will loose weather on main screen. It will say "To see local weather tap here"
SetCPU doesnt work on Nand ROM..Is there any similiar program like SetCPU for Nand ROM ?
well guys i really dont understand why everybody you complaining about nand build
well my nand build is nexus one and i get 2-3ma battery drain in standby
olso the spuset in on 1190smartass
i dont want to be a smartass guy, but please ram and rom is different
ram = random access memory
rom = read only memory
when i look at the thread title of couse i think about ram, not rom... and too much thread title have that 2 things mixed in and im sure that will make alot of people (including me) confused
btw i thank you for the info
Clubeer said:
SetCPU doesnt work on Nand ROM..Is there any similiar program like SetCPU for Nand ROM ?
Click to expand...
Click to collapse
It does for me Are you rooted?
aboveluna said:
i dont want to be a smartass guy, but please ram and rom is different
ram = random access memory
rom = read only memory
when i look at the thread title of couse i think about ram, not rom... and too much thread title have that 2 things mixed in and im sure that will make alot of people (including me) confused
btw i thank you for the info
Click to expand...
Click to collapse
You're quite right - too much 'New Year cheer' the day before I started the OP
Have changed it as you correctly point out - thanks.
Greetings! I've read all about not using task killers and refrained myself from using one. But now i'm a bit confused with the efficiency of android RAM management. I simply can't use my Nexus S smoothly beyond 100 hrs of uptime. after which the 'running' tab usually shows >200mb ram used with roughly 50mb of free.
I understand the used RAM was supposed to keep the previously opened apps in cache for faster subsequent execution time. But thats not what going on under the hood, i suppose, after 3/4 days of uptime. When i view 'show cached process' from the 'running' tab, it barely lists the default launcher and 1/2 other apps whereas this menu usually shows more that 10 apps being cached after a fresh boot.
The horrible thing that starts to happen then, most of the apps start exiting as soon as i touch the back button. Nothing except the foreground app stays in the RAM and everything else get dumped out of it and reloads at next launch.
Whats keeping the RAM then, if there's no space for app caching after merely 100hrs of uptime?
I'm not sure but the whole thing has led me believe my system has a major memory leak somewhere. Or, as i've read that the Nexus S actually have quite a bit lees than stated 512mb ram available for user apps… but should i expect this to be normal behaviour? Then why google released this model with inadequate amount of ram in the first place? I'm rebooting my phone every other night to keep it smooth!
Please shed some light, feeling totally lost. I'm moderately heavy user and come from symbian background.
PS: my phone is factory installed stock 2.3.4 with default launcher and widgets since i purchased if 2 mnths ago. no root done yet.
The cached app list in normal Android settings is inaccurate. Try apps like SystemPanel Lite.
Android does take care of RAM usage perfectly usually. Are you saying that your phone gets slower over time? That is quiet impossible unless you got a faulty installation of Android.
Also the "back" button does mean "exit and don't cache" for some/many apps.
Actually I agree my phone gets slow after time. I have to reset then after that it flys aagain
Sent from my Nexus S using XDA App
I noticed this problem as well, and i had read about it before, there are more people noticing it.
Maybe it happens only when you have too much stuff installed and running, if you are not a power user you might not notice it.
I think the android memory management is lacking here and the launcher app should be more robust, but the issue could also be solved if we had more memory.
I have 200+ apps installed in my nexus, some of them have services that run in the background automatically (and some of them didn't even have to, like some games and apps) and this uses memory.
I have around 15 or 20 apps always running as services, this uses 150mb+ memory. If i close any of these they will just start again in a few seconds automatically. The only way to stop this (my ns is not rooted) is if i uninstall them.
So, after a while, the most noticeable effect is that the launcher gets more sluggish and lagging. if i force close all apps it's smooth again, but only for a while. Also after i run a heavier app (like a game) and close it the launcher will restart/reload.
The workaround i found is to uninstall some of the apps/games that run as services until things get smoother again, but i don't want to give up most of them so i have to put up with a bit of sluggishness.
rentaric said:
The cached app list in normal Android settings is inaccurate. Try apps like SystemPanel Lite.
Android does take care of RAM usage perfectly usually. Are you saying that your phone gets slower over time? That is quiet impossible unless you got a faulty installation of Android.
Also the "back" button does mean "exit and don't cache" for some/many apps.
Click to expand...
Click to collapse
Yeah.... my phone gets slow over time, kind of. Let me explain it...
after a fresh boot, i can browse, email, check facebook, make calls, send sms and then come back to browser to find my last loaded page still there. but after 2/3 days of up time, whenever i leave a foreground app and go somewhere else, it gets killed. the worst case i faced was, from the google search app, after inputting my query, it had to close itself before opening the browser to perform the search. it gets that bad.
during these times i usually face a slight delay and jittery animation while opening each app. and the cached processes usually shows only the launcher occupying ~30mb of space and 1 or 2 other very small apps. it appears, because of lack of RAM the system also stops caching the usual number of processes.
i've also thought that my installation could be faulty. i'm using it purely stock for the first few months to get the hang of the way android works. what bothers me, without even rooting it, how can can it get faulty. i even did a factory reset after taking it out of the box.
I'll monitor the situation with the SystemPanel Lite and report back. Thanks for the reply.
temp9300 said:
I noticed this problem as well, and i had read about it before, there are more people noticing it.
Maybe it happens only when you have too much stuff installed and running, if you are not a power user you might not notice it.
I think the android memory management is lacking here and the launcher app should be more robust, but the issue could also be solved if we had more memory.
I have 200+ apps installed in my nexus, some of them have services that run in the background automatically (and some of them didn't even have to, like some games and apps) and this uses memory.
I have around 15 or 20 apps always running as services, this uses 150mb+ memory. If i close any of these they will just start again in a few seconds automatically. The only way to stop this (my ns is not rooted) is if i uninstall them.
So, after a while, the most noticeable effect is that the launcher gets more sluggish and lagging. if i force close all apps it's smooth again, but only for a while. Also after i run a heavier app (like a game) and close it the launcher will restart/reload.
The workaround i found is to uninstall some of the apps/games that run as services until things get smoother again, but i don't want to give up most of them so i have to put up with a bit of sluggishness.
Click to expand...
Click to collapse
This sounds exactly like what i'm facing. thanks for the input. I've also lost my launcher once after exiting the browser with several tabs open.. had to click the home button and then launcher again to get icons back on it. This usually doesn't happen after first 10-15 hrs but after several days of uptime.
I respect the way android tries to manage RAM automatically even by re-spawning the apps if it thinks they needed to be kept cached even after a force close from default task manager. With this kind of supreme automatic power comes huge responsibility of managing it well. It should count for every bits of data (concurrent garbage collection system?). But somehow it appears the ram management system is failing to count some of it and letting parts of the RAM go un accounted for.
I have like 30 apps installed from market with roughly 5 of them having active background process running. And I believe and hope this shouldn't be enough to take the android RAM management system down only after a few days of uptime.
Thanks again for the reply.
I'm going to try "auto memory manager" i read about in other thread as a way of forcing a minimum amount of free ram a bit higher than standard Android does.
It's one more service using memory but if does what is supposed to, maybe at least the launcher will stay more responsive.
The mild setting is too close to default so i have created a custom that looks roughly between mild and agressive.
I'll report back later.
the phone gets horribly slow when the RAM drops to below 50 Mb free
in which point i always have to use task killer to kill them all, and it's fast again until it again reaches less than 50 Mb RAM
another thing i noticed is that with very heavy high quality pictures/icons loaded to customize the launcher it will slow down the performance
instead if the whole launcher theme is less than 2 Mb or less then the phone also works very fast.
AllGamer said:
the phone gets horribly slow when the RAM drops to below 50 Mb free
in which point i always have to use task killer to kill them all, and it's fast again until it again reaches less than 50 Mb RAM
another thing i noticed is that with very heavy high quality pictures/icons loaded to customize the launcher it will slow down the performance
instead if the whole launcher theme is less than 2 Mb or less then the phone also works very fast.
Click to expand...
Click to collapse
...and its unfortunate that i'm hitting the 50mb free RAM barrier with the stock launcher in only 3/4 days of uptime, regularly. why does the default app kill option let the memory go below 50mb then, if this can potentially hamper performance? and i'm not talking about any android phone here, but google's own Nexus flagship.
i remember reading a blog post by an android engineer explaining the merits of memory management by the OS and how task killers only worsen the situation. could they possibly optimize the OS ram management for light to moderate use and expected the heavy users to root and manage it on their own by tinkering the free mem settings? what else could explain the situation?
i wonder how things are with other skinned androids with similar hardware configuration if a Nexus is having tough time behaving well even with its trimmed software package. and i consider myself as only a moderately heavy user.
the memory cleanup isn't perfect in Android.
As much as everyone likes to say that Google tells you not to use task killers or any thing and that Android can take care of itself, every nice ROM out there plays with the minfree settings.
Fact is Android isn't perfect.
I know this from a 256MB device. We set it to it could boot with 30mb free. You could do maps and stuff, but a day later Maps would crash left and right because you ran out of memory. Even if it said 30mb free still in About phone.
The same with the Nexus S. Stock settings allow little free memory. I saw this in CM7. It gets slow after a day. A reboot fixes it all.
I suggest tweaking the minfree values or something so you can get decent performance. Fact is that performance will drop off a bit with up time, but at least if you tweak your minfree settings it should last a LONG time without needing to reboot.
this works great after patched my phone never gets slow
http://forum.xda-developers.com/showthread.php?t=1111145
just an FYI if you try it dont use the CWM version doesn't work on NS for some reason at least it didn't for me
just manually move with root-explorer and set perm to 777 and enjoy
edit
OP not rooted this requires root
dmo580 said:
the memory cleanup isn't perfect in Android.
As much as everyone likes to say that Google tells you not to use task killers or any thing and that Android can take care of itself, every nice ROM out there plays with the minfree settings.
Fact is Android isn't perfect.
I know this from a 256MB device. We set it to it could boot with 30mb free. You could do maps and stuff, but a day later Maps would crash left and right because you ran out of memory. Even if it said 30mb free still in About phone.
The same with the Nexus S. Stock settings allow little free memory. I saw this in CM7. It gets slow after a day. A reboot fixes it all.
I suggest tweaking the minfree values or something so you can get decent performance. Fact is that performance will drop off a bit with up time, but at least if you tweak your minfree settings it should last a LONG time without needing to reboot.
Click to expand...
Click to collapse
thanks for the informative reply. i've started to get the point about the situation. maybe a little more RAM would've delayed this kind of clogging but at its current state our little green robot simply isn't mature enough to carry the load we're putting on its shoulder. it that case i would accuse google of spreading the word that manual intervention isn't necessary. thats simply misleading. they way they've programmed the stock rom appears to be optimum for light use only.
anyway, i guess re-adjusting the minfree values require root, right? i should better start reading up on rooting then.
demo23019 said:
this works great after patched my phone never gets slow
http://forum.xda-developers.com/showthread.php?t=1111145
just an FYI if you try it dont use the CWM version doesn't work on NS for some reason at least it didn't for me
just manually move with root-explorer and set perm to 777 and enjoy
edit
OP not rooted this requires root
Click to expand...
Click to collapse
i'm thinking of learning about rooting now. i like android for everything else it does and this particular device got me hooked with its unusual and clean look, and i don't wanna give up on it easily. but i think i'll have to gather up a lot of knowledge from this forum pages before i can attempt something like you've described.
thanks a lot for the solution anyway. i'll try it as soon as i feel comfortable with my understanding of android internals.
its not really that complicated just a script file you put into /system/etc/init.d with Root Explorer and set full permissions with root explorer and reboot and it starts working and if you dont like or dont want to sue anymore you simply delete the file.
but yea get rooted definitely worth it and you will gain more knowledge
temp9300 said:
I'm going to try "auto memory manager" i read about in other thread as a way of forcing a minimum amount of free ram a bit higher than standard Android does.....
I'll report back later.
Click to expand...
Click to collapse
well, things didn't exactly as i had planned, the test with memory optimizer was going ok but i only did for a day.
After that, i managed to sell my Nexus and went for an SGS2!
So far no lag/sluggishness issues and i have installed most of what i had in the NexusS, this phone has 2 important advantages, it has double the ram (so it should take longer to fill) and also it's faster which might compensate.
demo23019 said:
this works great after patched my phone never gets slow
http://forum.xda-developers.com/showthread.php?t=1111145
Click to expand...
Click to collapse
Dun use the script if you're running netarxhy, mathkid95;16006240 or trinity kernel. It will just made you worst. Oh yea, and also dun use it on Brainmaster miui rom
Sent from my Google Nexus S using XDA Premium App
window7 said:
Dun use the script if you're running netarxhy, mathkid95;16006240 or trinity kernel. It will just made you worst. Oh yea, and also dun use it on Brainmaster miui rom
Sent from my Google Nexus S using XDA Premium App
Click to expand...
Click to collapse
really?? but simms22 use auto memory manager too.. so i think we can still use the script with trinity kernel
king23adrianc said:
really?? but simms22 use auto memory manager too.. so i think we can still use the script with trinity kernel
Click to expand...
Click to collapse
auto memory manager and the script are two different things. honestly, i havent tried the script because auto memory manager works for me. ive been setting it higher than the aggressive setting lately btw...
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
As a developer I've had to deal a lot with Android's memory management. Simply put, Google is correct in saying that Task Killers do more harm than good. Android is pretty smart about clearing memory.
However, a lot of apps and even some basic framework level calls cause memory leaks, which the garbage collector can't clean. So the only solution is a device reboot.
window7 said:
Dun use the script if you're running netarxhy, mathkid95;16006240 or trinity kernel. It will just made you worst. Oh yea, and also dun use it on Brainmaster miui rom
Sent from my Google Nexus S using XDA Premium App
Click to expand...
Click to collapse
I use matrix, and worked fine on netarchy when i was testing.
and Brainmaster MIUI ROM already has script so yea dont need with his ROM also he provides trinty kernels on his ROM page so if trinity had issues with ram script i dont think he would be providing download links to use with his ROM
As this topic already on debate, whether removing bloatware improves performance(by making RAM free) OR does it improves battery ?
Here look to screenshot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
So looking to this, i can say it doesn't affect at all.
As i have pure stock ROM with Stock kernel (Cf Root), and after 11 hr of use and 28% of total battery drain, there is not even recordable battery use noted. So seems if it remains there or does it remove there is no difference on battery
Regarding RAM, as we know there is LMK (Low memory killing) mechanism of android system, android itself keeping recently opened application in background to get quicker access to them, if we remove bloatware then it will be replaced by another applications which we have used recently till android system feels RAM is full.
So in short removing bloatware have cosmetic effect and keeps your device clean from appearing in drawer but not positive effect on RAM/battery.
wow.. another great stuff after mythbusting build.prop tweaks...
.. thanks for the post,
Doctor. Cant we have thread on various myth busters. Like for build.props, kernel cleaning script,etc. shared on xda.
For build.props I had shared a web link on xda by Jeff Mixon,which can be useful.
Sent from my GT-N7000 using xda app-developers app
I disagree on some points you made as facts.
I have been removing bloatwares including system apps, mainly from the manufacturer, for as long as I have learned how to root my phones. I learned how to do it in the hard way and from time to time I soft bricked my phone which I recover by re-flashing the Stock Rom again. By no means I'm encouraging anyone to opitimise their phones by start removing apps. However, in my experience I have had increased my RAM size by comparing how much free RAM was available before and after each optimisation right after a bootup. Also in my experience my phone is much smoother after I'm done with my optimisation process. Battery life also depends on what kind of apps are removed so it can have a little to noticeable improvement too.
Here are some technical explanations. Any apps that start up after boot completion event is triggered would decrease the RAM and they would most likely stay resident in the memory to do some kind of background process, example of such app is Google Play. Another example would be the screenshot service which must be running all the time for the time user gestures for a screenshot.
There are also apps that are launched when an event happens and not necessary the user intend to use them all. This would slow down the phone if few apps were registered for the same events, I have seen cases where apps wrongly registered with events that they don't depend on. Example; Media related commands such Volume UP/Down or headphone plug in/out. I have removed both Google's Music App and Samsung's so there are two apps less respond and RAM is consumed less when I launch my favourite Music app. Obviously the background launch of apps have some impact on the battery too and it would be obvious when the device constantly is being used, not occasionally.
I have already increased the availability of RAM right after bootup by over 50MB on my Note and close to 100MB on Motorola Atrix. Atrix runs on GB and without the optimisation it is very lagy to the point I cannot use it. On GNote the difference is way lower but still noticeable after the optimisation.
Basically, to say there is absolutely no changes in battery and performance is wrong because there are many other factors need to be considered. Thank you.
CSharpHeaven said:
Basically, to say there is absolutely no changes in battery and performance is wrong because there are many other factors need to be considered. Thank you.
Click to expand...
Click to collapse
I agree with this. If I were to run a bloated stock Rom, I could produce several vastly different usage scenarios that would respectively
- not have negative impact on the battery
- have higher impact compared with the same usage on a debloated custom Rom, and
- have severe impact compared with etc.
In other words, if you tread very cautiously and are careful not burden your bloat too much it will be just as fine as any custom Rom. But if you are going to lean heavily on your bloat with WiFi, syncing, location on and at the same time playing online games, I'll bet you anything that it would drain battery much faster than a debloated custom Rom on the same scenario.
@CSharpHeaven
If you get my point, you can understand, removing bloatware freeup memory on booting surely, but as soon as you start playing with device, last used appl will be filled to background till RAM gets full. So effect is some what temporary. other thing if appli remain in backgroung it takes less time to re open(thats why android keep it in BG), and this way it increase performance.
dr.ketan said:
removing bloatware freeup memory on booting surely, but as soon as you start playing with device, last used appl will be filled to background till RAM gets full.
Click to expand...
Click to collapse
Yes, but at least I'll have stuff I actually need running in the background, and not Yahoo Finance, Samsung Account and similar.
Though it may just be some placebo effect but removing bloatwares on your phone (samsung accounts, kies apps) does have some effect on the battery and on the overall performance of the phone.
Bloatwares that you don't necessarily need gives the RAM back to your phone and not only that.. it makes your AppDrawer clean for all the necessary apps that you really really need to be on your phone.
I prefer apps that I particularly need to use and not apps that just stays there but does not have any use at all (on my day to day needs).
chasmodo said:
Yes, but at least I'll have stuff I actually need running in the background, and not Yahoo Finance, Samsung Account and similar.
Click to expand...
Click to collapse
But how long it remains there? it will just disappear when you start playing with device isn't?
Basically my aim is to explain - Removing bloatware doesn't make that difference if you are expecting so much, you might be aware of that many user just root their device to get rid of bloat for hoping their device will shootup like bullet and battery will last for days and days
thats not real.
dr.ketan said:
you must be aware of that many user just root their device to get rid of bloat for hoping their device will shootup like bullet and battery will last for days and days
Click to expand...
Click to collapse
I can't quantify the exact number of users running rooted stock compared to those who rooted to be able to flash custom Roms.
However, if the poll in 'What Rom are you using' thread is anything to go by, there's much more users on custom Roms than
on rooted Stock - check it.
Besides, compelling reasons for rooting your phone are not just bloat removal, but also
- ability to do backups/restores
- ability to flash other Roms
- ability to theme your Roms
- ability to customize Roms in many other ways
- ability to flash kernels that are faster and optimized to be more battery friendly, not to mention SAFER
And finally, to get back to the topic, to get rid of Samsung/carrier crapware and make your phone more responsive and battery efficient.
i became aware of removing apps ( the first target is what we define as bloatware) to free up space in system, so as I could install other apps which i wanted, sometimes for successful rooting purposes, newer mods etc
i never looked towards improvement in battery and performance, did not notice anything in normal usage...
the OP is very convincing
I have removed some 200+ MBs of apps from system including software update, Sam apps etc and there is hardly any increase in free ram, so I dont think removing so called bloatware increases ram.
But yes removing apps like soft update and sam apps which run consistantly in background helps to some extent in battery point of view.
I agree free ram will be occupied by other apps but lot of apps dont run in backgroung they just cache the ram and doesnt impact anything. For example once i saw s pen in cached process using 80 MB of ram but it was not actually running. I dont think such apps use battery or processor in background.
Its still a topic of debate and I think will remain same
Just my 2 cents
Sent from my GT-N7000
I'm not sure about not affecting memory... To be correct on this, need to look on all bloatware cached processes - sometimes there are too much. But, what concerns me more - is the process priority. I'm not sure, but those of /system, both apps & services, seems to get the higher priority, than /data apps. And in case of stock Sammy rom, it's obvious, that their crap will stay in memory forever.
@chasmodo
I think I cudn't explain you properly. I am not saying ppl rooting for removing bloatware only
I want to say my msg to those ' who are rooting only for removing bloatware'
Though these ppl are very few, but I just want to convinced only removing bloatware can't help you much.
Sent from my GT-N7000 using xda premium
@dr.ketan
In Android world applications register with events to be notified with both user and system actions such as GPS, Media Storage, Bluetooth, Wifi, App modifications (install & uninstall) , and so many other events. Also there are many apps that stay awake for some kind of background processing.
You are right to assume Android would kill any apps that is not being used and eventually reclaim the resources. What you have to bear in mind this cleaning process itself also consumes battery and CPU cycles. The smaller the list is, the shorter the CPU cycle would be. Furthermore, installing apps that hardly being used keep Android GC (Garbage Collection) busy because many of these apps coming alive (launching) when one of the events they registered with is fired.
After the first year with Android I learned to install only apps that I have daily use or use them very regularly. This is beyond me why people install over 100 apps on their phones.
By the way, launching apps in background for faster launch is fundamentally against app design for portable devices where resources such as battery is limited. In Android dalvik-cache takes care of lanching apps "quicker".
Everyone talks about the incredible battery life on the OP3T. I had some good battery life in the first couple weeks of having the phone, then it seemed like it had gotten worse around the time I installed 3.5.4, then continued when OOS4 hit. Friends of mine with the OP3T however, didn't have the same problem. I was essentially having constant drain to the point where my phone, whether the screen was on or off, dozing or not, would drain approx 2% per hour at baseline. Far worse than it should. Even more frustrating, the standard android battery page in settings showed me that my phone was being used most by Android System and Android OS (not even play services!). Here are some screenshots of my battery life and some stats:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Being the standard XDA user, I decided to figure out what the hell was going on with my phone, so I installed the usual apps. My go to battery stat apps are: wakelock detector, betterbatterystats and gsam battery. These apps are fantastic for determining what is killing your battery, usually in the form of wakelocks. There is an incredibly helpful guide to understanding wakelocks here. These apps in my past experience had all required root to my knowledge, but I gave them a shot anyways. Since I am on stock OOS 4.0.1 without root or TWRP, I found that I was able to grant the necessary permissions by using adb commands to grant battery stats to each app despite not being rooted.
Code:
adb -d shell pm grant com.gsamlabs.bbm android.permission.BATTERY_STATS
adb shell pm grant com.uzumapps.wakelockdetector.noroot android.permission.BATTERY_STATS
adb shell pm grant com.asksven.betterbatterystats android.permission.BATTERY_STATS
I then spent about a week obsessing over my battery life and literally checked these apps, especially GSam's "Rate of Change" (always showed AT LEAST 2-5% drop per hour, at MINIMUM) and "Other" graphs to try to figure out if my phone was sleeping properly, etc when I changed settings. Android OS and kernel were both at the top of the multiple lists of apps using data in GSam and BBS, but when I would click on each process, it wouldn't actually tell me what was driving their high utilization. I looked through these two processes and noticed for example that NLP was high so I disabled location on all apps except google now. I even disabled location services completely (with no subsequent change in battery life). What was frustrating to me, though, was that my battery wasn't draining due to wakelocks. The wakelocks I had were appropriate. Google now set off thousands of alarms (*alarm*), but this didn't seem to be the reason for my battery drain. I also changed pretty much any setting with anything to do with battery life, hoping that it would fix my issue, ie disabling pocket mode, disabling ambient display, disabling google backup, setting my exchange email account to poll every 60 mins instead of push email, removing extra apps, uninstalling screen filter apps (ie lux dash, twilight), using greenify, turning on aggressive doze mode, etc. Ultimately, I performed a factory reset because I thought maybe the upgrades from 3.5.3 to 4.0.1 caused some trouble. I only installed the essential apps I would use every day, but soon after realized that my battery life was unchanged after the reset.
Then yesterday, I came across something about apps utilizing more CPU time, etc. GSam and these apps list the stats for CPU time by app, but my interest was piqued. I opened GSam and looked at the CPU usage graph and realized that my CPU was constantly being utilized and wasn't coming down to 307 mhz very often. I installed a couple random CPU apps from the play store but nothing gave me the information I was looking for. They just confirmed what I noticed in GSam, that my CPU was never really off. Next, I figured hey, I do it on Windows, why don't I try to use ADB to look at my CPU usage real time by app/process. A quick google search and some futzing around and I was in business with the following ADB command (NB: hit ctrl+c to exit out of the loop):
Code:
adb shell top -m 20 -d 2
This command brought up the top 20 processes using my CPU and would refresh every 2-3 seconds as long as the command was still running. When I would shut my phone off and let it "idle", I found the two unsuspected culprit applications that were CONSISTENTLY eating up 2% and 1% of my CPU: textra(see 4/30 update below) and swiftkey. I uninstalled textra and switched to google messenger. I tried switching my default keyboard to google keyboard, but had the same issue, so ultimately had to disable swiftkey (can't uninstall it without root as it's a system app). After that, I was in business. My phone went from 2+% drain per hour while idle/dozing to 0.7%/hr (according to gsam). Overnight, I only lost 2% battery over 5 hours while I was sleeping. This used to be at least 6-7% before. I'm almost at 24 hours since discovering this, and my battery life is MUCH better even with heavy use.
Thanks for reading, hopefully this is helpful to others in tracking down some rogue or crazy app that is driving you crazy. Cheers!
Edit 1/12, full day 2: battery life went crappy on me again. Looks like inbox was the culprit this time, consistently in the top 3-5 processes. Wiping data seems to have fixed it for now (not sure what changed, wiped cache first and closed out of inbox properly prior to wiping data).
Edit 4/14: gboard keyboard began doing the same thing for me last month that swiftkey used to do. Went back to swiftkey and seems the issue is resolved and swiftkey no longer drains better like crazy.
Update 4/30
nhshah7 said:
So 4/30 update on my battery life. I thought swiftkey was fine for a couple weeks especially since I had syncing off (I thought this was possibly the culprit but I was wrong), but then last week I checked again and swiftkey was running near the top of my list of processes (again) and my battery life was starting to suck again. I disabled swiftkey and reverted back to the stock google keyboard apk (NOT gboard) for a while with an improvement in my battery life. I wanted the gif feature and the backspace/delete feature back so I updated to the most recent gboard and my CPU usage jumps from 3-5% according to GSam to 8-9%. I run the top command again and lo and behold, it's at the top of the list again (see image below).
View attachment 4133744
I then uninstalled gboard updates (app info --> gboard --> menu --> uninstall updates) and reinstalled version 6.2.18.151907649 and I THINK that this version doesn't kill the CPU (not in the top 20 while idle at least). Didn't try any other versions though. If you do this, be sure to disable auto-updates from the play store for gboard!!
Also, I'm curious why no one has reported on this being a major issue. Is this just a bug on oxygen OS, android 7, swiftkey or gboard? Does this happen on all phones? If it's just on oxygen OS, oneplus has some work to do!
Just some investigation on the side, I powered up my trusty oneplus one which was running slim6 and ran the top command. It's syncing a bunch since I haven't turned it on in a few weeks but I don't see swiftkey (updated to the latest app version) in the top 20 at all! And on top of that, textra was nowhere to be found on the list either (granted there's no SIM in the phone)! NB: just for fun, I reinstalled textra lol and it didn't show up in my top 20 list. hopefully it stays this way!
I've been stock unrooted for a while now, but if this crap keeps up, I may have to root so I can try a different kernel or disable permissions for apps to wake the phone up grrr.
Click to expand...
Click to collapse
Update 5/24:
Googlequicksearchbox alarms were driving me nuts, with thousands of alarms resulting in HOURS of kernel wakelocks. I realized this had only been going on since I upgraded to OOS 4.1.3. My work-around was initially to disable the google now feed but apparently removing the google now widget from the home screen (regardless of whether on nova, OP launcher or google now launcher) stops the alarms and significantly improves battery life. Wow.
Nice! So generally it would better to find out what is constantly using the CPU on a case-to-case basis, but going from your final results: SwiftKey and Textra were the culprits. I was reading the other thread about SoT and people were getting over 6+ hours and I was getting only.. 3-4 at most? I've had the same issue as you where the battery was draining and I could not really find the source (general suspicions such as G Services didn't really contribute).
Thanks for letting us all know! I'm running OOS 4.0.1 (fully stock, unrooted) and I've just uninstalled/disabled SwiftKey (didn't realise it came stock). Will see how it is in a few days..
dhuynh94 said:
Nice! So generally it would better to find out what is constantly using the CPU on a case-to-case basis, but going from your final results: SwiftKey and Textra were the culprits. I was reading the other thread about SoT and people were getting over 6+ hours and I was getting only.. 3-4 at most? I've had the same issue as you where the battery was draining and I could not really find the source (general suspicions such as G Services didn't really contribute).
Thanks for letting us all know! I'm running OOS 4.0.1 (fully stock, unrooted) and I've just uninstalled/disabled SwiftKey (didn't realise it came stock). Will see how it is in a few days..
Click to expand...
Click to collapse
Yup, I was getting 3-4 as well before I fixed this.
Sent from my ONEPLUS A3000 using Tapatalk
I was trying this out because I am in the same boat. The command is wrong though, it doesn't take an option "-s".
I am kind of stuck at this point, the entries keep on jumping all over the place and the package names are being cut off (I see com.google.android.g and have no clue what's coming after the g)
Jerry911 said:
I was trying this out because I am in the same boat. The command is wrong though, it doesn't take an option "-s".
I am kind of stuck at this point, the entries keep on jumping all over the place and the package names are being cut off (I see com.google.android.g and have no clue what's coming after the g)
Click to expand...
Click to collapse
the -s command worked for me. See attachment. Though I think it may sort by CPU activity by default anyways. Not sure why it's cut off for you but it could be gms or gms persistent (don't think that's anything to worry about). Try to leave your phone with the screen off and idling for a while to see if you notice any patterns if you haven't already.
Nice find. Really useful to the community. I had swiftkey disabled day 1 because did not like the layout. Battery is doing ok. But how do I go about uninstalling swiftkey entirely?
supersomething said:
Nice find. Really useful to the community. I had swiftkey disabled day 1 because did not like the layout. Battery is doing ok. But how do I go about uninstalling swiftkey entirely?
Click to expand...
Click to collapse
Unfortunately you can't if you are not rooted. Just disabling it is fine though. I'll clarify that in my post, I think I wrote it out wrong initially.
Man I'm a huge textra user and I really love their app, maybe we should let them know about this so that they can improve their app ?
i just finish uninstalling my swftkey...will share results soon
Well I also use Textra and my OP3T has no battery drain issues, but nonetheless thanks for sharing. I get about 6-8 hours of SOT regularly with both Oxygen OS 3.5.3. and Oxygen OS 4.0.1., so I guess its depends case by case. Swiftkey is uninstalled through Titanium Backup, since I use Gboard.
The 2 apps that used the most CPU on my phone were Genius and OnePlus Launcher. I removed genius and installed nova launcher. Battery is much better now
Thanks a lot for this! I have had mediocre battery life on OOS 3.5.3, then very good battery life on OOS 3.5.4, but unfortunately again mediocre battery life on OOS 4.0 and 4.01.
The difference in BetterBatteryStats was that awake time fraction was around 15-20% for mediocre battery life and well less than 10% for good battery life. I was not able to really find the culprit with BetterBatteryStats, but deactivated SwiftKey half an hour ago and it seems I am back to good battery life with less than 10% awake fraction. I think your method might be an extremely useful way to identify problematic apps.
By the way, another problem that appeared with the update to OOS 4.0 was that K-9 mail stopped synchronizing push messages and at the same time produced much increased wakelocks. What helped here (although it seems counterintuitive) was to switch on the "strict power management" feature in the battry settings and exclude K-9 mail from being optimized.
jemeljsh said:
Well I also use Textra and my OP3T has no battery drain issues, but nonetheless thanks for sharing. I get about 6-8 hours of SOT regularly with both Oxygen OS 3.5.3. and Oxygen OS 4.0.1., so I guess its depends case by case. Swiftkey is uninstalled through Titanium Backup, since I use Gboard.
Click to expand...
Click to collapse
Interesting. I'm curious to see if it's using up as much CPU on your phone as it did on mine.
holy moly, I am a big fan of swiftkey from day1 and I have good battery life but not like the poeple here... I hope swiftkey will fix it soon. Maybe I can try to switching it to agressive doze so it will kill swiftkey process? Actually should it be killed anyhow if we are not using it?
90 minutes after disabling SwiftKey I can definitely confirm that battery life has improved a lot!
nhshah7 said:
the -s command worked for me. See attachment. Though I think it may sort by CPU activity by default anyways. Not sure why it's cut off for you but it could be gms or gms persistent (don't think that's anything to worry about). Try to leave your phone with the screen off and idling for a while to see if you notice any patterns if you haven't already.
Click to expand...
Click to collapse
For me it's com.google.android.gm (corresponding to gmail I believe) it could be the same for him. I'll try to hibernate both swiftkey and gmail with Greenify
Thanks for the tips !
I ran the command and it gave me error that it cant open proc/stat
"Cannot open /proc/stat"
Given that the OP has identified Swiftkey as a decent battery drainer (I am going to try this simply to see if I can squeeze any more battery out of what I feel is an already impressive performance), is there any keyboard anyone would recommend? Swype?
one from google is not that bad actually, they improved
terragady said:
one from google is not that bad actually, they improved
Click to expand...
Click to collapse
Started to use it but it doesn't show the word you're typing, using swipe, in certain apps such as, ironically, Google browser. Any other suggestions from the forum