[GUIDE][Kernel] Comprehensive Guide to Kernels. [UPDATE:21.12.16] - Android General
If I answer the question of "what is a kernel" it wouldn't tell you much, besides there are enough other threads on XDA and other websites to answer this question.
The best question is "Why to use a custom Kernel?", which answers not only what it is, but also what it can do.
I like the way its explained here:
http://www.makeuseof.com/tag/consider-using-custom-android-kernel/
The next most important thing you need besides the custom kernel is an app to manage it.
Yes, you can change the code directly, but for most non-nerds an app tends to be best, providing a nice GUI to facilitate tuning.
And since I am aiming for this guide to be N00b proof, I am gonna provide as much information as possible.
There aren't many apps which give you control over all features of the kernel and, personally, I hate having to download multiple apps to control every feature of the kernel.
So these are my top 3 recommendations:
The original app from the kernel's dev. You know, the one made specifically for use with that Kernel?
Device Control [root] by Alexander Martinz (Not gonna explain why, just go and test it for yourself or at least look at the play store page)
Kernel Adiutor by Willi Ye (It has a nice material GUI, + Extra features such as tweaking low memory killer, sysctl & sysfs)
What I most found lacking in other kernel guides was a well organised and comprehensive list of things custom kernels can offer. And since there is so much a Kernel could offer I'm going to try to provide it in categories with a couple examples so you get a good idea.
If I there is anything not accounted for, you are welcome to reply to this post and I will be checking every day to expand with any new info.
So without any further ado:
Feature List
General Settings:
These are things which do not fall within any of the other categories to follow. They are things which are usually classed separately in the App used to control the kernel. Examples include but are not limited to Fast Charge, Gesture (Knock on, Swipe2Wake), Color Calibration, Vibration Strength.
Advanced Settings:
These are similar to the general settings, but as the name suggests they are a bit more advanced and require a bit more knowledge/research to use effectively.
This includes Entropy (if you have no idea what this is look for Seeder App. The description of the App explains this very well.), Voltage Control (Ever heard of UnderVolting?), TCP Congestion Control (As a Networking Student I had no trouble understanding the technical documents about this, but knowing many who will be reading aren't knowledgeable of technical jargon I have included a nice link.)
http://androidmodguide.blogspot.co.uk/p/tcp-algorithms.html
As I know that there will probably be things I'm missing here, if you find anything which I have not explained, a quick google might be very helpful. Otherwise you are welcome to post a reply to this thread (even including the results of your Google if you need someone to explain it to you in a simple way.)
UPDATE 21/12/16: After getting my new HTC 10 I begun doing some research to understand the big.LITTLE configuration. It turns out that there are in fact some tweakable tunables for this. I won't be providing any recommended settings, since currently I am using a modded PnP which dynamically manages Kernel tunables for me, and as far as I know this is a feature unique to HTC.
But for those interested in finding out more here is a guide you could look through, if you want to learn more. The tunables are at the very end.
https://android.googlesource.com/ke...llow-dr/Documentation/scheduler/sched-hmp.txt
CPU Settings:
This is what you're most likely here for, this is the home of Over (and Under) Clocking.
But it also provides other very useful settings which might not look so simple at first. Here you can select a CPU governor (No guys, I will not list and explain what each one is, there are just too many and too many with stupid names. Instead I will leave you guys with a link to another guide specific about CPU Govs.)
http://androidmodguide.blogspot.co.uk/p/blog-page.html
While we're still talking about CPU Governors, there is a further option that you have if your app supports it. You can tune the specific tunables for each specific Governor, to get the best result possible and most suited to you. Whether you want more performance or battery savings from that specific governor.
Here you can also find toggles for HotPlugging or its counter part CPUquiet (Available only for NVIDIA CPUs I believe.) Hotplugging is simply the technology which decides when and which cores to turn off. CPUquiet is similar but rather than turning off the cores it simply makes the idle. The advantage is debated but the possibility is still there.
GPU Settings:
This one doesn't have many features (That I know of), it allows you to Over/UnderClock your GPU and also change its Governor.
Memory Settings:
(EDIT: I have included a Memory settings after doing a bit more of research about it, since its slightly more complicated compared to the other settings. Although most of these settings are available in both custom or stock kernels they can be tweaked to experience performance and battery improvements. So I'll try to cover as much as I can.)
Here you can tweak anything related to RAM and Cache. For tweaking these settings I suggest using the app Kernel Adiutor which I recommended earlier.
Things which you can find in all kernels are Low Memory Killer (Out of memory killer function on Android.) There is no need for me to explain it, what it does is self explanatory, to better understand the tunables I will provide this link:
http://forum.xda-developers.com/showthread.php?t=622666
You can also find tunables for Virtual Memory (Caching parameters), which is part of "sysctl" in the kernel. Tweaking this improves cache management, helping improve load times of cached apps, battery saving by emptying cache less often etc...
Here is a link which will give you a description for each parameter: https://www.kernel.org/doc/Documentation/sysctl/vm.txt
But there are also things which are not active or part of all kernels. zRAM is part of stock, and some custom kernels disable it. While KSM (Kernel Samepage Merging) can be added by some customs.
zRAM is just compressed RAM space. So you can store more in RAM by compressing the data you can fit more data inside your RAM.
Now obviously it is slower than actual normal RAM (since you have to encrypt and decrypt the data), but apparently it still is faster than using swap (which is in your internal memory rather than RAM). The principle works based on that Android prefers to keep data stored as much as possible in RAM to keep recently used apps running quickly. The more you use an app the more priority it has, therefore will stay in normal RAM, things you use sometimes but not very often are kept in zRAM (regardless of how full your actual RAM is), but since you don't use this very often you don't notice the performance hiccup of decrypting that data.
Then last case scenario things you barely use are kept in swap.
For you IT enthusiasts you should have realised already that "z" is the technology prefix for Compression. So it shouldn't come as a surprise that zRAM is compressed RAM.
KSM (Kernel Samepage Merging), this is simple, but it requires knowledge of some terminology. I will try to explain as simple as possible.
It allows the system to merge/share identical memory pages in RAM from different Applications/Processes. Thus it frees up RAM memory.
The only drawback to this is that it's up to your CPU to perform this task, therefore while it will increase performance it will also use up battery. But this is negligibly small (In my experience).
Therefore my recommendation is that if your Kernel offers this keep it turned on.
File System Settings:
The most desired setting available here is I/O schedulers. Again, I will not specify each scheduler since there are enough guides on the interbebs to give you all the info you need. On the other hand, I will leave you with my favourite of those guides.
http://androidmodguide.blogspot.co.uk/p/io-schedulers.html
The next most interesting settings is Read Ahead Buffer, this simply lets you choose how much data to load the buffer cache with. According to most benchmarks/tests the best value for this is 3 mb aka 3072 kb. This link gives you a better idea of it: https://broodplank.net/?p=788
Thermal Driver:
Here you can find toggles to manage overheating of the CPU and GPU. An example of which is MSM-Thermal and Core Control. I'm not gonna go into detail about these, since they are pretty self explanatory, and in my experience they both had descriptions beneath the toggles.
The most important thing to keep note of here is that only one should be on at any given time. If you turn 2 or more of these on together it may give you some issues. (It did with me.)
Tips & Recommendations
This is where as usual the writer gets to voice his opinion
Don't hate if you don't agree, just reply with your own opinion!!
I believe that any good custom Kernel should consistently provide some common settings.
We could say the minimum required to be considered a good custom Kernel.
Here is my list of basics:
General Settings:
Knock On (AKA double tap to wake)
Fast Charge
Advanced Settings:
Entropy
TCP Congestion Control
CPU Settings, all of it.
File System Settings, all of it.
Also my recommendation and tips for ideal CPU tuning and I/O schedulers.
FIrstly, CPU governors can be tuned to improve performance or battery saving. I found a good guide which explains the tunables:
http://forum.xda-developers.com/galaxy-s2/general/ref-kernel-governors-modules-o-t1369817
My recommendations will not take into account all the possible governors, but obviously if you take into account my recommendations and swap my choice of governor for an improved version of the same, or a similar one, then it should be even better.
While regarding the I/O schedulers, they are extremely under documented in comparison to CPU governors. And I have not managed to find a guide on how to best tune the tunables for the schedulers, so I will not cover this. If any one reading has any idea about this, please feel free to share your knowledge with us lowly humans!!
Actual testing reports and comparisons among schedulers are extremely difficult to find. So I will only recommend ones which I have found enough articles for or ones which I have tested myself.
Now for my list of recommendations:
Ideal CPU Governor
For general use, with a battery saving focus I would recommend the Conservative governor. And if you need a bit more of performance then it can be tuned to provide such.
For performance I would use Wheatley. If unavailable, then Elemental X or Interactive will be fine.
N/B: I added wheatley as an update after using it for a couple months, it has a double focus on both performance and battery saving. It follows the idea of "race to idle", that since idle saves the most battery then dealing with processes quicker means more time spent in idle. Therefore it will scale up to higher frequencies than ondemand and interactive, and it will try to deal with all processes in as quick a time as possible.
But it also focuses on battery, and if a process queue is taking long it will resort to scaling down the frequency to save battery while still getting work done.
In my experience I have not felt it glitch, and its very stable. It has improved my battery life (not as much as conservative), but it also has allowed me to use my device at full power.
But as with anything, there's always a downfall, which for wheatley is that it is a rare governor to find in most kernels. Currently I only have it on skydragon kernel. Most other kernels do not feature this governor.
EDIT 29/02/2016: I have learned of a new way to tune the parameters for Interactive governor, for optimum efficiency, when wheatley governor is unavailable. Since Interactive is always available - it is one of the stock governors.
In short it is tuning the parameters to use and spend more time in efficient frequency steps, in order to save battery while keeping the performance as high as possible. Using the fastest frequency steps before a huge jump in voltage consumption.
The links which helped me do it are the following:
http://forum.xda-developers.com/showthread.php?t=2769899
https://vjnaik.wordpress.com/2015/06/25/kernel-tweak-interactive-governor-paramaters-rooted-phone/
Ideal I/O Scheduler
For general use of your phone or tablet I would recommend using ZEN. It can provide good performance and better than average multitasking while having an average battery consumption. Being considerably better than ROW while at only slightly more battery intensive.
Obviously ROW is second choice, but if both of the above are unavailable, then B] FIOPS[/B] is a good replacement, ensuring an above average visual experience, good battery saving, at the expense of multitasking capabilities.
If battery isn't an issue, or you stream a lot of videos, then BFQ appears to provide similar experience to FIOPS plus excellent multitasking, at the expense of battery.
For Gaming, this was hard to find since there weren't any specific articles focusing on this, but from the descriptions and certain comments it appears that SIO provides a good experience. Others mentioned BFQ since it reduces lag.
For gaming you should absolutely avoid ROW and FIOPS since both have reported to increase lag during gaming.
For best battery saving the recommendation is definitely FIOPS. While it isn't the most battery saving scheduler (Noop is), it will provide the most battery saving while also efficiently giving you a great user experience.
For general multitasking the best one is BFQ. It will provide the best transfer rates (aka copy paste and install kind of thing), best for streaming & watching HD videos, and great for keeping loads of apps open at the same time.
N/B: I added ZEN to the list after using it for a couple months. At the time I first released this guide I could not find a kernel which offered this scheduler to test it. But after a while it started becoming more popular, and now it is easily accessible through most major kernels.
In my experience with it it has improved my multitasking slightly, while also reducing lag on general use. Battery increase unnoticeable.
Virtual Memory tuning
This one is a bit more complicated, and I have heard a whole bunch of stuff... Which is why I decided to test it myself and then come back to give you guys a report for it. The effects of VM tuning are not obvious at first glance and but affects the overall feel of the device. (Whether it feels like new, or sluggish etc...)
The main tunables you need to worry about are: Dirty Ratio, Dirty Background Ratio, Overcommit Ratio and Swappiness.
The guide I added above under "Memory Settings" will explain what each of these are.
Dirty Ratio & Dirty Background Ratio - Most people say that these need to be high, so that more stuff is stored in Cache. This will make your phone quick. Because cache is quick. But in reality this is only good advice if all you need to load on your phone is the system UI. Because as soon as you start loading different apps this cache fills quickly, and whenever you want to open an app/file/webpage that is not in cache, your CPU is tasked with both emptying whatever is filling up cache memory and load your new app into cache. Thus making multitasking a nightmare within the first day. A simple reboot of the phone is not enough, nor is clearing RAM (Note: Cache is not RAM).
Often the only solution to speed up your device is to Wipe Cache and Dalvik Cache from recovery every day. And for people with 150+ Apps installed which need to be optimized on boot, this means a lot of time is wasted.
My personal recommendation is to keep Dirty Ratio at around 40, which is double the stock value. Thus you have enough room before your phone freezes to free up cache. While Dirty Background Ration at 10, so that in the background without freezing the app you're currently in the kernel is constantly clearing cache. Allowing enough space for whatever you need to load.
Overcommit Ratio - While increasing allows more multitasking, I recommend leaving this at 0. It keeps RAM from completely filling up, thus avoiding "app xxx not responding" issues.
Swappiness - You have three kinds of fast memory on your phone, from quickest to slowest: Cache, RAM, Swap.
Swap is the last resort for your phone's memory. It is usually used when your RAM is nearly full. Swap is used for app data which is not currently being used, but part of the group of apps you use the most. (This is related to the Low memory killer, so for more information check that link. )
Since app data stored in Swap is stuff you don't use often it doesn't affect your phone greatly. But the more data kept in RAM, rather than Swap, the better.
Therefore after loads of try and testing I found that 40 is the perfect sweet spot. Allowing higher performance while keeping some data rather than completely deleting it when RAM is full.
This is my Guide to Kernels, if you find that it has helped you and would like to thank me remember to press thanks.
If you have any questions please do ask them, I'll answer the best I can.
If you would like to add more, dispute any of the things I said, give extra info on any specific thing which you believe deserves a more thorough breakdown, then go ahead, fell free to comment below.
Thank you for reading this Guide.
Nice guide and thanks for linking to my website
gsstudios
gsstudios said:
Nice guide and thanks for linking to my website
gsstudios
Click to expand...
Click to collapse
It was a pleasure, you have one of the most well informed and well organised guides to the stuff I could find.
Most others are just all over the place.
Keep blogging!
Very useful guide
Just a question: would it be possible gathering info about the "power suspend mode" that is often found in Kernel Adiutor?
{
"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"
}
What are the differences among the available options?
Thanks again for your guide
luke! said:
Very useful guide
Just a question: would it be possible gathering info about the "power suspend mode" that is often found in Kernel Adiutor?
What are the differences among the available options?
Thanks again for your guide
Click to expand...
Click to collapse
It took me ages to research, because initially when I did I found nothing. Whenever I searched this I would only find stuff about wakelocks. The wakelock system is more important to developers than actual users, so it was of no use to me.
But after a bit of research I THINK I found the original source code for this feature...I will put a couple links at the bottom for the enthusiasts to see.
(N.B. I will keep researching as I get more time to see if I can find more info on this, because it puzzles me also.)
Before I explain anything you must understand what the suspend state is, usually it is called sleep.
I usually cba to explain anything...since I am awful at explaining stuff in written form...I usually like to explain verbally. So I will leave you with a couple links:
Power suspend in Linux - http://unix.stackexchange.com/questions/162886/what-does-pm-suspend-hybrid-do
Power suspend in Android - http://bamboopuppy.com/android-suspend-a-brief-overview/
How it interacts with the hardware - https://source.android.com/devices/sensors/suspend-mode.html
Now for this kernel feature... I seems from what I have read that it is not activating or deactivating suspend mode....instead it is simply deciding on what "metric" to use.
Generally you could say that suspend state would be achieved on request by the kernel. But what if you want to automate the process so that it uses less requests, and thus goes to sleep quicker and more efficiently?
You make it so it bases on something else's output in order to initiate the count down.
This could be screen on/off (LCD panel), idle time (autosleep function), hybrid (autosleep & LCD panel whichever comes first), or userspace (defined by user.)
In all honesty, how it all works in detail I have no idea. But that is the basic idea.
I also have no idea why it keeps locking to userspace, as if it was default.
It seems that this function is not fully functional yet, or maybe it needs some fixing.
The gerrit page for the source code says that this project was abandoned by the main devs.
Gerrit page - https://gerrit.omnirom.org/#/c/9137/2
In summary, from other things I have read they say that Hybrid is the best one for battery life. But for me it never stays on Hybrid, it keeps resetting to userspace. Therefore I am unable to give you any further information about this.
I hope I helped.
Thank you, thank you, thank you, for putting this up so organized, the only problem on xda is proper guides, I can understand how much time and energy you have put into finding and putting up this guide, and the best part you have given links to the original author and not just copied their hard work and spread their knowledge combined. Well Done mate. That's a real example of how member of xda should be. this will help a lot of people. will share links to this thread.
Edit: added your thread link in my signature, hope you don't mind. I thought it would be better this way for people to see.
luke! said:
Very useful guide
Just a question: would it be possible gathering info about the "power suspend mode" that is often found in Kernel Adiutor?
What are the differences among the available options?
Thanks again for your guide
Click to expand...
Click to collapse
I have some new info about this, I don't remember specifics of where I got this, but it was in a thread about custom kernels.
A lost of people were asking why the setting was stuck.
And if I remember correctly it seems that this feature is a left-over stub from a failed project, which now has been superseded by Doze on Marshmallow.
It works exactly as I described, with the exception of Userspace, which rather than being defined by user it is defined by app. e.g. when app x says it's time to sleep phone will sleep. The other options are automated, and hybrid is the default option and we as users have no way to change it. It's been this way for a while, idk why Adiutor still has the option available.
Also finally understood fully why wakelocks kept popping up when I searched for this...it's because apps can set wakelocks to prevent the "power suspend" from happening, or even to wake the phone from a "power suspend" in order to not stop the app from running. This would be things like facebook, or other messenger apps which want to have a constant running service.
This created huge battery drains in KK and Lollipop, but now in Marshmallow Doze is a bit tougher to get around. Simple wakelocks won't do anymore.
billysam said:
Thank you, thank you, thank you, for putting this up so organized, the only problem on xda is proper guides, I can understand how much time and energy you have put into finding and putting up this guide, and the best part you have given links to the original author and not just copied their hard work and spread their knowledge combined. Well Done mate. That's a real example of how member of xda should be. this will help a lot of people. will share links to this thread.
Edit: added your thread link in my signature, hope you don't mind. I thought it would be better this way for people to see.
Click to expand...
Click to collapse
It's honestly been a pleasure.
I have been learning even more and soon I will re-update this thread with a lot of new info I have found.
I'm glad you liked this Guide, it did take me time and it's good that it has been recognized. You've made my day
This brings to mind the fact that I have been thinking on a new guide to newcomers into rooting and XDA, just explaining all that which is possible in a short but well organized guide .
Feel free to copy the link and share however you would like, it is honestly a huge help!
Thank you for making this guide, it helped me to understand my device further more
Thanks!
Android小楼阁-QQ群 439637151
来自搭载Android 2.3 GingerBread的华为Y220-T10
hello dude can i get your screenshot your setting on your kernel adiutor for daily, power save, and Gaming
.c.t.r. said:
hello dude can i get your screenshot your setting on your kernel adiutor for daily, power save, and Gaming
Click to expand...
Click to collapse
Unfortunately I don't keep presents.
I change on the fly as needed.
It just works better for testing rather than having specific presets to use, because I am constantly changing the actual values I use, also as apps get updated and their RAM usage increase or decrease, the values are always very fluid for me. I just keep changing until I find a comfortable value.
If there is anything specific you would like to know ask, and I'll advise you accordingly.
Thermal Driver:
Here you can find toggles to manage overheating of the CPU and GPU. An example of which is MSM-Thermal and Core Control. ...
Click to expand...
Click to collapse
Is there a way to manually set a temperature at which the CPU is clocked down to a specific MHz?
For example:
Temperature rises to 38 ° C = CPU clocks not higher than 800Mhz
thanks for this thread bro...
i have zero knowledge about kernel issues
and im so curious about how it work's and what it did
to our mobile phone's. but now i found your thread.
thanks for specific and detailed explanation..
even though i did understand only a little part of it
only the specific settings. I didn't know exactly how to use by changing
the number's of each settings under each codes and how it will
response to the performance of the device ..
i hope i will get it soon.. thanks again for putting this thread
it is very helpful in the likes of me newbie with zero knowledge
but willing to learn and understand how it is..
very big thanks bro...:highfive::good:
heross said:
Thermal Driver:
Here you can find toggles to manage overheating of the CPU and GPU. An example of which is MSM-Thermal and Core Control. ...
Is there a way to manually set a temperature at which the CPU is clocked down to a specific MHz?
For example:
Temperature rises to 38 ° C = CPU clocks not higher than 800Mhz
Click to expand...
Click to collapse
Unfortunately I don't know if that is even possible, you might have to mess with source code and add your own patches.
Good luck finding this out!
If and when you do share the knowledge with the community!
bearthing said:
thanks for this thread bro...
i have zero knowledge about kernel issues
and im so curious about how it work's and what it did
to our mobile phone's. but now i found your thread.
thanks for specific and detailed explanation..
even though i did understand only a little part of it
only the specific settings. I didn't know exactly how to use by changing
the number's of each settings under each codes and how it will
response to the performance of the device ..
i hope i will get it soon.. thanks again for putting this thread
it is very helpful in the likes of me newbie with zero knowledge
but willing to learn and understand how it is..
very big thanks bro...:highfive::good:
Click to expand...
Click to collapse
Dude, it's an absolute pleasure. It's mainly for people like you that I have made this guide.
I was like you too, and i didnt find a straightforward guide to help me out in the beginning...
There was a wealth of information but it was all over the place. A bit here a bit there.
I urge you to keep researching and keep learning. If ever you find that something you need doesn't exist, then make your own research and create that which you needed so that others who follow after you don't have to go through the same struggle!
Kyuubi10 said:
Dude, it's an absolute pleasure. It's mainly for people like you that I have made this guide.
I was like you too, and i didnt find a straightforward guide to help me out in the beginning...
There was a wealth of information but it was all over the place. A bit here a bit there.
I urge you to keep researching and keep learning. If ever you find that something you need doesn't exist, then make your own research and create that which you needed so that others who follow after you don't have to go through the same struggle!
Click to expand...
Click to collapse
some device not supported the tuning like my lg g4 h818p the noop doesn't tunable and cubic? thanks again bro
bearthing said:
some device not supported the tuning like my lg g4 h818p the noop doesn't tunable and cubic? thanks again bro
Click to expand...
Click to collapse
it's not the device, but the Kernel.
If the developer of the kernel adds support for certain features you will be able to use them.
You need to search and find the custom Kernel which has the features you are looking for.
Kyuubi10 said:
it's not the device, but the Kernel.
If the developer of the kernel adds support for certain features you will be able to use them.
You need to search and find the custom Kernel which has the features you are looking for.
Click to expand...
Click to collapse
any kernel is compatible to my g4 h818p? or
i search for specific kernel that compatible to my device?
thanks bro
bearthing said:
any kernel is compatible to my g4 h818p? or
i search for specific kernel that compatible to my device?
thanks bro
Click to expand...
Click to collapse
Find the thread for your device and you'll pretty much have found jackpot
i need help.i use kernel auditor to increase my headphones volume when playing music.( just use hdp slider to increase )
but happens that wen i unplugg the headphones and awnser a call the other persons dont hear me.
what to do?
Related
Voltage Control - noop, acticipatory, deadline, cfq
Which of these settings do you use and why? I cant really find anything on them.. Dont know which to pick? Thanks!
I would like to know the answer to this as well.
Me also Sent from my SGH-I897 using XDA App
Huh? Sent from my SAMSUNG-SGH-I897 using XDA App
download oclf from the market (but don't do anything with it) once you have it open it and check out the scheduler settings and in there you will find a good definition of each one and what they do.....sorry, too lazy to look it up and put what it says here Sent from my Galaxy S Captivate with Assonance 5.2!
Noop. I read that it's designed fire flash memory, and not spinning drives like the others. Never did any kind of testing though. Sent from my Captivate.
yeah i've read also that noop is the best since its meant for SSD's
I use noop, but seriously... effect of this setting is extremely negligible. Noop should cause minimum CPU overhead and work well on 'well-built' flash memory with correctly working FTL, however SGS appears to have FTL performance problems,(something like first Jmicron's JMF602 based SSD's) nonetheless I still stick to it.
psufan5 said: Which of these settings do you use and why? I cant really find anything on them.. Dont know which to pick? Thanks! Click to expand... Click to collapse Had no clue until I read the following: en.wikipedia.org/wiki/Noop_scheduler redhat.com/magazine/008jun05/features/schedulers/ Sorry, site rules wouldn't allow me to make these hyperlinks.
I always use noop as it gives me better stability but I was surprised to read that hardcores kernel is tuned for cfq...I do not see any performance difference though just better stability with noop.
Usually I find I can uv more with CFQ. I have no idea why.
Yea I have always left mine on Noop with Paragon; 1.28 and it froze maybe....2 times in the past month? And im at 75,100,125,125,125,125 Captivate 2.2.1 Paragon
I found some great definitions of for noop, anticipatory, deadline, cfq on this website... www dot admon dot org/a-comparison-of-io-schedulers/ The site won't let me put in a link so put a period where "dot" is. Here they are... Noop - Noop is the simplest scheduler present in Linux. It is mostly suitable for truly random-access block devices, such as flash memory cards. The incoming requests for read/write are kept in FIFO order, and only the current request added at the end of the queue is tested for the possibility of merging. The downside is clear; you get no optimization at all, especially in situations where there are many competing read/write processes. Per process sequential readings will be seen as “random” access. So, it’s better not to use this scheduler with any sequential access device, such as a hard disk. Anticipatory - The Anticipatory scheduler is designed around the fact that a user tends to access adjacent sectors instead of jumping to other disk areas during certain periods of time. Most file systems in Linux use a specific approach to ensure that sectors belonging to a file are kept adjacent as much as possible. Between these reads, it is very likely that the task sleeps for a while before continuing reading. So, the basic idea behind the Anticipatory scheduler is that it anticipates subsequent reads between sleeps. By staying a bit longer in the same head position, it can reduce the back-and-forth seek movement to a certain degree. How long it should stay is sometimes determined by looking into the next incoming read request, or in some cases by forecasting based on statistics. It is clear then that the Anticipatory scheduler isn’t really great for time-sensitive read/write processes. The CFQ scheduler shares the same cons, although it is a bit better because of its “fairness” ability, which we’ll describe later. Deadline - If you have a lot of requests, you may want to make sure a request is serviced within a strict period of time. This situation is quite common for a busy file server, but you can see it on desktop workload, too (e.g., graphics rendering). The Deadline scheduler was created to address this need. Read and write processes are guaranteed to be serviced within a strict amount of time, and read is prioritized over write. So, the Deadline scheduler pays attention to latency issues but not necessarily throughput. Read is favored over write, because read is assumed to be more important; however, write operations aren’t allowed to be starved too much. This behavior can also be tweaked with some tunables, which we’ll talk more about later. The Deadline scheduler is a sound fit for high-performance I/O because it decreases the interactivity to a certain degree. For someone who demands smooth desktop experience, however, this might not be the scheduler to choose. CFQ - CFQ is the default scheduler used in the latest kernel versions, and it is typically suited for people seeking balanced I/O service. Stressing “fairness”, it tries to manage read/write processes using priorities so that nothing dominates or fully dictates the way the kernel serves these requests. This is done by dividing the bandwidth of each block device fairly among the processes performing I/O to that device. Lately it has also been improved by the time slice-based operation, meaning it does what process schedulers do: Serves a request within a specific duration, stops, switches to another one, and repeats. When a process submits a request for disk access, the request can be classified as synchronous or asynchronous. In the case of synchronous requests, the process waits for the request’s completion; for asynchronous requests, it simply sends the request to disk and starts doing some other work. Hence, the CFQ scheduler gives more time/priority to synchronous requests rather than to asynchronous requests. CFQ gives the best balance (theoretically) between throughput and interactivity.
Droidwall intercepts packets from kernel to Google, MS, xda
I like Droidwall. Here's my review: Droidwall is a nifty program which can easily be configured to block wifi and/or data communication for each individual application. Perhaps allows small savings in battery, data usage, and slight improvement in security. Particularly when app had no logical purpose to acces internet other than advertisements etc. Also does not cost any significant cpu or memory resources... just modifies a table somewhere. Now onto my question: One of the applications that I blocked was labeled “(Kernel) – Linux Kernel” Blocking the “kernel” has no effect on items like browser, gmail etc. Based on Droidwall log, over the past several weeks since I installed the program, it has blocked 397 outbound packets from “kernel” which were destined for a variety of IP’s that all seems to be associated with Google, XDA, or Microsoft. Below is an example of three of the IP’s: Google 74.125.227.140 https://ipdb.at/ip/74.125.227.140 xda 50.23.216.69 https://ipdb.at/ip/50.23.216.69 Microsoft 65.52.32.12 https://ipdb.at/ip/65.52.32.12 Another thing I noticed, these are the only log entries where the external IP is recorded in the log. In all the other non-kernel blocked-application log entries, the IP recorded is my router IP. I’m using Entropy’s DD kernal on GB. It seems to me a little strange that these outbound transmissions are associated with the kernel. And at the same time, they don’t seem to be associated with any obvious legitimate purpose....because my phone works fine on normal internet application even with “kernel” blocked by Droidwall. Does anyone have any ideas what would be the explanation for these packets sent from kernel to Google, MS, xda ?
Well I don't know much of anything about programming, however some people say that it isn't just apple that collects information about people without them knowing. Could be that or I could be completely wrong. Just for curiosity, do you allow anonymous data to be collected and sent to Google? Sent from my SGH-I997 using xda app-developers app
If no answer here, maybe post your question here: http://forum.xda-developers.com/showthread.php?t=1957231
Well I don't know much of anything about programming, however some people say that it isn't just apple that collects information about people without them knowing. Could be that or I could be completely wrong. Just for curiosity, do you allow anonymous data to be collected and sent to Google? Click to expand... Click to collapse I generally answer no the the “anonymous data collection”.... thinking about battery, data usage, and privacy. I think several apps have that question. I don’t doubt there are a lot of programs trying to communicate for a variety of non-obvious (possibly suspicious) reasons regardless of how you set up the options. ....there were a several installed Apps attempting access that had no obvious reason to do so. What initially struck me as strange was that this was attributed to the kernel.. that didn’t quite compute. Trying initially to formulate an intelligent thought about what that meant, I utterly failed and came up with the notion that these items must somehow be related to programming by the developer of the kernel. When I actually engaged my brain, I realized that was just plain silly because: 1 – That would be Entropy. Enough said. 2 – The kernel is open source. 3 – There are several different destination ip’s. If one person was trying to collect data, he wouldn’t send it to different places. So it must be several applications interacting with the kernel.... just shows up attributed to the kernel by Droidwall. If no answer here, maybe post your question here: [afwall link][ Click to expand... Click to collapse Thanks Pony Ex. I didn’t know that program afwall existed. Looks like it might have some good improvements to an already-great program (Droidwall). Will definitely give it a try. But I’m not bold enough to post this type of question in the developer’s thread though... several others were scolded for non-appropriate posts in that thread.
To my limited understanding, and I apologize if I am wrong, entropy just modified the kernel that was already there? Hence why the new ICS and jelly bean ROMs are still using a gingerbread kernel. So who actually wrote the kernel? Samsung? Google? Both? I agree I don't see entropy gathering personnel data. However, apple was caught doing it and to the conspiracy minded individual, Google (a company that made it's fortune with information) would be in a similar position to do the same. Again I have no evidence or knowledge to back up anything I'm saying, however what better way to collect information then distributing a free open source program with 100's of millions of users? Sent from my SGH-I997 using xda app-developers app
electricpete1 said: Thanks Pony Ex. I didn’t know that program afwall existed. Looks like it might have some good improvements to an already-great program (Droidwall). Will definitely give it a try. But I’m not bold enough to post this type of question in the developer’s thread though... several others were scolded for non-appropriate posts in that thread. Click to expand... Click to collapse electricpete, http://forum.xda-developers.com/showpost.php?p=35352916&postcount=256 I'll fade the heat. Edit: His first reply: http://forum.xda-developers.com/showpost.php?p=35360652&postcount=257
Pete, Are you using the Droid Wall to stop the outgoing packets to ensure privacy or are you using it to stop the wakelocks that may be contributing to the wifi drain bug on gingerbread?
Here is a reply from someone else... pretty good read: http://forum.xda-developers.com/showthread.php?p=13148076#post13148076 post # 47
Pony Express said: Here is a reply from someone else... pretty good read: http://forum.xda-developers.com/showthread.php?p=13148076#post13148076 post # 47 Click to expand... Click to collapse Thanks Pony Express, for posting that question. Good info in the responses and other links. qkster said: Pete, Are you using the Droid Wall to stop the outgoing packets to ensure privacy or are you using it to stop the wakelocks that may be contributing to the wifi drain bug on gingerbread? Click to expand... Click to collapse There is the potential to improve all three (limit data usage, limit battery usage, improve privacy). I think the improvements in battery life and data usage are probably relatively small (especially because I also manage those by turning my connections off when not in use while away from home wifi)... whereas I think the improvement in privacy may be substantial... so I guess that's my main interest (improving privacy). But since the $ cost and resource cost is basically zero, it almost seems to me like no-brainer choice to use it regardless of the level of benefit we expect (unless there is some hidden disadvantage...which I haven't seen yet). I wasn't aware of a particular wakelock problem on Gingerbread. I haven't particularly noticed a change in batteryusage one way or the other (and I really wouldn't expect to notice unless it was a dramatic change), but it stands to reason that reducing traffic from unwanted Ads, pinging, data-gathering etc could help. Here are some links that may support that view: http://gizmodo.com/5894572/in+app-ads-are-destroying-your-battery-life http://www.theverge.com/2012/3/19/2884902/android-apps-battery-efficiency-study There was one poster in the AFwall thread that suggested an App that is denied access will keep trying again and again, and therefore use more juice..... which also sounds plausible, but several others disagreed with that. * I have installed AFwall now, in place of Droidwall. It is the same program with a few improvements (fixed hole in the security wall during reboot) and a lot of extra features. But still keeps the same basic simple user interface.
SEEDER [ Lag Reduction APP ]
ONLY FOR ROOT USERS GUYSS This is a App Called Seeder . This App Is Used For Reducing Lags in Phone (Like in Games etc.) INSTRUCTIONS : INSTall The App & Press ON Button It Will Be Automatically Reduce Lags In Ur Phone _______________________________________________________________________________________________________________________ Lag reduction for ROOT USERS ONLY! Many Android tasks run slower than they should for one simple, yet not-so-obvious reason: they consume large amounts of random data from a limited source. Random data is used to generate session keys and unique identifiers, in SSL and wifi, while starting processes, and during inter-process communication. This data (entropy) runs out frequently, and that causes processes reading from the blocking device (if any) to temporarily stop responding (lag). These processes cannot continue until the Linux kernel repopulates the entropy pool, which takes time. In addition, input events are pulled from the user interface (to refill the pool), which may also contribute to the problem. Seeder is a service for root users. It assists the kernel in "topping off" the entropy pool by re-seeding it with data from the non-blocking (high performance) random device. Optionally, it can also help alleviate MMC I/O contention by extending the I/O queue, allowing the I/O scheduler to make better decisions, and combine more writes. On some devices, applications load significantly faster (particularly large ones like Facebook, Chrome, and Youtube), and task switching becomes effortless. Fewer visual "hiccups" occur. You MUST be running a rooted device to use this application! If you don't know what this means, Seeder will probably not work on your device! MOD Edit: Please download from here: http://forum.xda-developers.com/show....php?t=1987032
buddy this is not ur work right??? then according to the rules 12. Using the work of others. If you are developing something that is based on the work of another Member, you MUST first seek their permission, and you must give credit to the member whose work you used. If a dispute occurs about who developed / created a piece of work, first try to settle the matter by private message and NOT in open forum. If this fails then you may contact a moderator with clear evidence that the work was created by you. Convincing evidence will result in copied work being removed. If there is no clear evidence you created the work then in the spirit of sharing all work will remain posted on the forums. As an addition, developers have the right to hold exclusivity over their work for as long as it is deemed necessary by the dev or freely share it. However, if the work is claimed as exclusive, it must remain as such. No selective sharing will be allowed (ie allowing certain people to use it and not others). Should the dev decide to start sharing the work with others, the work automatically becomes fair game for all to use. In regards to permissions, same rules remain for this but if permission was already given, unless there is a very valid reason, it cannot be revoked (same applies to major updates on the work). Under that same premise, permissions cannot be denied unless the work is exclusive or under severe circumstances. In plain English: If you want to keep your work exclusive, go for it. However, if you are going to share your work, do it fairly. These rules apply to all software posted on XDA (including but not limited to ROMs, RUUs, apps, games, kernels, themes, icons, etc) unless that software comes with a license that waives these rules. Click to expand... Click to collapse and here is the original thread http://forum.xda-developers.com/showthread.php?t=1987032 by @lambgx02 in android development and hacking so its of no use for creating multiple thread in all mobile forums
Yess.. This Is Not Mine Work tejkkarani said: buddy this is not ur work right??? then according to the rules and here is the original thread http://forum.xda-developers.com/showthread.php?t=1987032 by @lambgx02 in android development and hacking so its of no use for creating multiple thread in all mobile forums Click to expand... Click to collapse Yupp Its True This is Not Mine Work. Im Just Share This App :angel:
Android energy estimation tool
Hi everyone I have recently been working on an Android development tool whilst completing my CS Msc [1]. This tool allows developers to submit their apps and a usage case (by defining a Monkey Runner script) and in turn will provide feedback on the energy usage of the applications code (at the method level). I am looking for feedback from the community as I am now planning to release this, as a free and open source tool. Currently the tool will give you an approximation of the total usage of the code, a breakdown of what this means in terms of other usage (eg how long you could have watched an HD video using the device for the same amount of energy), and a breakdown of each methods total and average energy usage. There is also some support for estimation of hardware energy usage. This is all done without requiring a physical device (it runs on emulators). By using monkey runner, I am hoping that developers can define different use cases to also allow stress testing of their application. This will not give you the exact energy usage of the app. It measures areas of code that are known to have high energy costs, assigning values based on findings from previous research that catalogued these. This research claims that these areas relate to 80% of the total energy usage of the code. The feedback is designed to highlight which routines are using the most energy and thus allow you to focus on them. Is this something that the community is interested in? Are there any features you specifically would want added? [1]To confirm, I have finished my Msc. This piece of work has been handed in and graded. I am not asking for help with the report or ideas for this. I just want feedback on what I feel is a worthwhile tool
This is obviously interesting. It opens us up to a whole new area of optimisation. Due to the device being mobile, power optimisation is very important. To be able to determine what kind of features are required would need actual use of the tool. Congrats and good work. Are you planning to open source this tool?
Enhanced Privacy, Security and Battery Duration! My Measures...
Purpose: To share my personal experiences how I achieved an enhancement of my battery’s life, privacy and security. INDEX: Post #1 - General Statements, ROM and Kernel. Post #2 - Privacy Measures and Considerations. Post #3 – Better Battery Stats. Post #4 – Greenify. Post #5 – Amplify. Post #6 – Power Nap Post #7 – AppOpsXposed THE BASICS: Please read the XDA Forum Rules provided by @MikeChannon; from my personal point of view a definite MUST READ for everybody who intends to post on XDA or to contribute to this great site. Other MUST READ's I certainly recommend to everybody who wants to "breathe" what I believe the spirit of XDA is, are the following posts: Forum Etiquette by @TheByteSmasher, http://forum.xda-developers.com/showpost.php?p=16682226&postcount=2441 by @zelendel, and last but not least http://forum.xda-developers.com/showpost.php?p=2031989&postcount=44 by @kyphur. Do me the favour and really inhale what I just linked above! Disclaimer: Your device requires to be rooted, and in most cases that the Xposed framework is installed, too. I am not responsible for any damages to your device if you follow any of the suggestions or my experiences provided in this thread. If you do your warranty is now void. I am not responsible for bricked devices, dead SD cards, thermonuclear war, or if you’re getting fired because the alarm app failed. Please do some research if you have any concerns about features mentioned in this thread before flashing anything! YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you. Whatever you do, before you do it ensure you save a NANDROID backup. If you don’t know what this means you’d probably rather discontinue further reading. Alternatively, you might want to start reading this and then return: What is?Boot loader,custom roms, CWM, modem, kernel?? by @esimon311. Background: In December 2015, I got a used SGS 3 LTE that was running on CM 10. Immediately, I started to search for others ROMs especially on XDA (actually my first contact with this fantastic forum), thoroughly read the OPs and the subsequent posts, flashed and tried a few of them, till I've ended up in the configuration I'm now using for nearly nine months (details are available in the hidden part of my signature). I'm extremely happy, and my phone completely fulfils my requirements and desire; thanks to @rodman01, the dev of "my" ROM, I certainly don't need a different phone. I'm quite "paranoid" in regard to privacy i.e. I don't and won't ever use things like FB, Whatsapp etc., and I’m not having experiences with them. Privacy is also my main driver to have my devices to only carry a minimalist suite of Google (“pico” and even some of that crap uninstalled) because I only use Play Store (unfortunately, some of my favourite apps incl. their betas are only available there) and broad location. If I'd get MicroG to run on my device Google had already been totally eliminated. Desired End State: A device, which runs in a well-balanced ratio between battery endurance or drainage and performance specific to my objectives. Criteria for Success: Battery lasts at least for 36 hours while all functionalities in regard to the objectives are applied; no unintended or random reboots occurring; no frozen screen. Own Centre of Gravity: Maximum privacy. Objectives: Phone calls 24 hours per day, 7 days a week (24/7). Text messaging 24/7. Email reception and transmission 24/7. Email and messenger encryption. No “social networks” at all unless provider fulfils all privacy requirements. No “messenger” except “Signal” but Signal 24/7. All what can be accessed via a (slim line) browser, will be accessed via browser but not via dedicated applications. If possible and achievable, no use of any Google “tool” or service. If possible, no use of Chinese or Russian “products” or from any other country of “similar quality”. If unavoidable to use such a product, no WiFi, mobile data, or VPN access at all; all private or confidential data will be spoofed. Control of access to private or confidential data like contacts, calendar, location, telephone number, IMEI etc. Spoofing as access control is acceptable. Control of permissions only via ROM tools. Control of broadcast receivers, services, wakelocks, and alarms. Battery endurance of at least 24 hours. Scenario: Remote location close to a national border with low 4G and 3G reception, even GSM reception occasionally weak and weather depending. No gaming at all. Initial Steps: As stated above at background, I quite intensively and thoroughly scanned XDA for a ROM that could suit me; reading at least all the Ops but screened the respective thread, too. I finally but quickly found my desired one with [ROM][6.0.1][i9305 OFFICIAL] Resurrection Remix® M by @rodman01 in April 2016; it became my daily driver, and I’m using it till today. Very fast, I concluded that performance of my phone might be enhanced by replacing the stock ROM kernel by a custom one i.e. I commenced the same search for a suitable kernel as I did for the ROM. Please be aware that kernel totally depend on the device and highly on the ROM. Read extremely thoroughly through the respective OP of the kernel you’ve in mind and get a clear indication if the kernel is really suitable for your device and your ROM. Even then, there might be more than one version available (as it’s the case for my current kernel); simply try, which one runs the best on your phone but also study the thread – others might have already shared experiences. Next step was to experiment with the kernel settings especially the governor, governor and GPU frequencies and under-voltage. It became a try-and-error process including frozen locked screens and unintended reboots but the result was worth the torture. I was able to find kernel settings in accordance with my objectives especially improving the battery duration. I found the following thread extremely helpful in working out “my” kernel settings: [REF][GUIDE]Most up to date guide on CPU governors, I/O schedulers and more! by @Saber. If you search the thread of my kernel but also the Q&A section of my ROM you’ll certainly able to find some of the experiences I tried to share. Attached is a zip-file with screenshots of my current kernel settings. Please be aware that not all kernel come with the same types or number of available governors. Some come with a dedicated control tool, some use the tool e.g. provided by the ROM; and as this would be off-topic and isn’t important to me, some offer different sound control like “boeffla”. Unless you’re on AGNi like me with its own AGNi Control application or on another kernel with its own control tool, I’ve very good own experiences with a tool called [APP] [4.0+] Kernel Adiutor by @Grarak. From my point of view, besides the marginal ROM settings to decrease battery drainage, installation of the right kernel and manipulation of its settings were the first major step to enhance my battery’s life! Soon, I realised there are two versions of my ROM available, the “regular” one but also a so called “Sammy version” (for those who are interested, the differences are explained in post #3 of the above linked Resurrection Remix thread). I converted to the Sammy version and was impressed; first, how smooth my device performed “on Sammy” but second and more important to me that battery charging was much faster. Nonetheless, if required I'm tweaking my system by tools like [APP] [4.0.3+] L SPEED Android tweaking APP by @Paget96 and keep it clean and tidy by [APP][1.6+] SD Maid - System cleaning tool by @Dark3n. SD Maid additionally offered me the possibility to easily control the “autostart” behaviour of my installed applications; however, there are certainly other tools available for this purpose e.g. My Android Tools that I'm also mentioning in post #2 for another reason. Please be advised that for all somewhere in this thread mentioned applications or tools, I personally started using them with the recommended settings in their OPs if available i.e. you must thoroughly read them but eventually commenced to experiment with different settings until I achieved the results I wanted. This certainly also applies to the use of e.g. different governors or other kernel settings. I collected some of the guides and tutorials, which were very useful and supportive to me, in post #3 of this "How-to...". This whole thread is meant in conjunction with the SGS3 but some parts might be helpful even for your device. EDIT (2016-11-11): If you experience WiFi drops you might be interested in experiences that @Wood Man is sharing with us, and he gratefully allowed me to quote him regarding WiFi drops that occured to him several times. It never happened to me because my setup was (just by accident) always different; however, if WiFi drops occur to you please have a look at this post. The explanation is so reasonable and makes so much sense from my point of view. Thanks very much to Wood Man for sharing his knowledge. I do mention this issue in this OP as I assume that these type of connected inteferences might even lead to a higher battery drainage in turn. Last but not least a few words regarding Xposed – I apologise to the multiple XDA users who already know for covering this here but just by monitoring all the Xposed threads I’m convinced a lot of guys just don’t know. The Xposed framework in available in different versions pending e.g. on the brand of the device or its architecture, on the ROM respectively the Android SDK or if systemless root is used. I refrain from quoting all the different Xposed threads at this point; simply search the Xposed forum by yourself, and you certainly find the framework suitable to you. In the hidden part of my signature you can retrieve the Xposed version I’m using. We talked about ROMs and kernels, now let’s mention the other key players for my satisfying battery endurance but as stated you certainly need Xposed: BetterBatteryStats, Greenify, and Amplify, and PowerNap. EDIT (2016-11-11): Please refer to post #6 (about PowerNap) why I "removed" PowerNap. I tried all of them, it worked out for me, and I'm continuing to use them; however, that what I stated in the paragraph above applies for them too: Comply with the recommendations and develop it further till you are satisfied. EDIT (2016-11-19): If interested how I made my system GApps free, please check post #54. Remarks: If a donation option is available please consider to take advantage of this chance as you not only occasionally get a better capability but you're supporting the dev and the development. None of the mentioned apps has got permission granted to the internet, and all are spoofed by XPrivacy. I'm pretty cautious regarding applications if so much power has been made available due to root and Xposed, and I always take their origins into consideration (a reason why I don't update my SuperSU anymore and continue to use SuperSU v2.76). Occasionally, it's required to post you logs on XDA, and quite a few guys have problems with attaching files to their post; me too. In such a case, I suggest to try a different browser; I can only post all allowed attachments via Microsoft Edge and Chrome. FF, IE and Chrome doesn't allow for whatever reason; they even don't provide any possibility to select a file for upload. I have no experiences with XDA Labs. EDIT (2016-10-18): I don't know what changed a few minutes ago but I'm now able to use Chrome for the upload of files. Weird! Another option is to upload e.g. to http://hastebin.com and to post the link. Now, you know more or less what I did to achieve a really good battery life. ATTENTION: In accordance with my objectives No so called "social network" applications (e.g. Whatsapp, Twitter, Instagram, Facebook or how you name them) at all are installed on my devices i.e. you couldn't find any settings/limitations regarding them. All my described settings/limitations are in that way that no push notifications at all are allowed (because I want it this way). Every wakelock and alarm connected to Google Play Services (GPS) is somehow limited; not one is unlimited. Quite a few services of GPS and/or Google Services Framework (GSF) are disabled. Edited because all devices are GApps-free. If you just copy my settings without any reflection do not wonder that all of your push notifications are (even extremely) delayed. If you require anything of above you need to play with your system yourself. The following posts provide you with details of all the applications I use to monitor and to limit the drainage of my battery. CREDITS: To everybody who I mentioned in this OP or the subsequent posts. If I forgot someone I apologise. Please let me know in this case or if you want to be more prominently given credit; I'm happy to immediately follow such a request! Off topic comments are allowed as long they are generally related to the overall topic, are in the general interest of the followers of this thread and add value to the thread. The ultimate decision rests with me as the OP!
Privacy Measures and Considerations You might be wondering why I post this and actually so far on top of this thread. As you can read above, I recognise maximum privacy as my centre of gravity (COG) i.e. everything needs to be done to defend the COG. Or in other words, without all the steps below, I wouldn’t be able to install and use some of the applications i.e. tools to decrease the drainage of my battery. The following measures and considerations are therefore the prerequisite to continue further. Prevent Google's and other applications from "calling home” by controlling access to WiFi, mobile data (including roaming), or VPN through “AFWall+ (Donation)” and control effectiveness through Network Log. EDIT (2016-11-18): Google is no longer an issue as I'm "GApps free" for some days, and I'm extremely happy with the performance of my system. If you are interested in more information please search this thread for "GApps free". Limit all unnecessary use of services and broadcast receivers not only in support of privacy but also “to save fuel” e.g. by “MyAndroidTools”. As an example, here’s a link to one of my posts in a different thread, where I showed how to manipulate some broadcast receivers used by “Google Play Services” in order to decrease its wakelocks. If using MM+ control of all permissions in the ROM settings granted to the installed applications including system applications. In the ROM privacy settings, by default don’t allow any application including system applications access to your private data; just grant this permission on a strict case-by-case policy if absolutely necessary. Check in the advanced privacy settings if the granted permissions correspond with your objectives. Use AppOpsXposed for additional implementations (refer to post #7). XPrivacy - The ultimate, yet easy to use, privacy manager by @M66B. Actually, I deem XPrivacy to be the most powerful tool on an Android device to protect privacy. XPrivacy can only run on devices with an installed Xposed framework. XPrivacy doesn’t control permissions an application gets granted but is able to spoof all data that are made available to an application or are requested by it. The advantage of this method is that the application itself “believes” it’s correctly functioning whereas denial of a requested permission quite often leads to a force closure of the application. XPrivacy isn’t only extremely powerful but also highly complex albeit easily to use from my point of view if you familiarised yourself sufficiently; however, this takes a bit of time but it’s the effort worth. And M66B has provided a very detailed user manual and FAQ tutorial. And just to reiterate: Without the mentioned measures, I would personally never have installed some applications; to name them I leave it with your imaginations. Remark: If someone decides to go for one or all of the mentioned applications please consider to use the donation versions (if available) or to donate to the developers in order to support them and the further development! EDIT (2017-06-11): Due to the (hopefully only temporarily) non-availability of Xposed for Nougat, I had to terminate the utilisation of XPrivacy i.e. to try to use my brain more intensively. It's a pity. If interested in Privacy, these two posts might be interesting to you: Post #64 and post #66.
Better Battery Stats For me, it’s was immediately obvious that I needed to know how and what is when draining my battery before I could commence reducing the drainage. In order to monitor drainage of the battery, I finally learnt about [APP][2.1+][06 Sept. - V2.2RC3] BetterBatteryStats (BBS) by @chamonix. BBS serves my personal requirements the best; the application is well maintained and supported by a really active XDA thread. BBS is also able to run on non-rooted devices; however, some modifications via ADB are required. As an example, I attached a BBS log but please be aware it isn’t really informative at all because I used the phone while logging was running. Clear guidance is in this thread [GUIDE] 0% [0.0%/h] Idle Battery Drain on Stock ROM (XPosed & Amplify Required!) of @Celestial Fury how the BBS log must be taken in order to provide valuable information for a diagnostic assessment of your battery’s drainage, literally it has to be an idle log. It’s also very helpful to establish first baselines for your device and its current battery i.e. for you to known how much is the battery draining even with the phone switched off and the next time when it’s not transmitting/receiving at all (i.e. in airplane mode). EDIT (2017-06-08): From my point of view, this procedure by @Davey126 is the best way to achieve a suitable dump file. Just for completeness: Besides the log (dump file), BBS is able to provide you simultaneously with a logcat and dmesg file. You can retrieve the logs by pressing on the "triangle sign" located in the middle between the refresh and the menu symbols (see screenshots). EDIT (2016-10-13): Idle Dump attached. Drainage of 1.5%/h i.e. a theoretical battery duration of slightly more than 60 hours, which is fully in line with my given objectives, especially under consideration that neither K-9 Mail and ChompSMS nor Signal are hibernated. From my personal evaluation and conclusion - however, I'm happy to receive experts' opinions, nearly no partial wakelocks but the "standard" (at least from my point of view) kernel wakelocks. As you see at post #1, my kernel's settings are a fair compromise between battery savings and performance. I haven't had any frozen screen or unintentional reboot for month, which is equally important to me as a good battery duration. I doubt that I'm able to further minimise kernel wakelocks. Final remark: Within our home WiFi network, the phone has a fixed IP address assigned respectively reserved. EDIT (2016-10-17): If you experience issue with "net scheduler wakelock" maybe my post here is interesting to you? EDIT (2016-10-18): Again thanks to @Wood Man as already so often (eventually I believe he knows the whole XDA by heart) I've become aware of another thread dealing with "net scheduler" by @spencetj. Maybe this helps you in case of any problems e.g. this workaround.
Greenify Greenify supports my objectives by “hibernating” most of my installed applications. The screenshots below are supposed you to show you the applications, which I haven’t “greenified”. What Greenify does respectively is supposed to achieve can be taken from the XDA threads. Please be aware that the thread regarding [APP][4.1+] Greenify v2.9 Final (Updated on Aug.1) has been closed by @oasisfeng; instead he opened this new one: [BETA] Greenify 2.9.5 beta 3 (Sep. 21, 2016) [BETA]. Please check the Greenify Forum for applicable threads. Further guidance, actually the one I initially used, is also available in this guide: [GUIDE][26-07-2016]Extreme Battery Life Thread(Greenify+Amplify+Power Nap) by @v7. EDIT (2019-01-02): Meanwhile, hibernation on Oreo and later seems to work nearly perfectly that Greenify is probably unnecessary in conjunction with these Android versions. However, no own personal experience as our devices are still and will remain on Nougat.
Amplify By the use of Amplify, I manipulated wakelocks, alarms, and services connected to my installed applications. Using Amplify probably requires the most manual input of all other mentioned applications (except maybe MyAndroidTools and/or AppOpsXposed) but the outcome is tremendous in my opinion. Amplify is available via this thread [Mod][Xposed] Amplify - Battery Extender - Control alarms, services, and wakelocks by @cryptyk who also nicely explains in his thread what wakelocks and alarms are. My screenshots below (zipped due to their amount) are supposed to provide an impression, which wakelocks, alarms, and services I limited by Amplify; however, it’s a pity I can’t show you the exact settings for each one of them. Till today, I’ve been unable to figure out how to export or save my settings of Amplify. EDIT (2016-10-12): Additionally, the attached xml-file contains my current Amplify limitations for those interested. I found it thanks to this post by @Sam Nakamura and the hint to it by @Davey126. EDIT (2016-10-27): For completeness, I must mention that some highly experienced users e.g. @Davey126 are questioning the let's call it effectiveness of Amplify and from my understanding seem to achieve less drainage without the use of Amplify. If interested in these conversations I suggest to search for respective posts (e.g. by @Davey126) relevant threads. Some of his very valuable thoughts and paradigmatic attitude can be retrieved here. In the very beginning, I initially took the settings suggested at [GUIDE][26-07-2016]Extreme Battery Life Thread(Greenify+Amplify+Power Nap) by @v7 but in turn continued to modify them more and more. Meanwhile, all Google Play Services related wakelocks and alarms are limited, by the way without any problems for me or my device; however, remember how limited my intended use of Google crap is (post #1). @Celestial Fury provides very helpful guidance in his thread [GUIDE] 0% [0.0%/h] Idle Battery Drain on Stock ROM (XPosed & Amplify Required!) “[GUIDE] 0% [0.0%/h]. If you use the powerful XDA search engine it’s going to drag you to other valuable, sometimes specialised posts e.g. to this one: Getting rid of wlan_rx_wake wakelocks by @laxor. EDIT (2016-10-31): Just in order to gain some own experiences, I uninstalled Amplify three days ago after resetting to its defaults. My intention was to observe battery drainage of my system without a running Amplify; everything else remained unchanged. Observation: Within the two days, the system had higher battery loss of 1.5%/hour during idle without an installed Amplify compared to the values before with the running Amplify. EDIT (2016-11-16): For two days now I'm GApps free!!! System is running thousand times smoother, fixing the location is very fast even without GPS, blanketstore does what it's supposed to do, and in a few days I'm going to observe my battery drainage more closely; just this morning resetted my Amplify statistics. But talking Amplify: Obviously due to the lack of the original Google Play Store, it doesn't recognise my donation anymore i.e. no pro-features available and by this now useless to me. Most likely, I'm going to uninstall Amplify having also in mind that some very experienced guys like @Davey126 doubt its necessity anyway. Alternatively, I hope that @Paget96 is eventually forking Amplify to his great application L SPEED. Davey126 said: FYI - I am Amplify free on most of my devices and have profited from reduced maintenance (monitoring/tweaking/optimising blocks) and undesirable side effects that often manifest in subtle ways. In some cases I accepted a modest increase in drain rates while still enjoying overall performance that ranks in the top 20% based on values reported here and similar threads. All day battery life is a must; no compromises there. Arguably drain rates improved a bit with the removal of Amplify but hard to isolate (hint: reset stats on occasion and observe results with no other changes). I do have Amplify running on a couple of older devices that rely on stock ROMs and tight Google Play Services integration. I find a minimal configuration works best with carefully selected conservative blocks (items/durations) along with a weekly stat reset. Amplify continues to be a fine (albeit stagnant) tool with no apparent equal. It is the right solution for many who experience excessive battery drain and/or wake time due to unconstrained alarms/wakelocks. I prefer to go after these pups at the source which mitigates the need for Amplify. Click to expand... Click to collapse EDIT (2017-04-14): A few weeks ago, I decide to no longer use Amplify as @Davey126's philosophy quoted above and below makes sense to me. Meanwhile, I'm able to fully concur to his deductions and conclusions. Davey126 said: I'm certainly no expert but take a different approach to wakelock management after spending am embarrassing amount of time with Amplify and similar tools. I don't limit anything that does not contribute to unwanted wake time and associated battery drain. That reduces the number of candidates from hundreds to a handful. From there I target the app/service/function vs going after wakelocks. For example I disable Firebase Analytics vs limiting/blocking the associated WLs. Currently enjoying 0.2%/hr idle drain will LTE, WiFi and location service on 7x24. Haven't used Amplify in months. Greenify and native Doze are my power management tools of choice on Android 6 w/Xposed. Also use MyAndroidTools and SD Maid to rein in a few rogue services and broadcast receivers. The rest is pure stock. Bottom line: the vast majority of wakelocks are benign. It's the receiver that determines what actions, if any, will be taken. Click to expand... Click to collapse
Power Nap Please allow me to phrase from [GUIDE][26-07-2016]Extreme Battery Life Thread(Greenify+Amplify+Power Nap) by @[I]v7[/I], as I couldn’t explain it better: “Power Nap for Xposed is the SONY's stamina mod for non-Sony devices. When your screen is off, Power Nap maximizes your device's deep sleep time by stopping services, alarms and wakelocks from waking the device when the screen is off. You can get notification from the apps you've whitelisted.” The application itself is still available here:; however, the corresponding XDA thread [MOD][APP][XPOSED][4.1+] Power Nap for Xposed - Sony's Stamina Mode for all devices! by @waylaidwanderer currently seems not to be very active because waylaidwanderer didn’t contribute since nearly April 2015 anymore. Anyhow, the application does its job from my point of view, and I amended this post by some screenshots of my applications on the whitelist. EDIT (2016-10-22): @waylaidwanderer is back on air. EDIT (2016-11-03): I was wondering if PowerNap really has an influence on the battery drainage of my device. For this reason, I uninstalled PowerNap and observed the power consumption for about two days. Attached is last night's idle dump. Actually, I wasn't able to detect any difference to the times when PowerNap was installed. I know my device is more than idling when asleep but this is due to my personal objectives; however, even without PowerNap I got a drainage of (in my opinion) only 1.1%/hour. My decision is now: I don't re-install PowerNap 'cause I don't require applications I don't benefit from in some way - less apps, much better.
AppOpsXposed AppOpsXposed is a permission manager on Android, and by that you’re also able to deny permission to “keep awake” of e.g. Google Play Services, Google Services Framework, and other applications; However, I again suggest to look into the recommendations at [GUIDE][26-07-2016]Extreme Battery Life Thread(Greenify+Amplify+Power Nap) by @[I]v7[/I]. Actually, I used AppOpsXposed to re-check and to modify my advanced privacy settings of the ROM if required. The application is available via its thread [Xposed][MOD][1.30.3] AppOpsXposed - AppOps for 4.3+ “[Xposed][MOD][1.30.3] by @caspase.
Spare #1
Spare #2
Spare #3
Wow and again wow!! :good: Congrats and many thanks for the time you spent and the effort you did for such a contribution, the thread and the posts. And also thanks for what you do and did for our beloved i9305 in this thread and all in all the other threads you participate. Thanks!! :good:
rodman01 said: Wow and again wow!! :good: Congrats and many thanks for the time you spent and the effort you did for such a contribution, the thread and the posts. And also thanks for what you do and did for our beloved i9305 in this thread and all in all the other threads you participate. Thanks!! :good: Click to expand... Click to collapse I'm surprised how many thanks you had available. Getting slightly embarrassed now; however, I believe it's my duty to share my experiences like so many others do on XDA. I learnt incredibly much from them. Superb community. Anyhow, I not only guess - I know as soon as my wife left the hospital and is back home, I won't and actually don't want to spend the same amount of time at XDA as I did in the past.
You are welcome and all my best to and for your wife and you. Enjoy your life together and when she is back home and you find the way back to xda from time to time, we would appreciate it.
Wow, great thread! I'll be following this closely as I can only get 1.5 hours of SOT max with my current setup.
thanks man....apreciate
carlitobahsoun said: thanks man....apreciate Click to expand... Click to collapse If you like it I don't mind you'd hit the thanks button in the lower right corner of the OP and/or the post(s) helpful to you. rodman01 said: You are welcome and all my best to and for your wife and you. Enjoy your life together and when she is back home and you find the way back to xda from time to time, we would appreciate it. Click to expand... Click to collapse You won't definitely lose me. I get so much out of XDA and its great community; you made such a great tool out of my device, and I want to see RR "N" (despite not knowing if or when I convert - RR v5.7.4 Sammy is running so smoothly. Shall I really change a well running engine?) limjh16 said: Wow, great thread! I'll be following this closely as I can only get 1.5 hours of SOT max with my current setup. Click to expand... Click to collapse I'm convinced I'm going to further decrease my battery's drainage as soon as I'm able to modify my objectives: No requirement for 24/7 framework operations (calls, text messaging, email, messenger). And this will occur when my wife is returning home.
Well executed write up with a nice balance of general guidance and specific detail. Thanks for sharing your experiences; should prove a helpful starting point for those seeking tighter control and improved battery life from their devices.
Update of OP OP Updated: Amended post #3 by an idle dump from BBS, and amended post #5 by my Amplify settings. I hope both is interesting to check.
Update of Post #3 Added a remark regarding "net scheduler wakelock" to post #3. EDIT (2016-10-18): Updated post #3 thanks to @Wood Man I've become aware of another thread dealing with "net scheduler" by @spencetj.
Gave all my thanks for today Great guidance, hope i can improve my batterylife and SoT I already followed most threads you suggested but this one sums up everything very nice and easy