Battery/RAM/Speed Optimization Tips for Android Phones - Upgrading, Modifying and Unlocking

I AM NOT RESPONSIBLE FOR ANY NEGATIVE IMPACTS OR CONSEQUENCES ON YOUR PHONE IF YOU SO CHOOSE TO USE THESE TIPS.
I've created a couple threads on the ZTE U950 and LG G2, and one problem is the battery life. The battery cannot come out of these devices and thus we cannot combat this with a bulkier, beefier replacement for heavy usage. Charging constantly is something I try to avoid, so these are a few simple tips that can help optimize your battery life (and that APPLY to ANY PHONE):
TIPS
BATTERY
1a) Buy and download CPU Sleeper (root required). There are two versions, one for dual-cores, and the other for quad-cores. Essentially, when a phone is "sleeping", it is actually still running all its cores, helping drain battery faster. This app turns off all but one core when it is "sleeping" so that your battery is not drained nearly as fast.
BATTERY
1b) To take this step a bit further you can download a free app called Multicore CPU Control. In this app you can control your other cores. You can setup profiles to turn on or off cores, and setup each core with different governors. On my LG G2, I setup a profile to only have one core running at 960MHz (2.2GHz originally) after using the steps from below. If you plan to only run one core, then you do not need to buy CPU Sleeper.
NOTES ON 1b: Multicore CPU Control is the name when installed, it is called CPU Performance Control Free on the Google Play Store (either name will work on Google Play). The program needs to be turned on after each boot. When first setting up a profile save it and edit it in order to manipulate the other cores available. The app does not always apply a profile even if it has already been selected. To turn on a profile, click on the profile desired and go to the CPU Monitor tab to check if it has been applied. If not, repeat the process until it does (it usually takes me about 3 times at most).
BATTERY/RAM
2) Download Greenify (root required), a great free app! Sometimes a user does not have a ROM with a kill all button, so pesky apps just stay on without consent. This app allows a user to turn off any app that may want to run in your background, and even shows you which apps are currently running. Apps like Facebook, Talkatone, etc. can all be stopped even if your "task killer" supposedly took care of them.
BATTERY
3a) Wakelock Detector-Save Battery is a free app that checks for apps that continue to work while the phone is "asleep". While Greenify will display the most troublesome apps, this app will help discover any other apps that are running without consent.
BATTERY/RAM
3b) If Greenify does not show the apps discovered in Wakelock Detector-Save Battery, then download Disable Services (root required). This free app allows a user to disable an entire service, or just parts of a service that are bothersome. Click on a service/app to find out what other services accompany it. Read the accompanying services and discern whether or not the service is needed. A good place to start in this app is to check any service/app that has a blue number next to it.
EXAMPLE 3b: I use the Outlook app a lot, but sometimes it gets annoying with updates for insignificant email. I can open Wakelock Detector-Save Battery and click the Outlook app. I turn off "AppWidgetUpdateService" to disable Outlook email updates. Not all services have obvious names, so be careful on system apps if performing trial-and-error.
BATTERY/RAM
3) Buy and download BetterBatteryStats (CPU Spy Reborn/Plus is FREE and only shows CPU states). This app tells me what CPU States are used the most often and is what I download first before my next step. A user can also determine battery-draining apps and turn those off. If turning off those apps is not possible through Settings>Apps just Greenify them!
BATTERY
4) Underclocking. This is an amazing step for saving battery! If you have ran BetterBatteryStats for at least a day, this will come in handy and is highly recommended. You can use numerous programs like SetCPU or Voltage Control to set the clock of the CPU. The key is to find a point that will still be responsive, yet lower than the maximum.
EXAMPLE 4: For this example I will be using my ZTE U950 and Voltage Control. According to BetterBatteryStats, my most used clock was at 1.2GHz and 860MHz. I left my minimum clock at the lowest possible setting, while my maximum clock I changed to 860MHz. I ran this for a few days and saw a noticeable difference in battery life. Another important part to this if choosing the right I/O Scheduler and CPU Governor. I found the default I/O Schedule ("cfq") to perform the best, despite "noop" being good for sluggish memory. "Powersave" is a good Governor at stock CPU speeds, but it will not get a user the savings of power that a step like this will. I tested with this Governor with this step and got horrible reaction times and would often need to restart the phone. The best results I have are with "ondemand" and "interactive". I am currently using "interactive" with a maximum clock of 475MHz! I arrived at that number after checking my BetterBatteryStats while running at 860MHz and found that to be the next most used clock. Now my battery is lasting about twice as long as it normally did! My phone's response time is a bit slower at this low clock speed, but that can combated...
BATTERY/RAM/SPEED
4b) (IF YOU HAVE INIT.D SKIP TO STEP 4c) My LG G2 is underclocked to 960MHz, as noted in step 1b. I am saving quite a bit of battery, but the UI response can lag a lot at times. The use of boot scripts can be helpful to compensate for this. However, my LG G2 does not have init.d support. There are numerous threads that explain how to get init.d support for a lacking Android phone. The simplest method is to install an app from Google Play. I use one called Init.d-Installer just because it forces the phone to reboot once it has installed; others do not seem to do anything to inform a user if they have received init.d support
BATTERY/RAM/SPEED
4c) Download a script called V6 SuperCharger. The thread may seem daunting, but it is fairly easy to install. Download the newest PDF and change it to TXT. Ensure you have init.d support, BusyBox installed (also in the thread if needed), and SuperSU. Run the script in a free app like SManager with SU permissions and follow the instructions. This script gives the ability to enhance speed and power. I install this in order to ensure my UI stays responsive, and LG G2 runs almost at stock speeds (alongside all my other enhancements)!
BATTERY
5) Undervolting (root required/custom kernel required). This is also a great way to save battery. I decrease the voltage in steps of 25 and test from there. If I find no quirks, I leave it. If I find sluggishness or have random phone reboots, I increase by increments of 25 (or 12.5) until I find something stable.
Most phones will not allow undervolting without a custom kernel. To see whether a phone can undervolt or not download, Sytem Tuner. There is a free and paid (Pro) version of this app, but the free one should be sufficient for what we want to do. After installing, open the app and click on the Voltage settings tile on the left-lower side of the screen. All the phone's CPU MHz steps and the amount of voltage applied to each step can be viewed. At the bottom of the screen are buttons to increase or decrease voltage in 12.5 increments (which will apply to all steps). If the -12.5 button is clicked and the values of all the steps drop, then a phone can undervolt. Additionally, System Tuner allows a phone to manually apply undervolting to each step if wanted.
To test undervolting, just push the decrease button until the phone freezes up. There is no harm to your phone or CPU as neither are being overpowered (just the opposite), and a reboot after freezing will reset the phone to default voltage settings. A - 75MHz drop is normal for a phone while remaining stable; and in a lot of cases -100MHz is achievable.
NOTE: Tips #4 & #5 also can be applied to GPUs.
NOTE 2: One thing that should be mentioned is to be careful about putting more than one app that controls CPU clocks. They can read differently and trump the other when used in combination. Instead, install and use one at a time to get more accurate readings. The same should apply to undervolting apps.
BATTERY/RAM
6) A user can change the Dalvik cache a bit to see if that helps optimize RAM, and possibly battery. I did quite a few tests for these to see how they performed. I think the only reason I noticed any changes immediately is because of how far underclocked my CPU is. Anyways, the best results I was able to get with my ZTE U950 was as follows:
124m - dalvik.vm.heapsize (2nd one, not 1st)
8m - dalvik.vm.heapstartsize
For other phones, these are the items to trial-and-error with:
davilk.vm.heapsize (may be more than one at different values)
davilk.vm.heapstartsize
davilk.vm.heapgrowthlimit (may be more than one at different values)
A user can change these settings by downloading an app like Build.Prop from Google Play. I did notice my battery seemed to drain slower with these changed. The RAM was the best optimized for the self-made tests I performed and was nearly the best in all the tests I had ran. A user may or may not notice any differences unless they multitask a lot.
BATTERY/RAM/SPEED
7) All other well-known methods apply as well:
A. Battery Saver apps/settings
B. Battery Calibration apps
C. Refrain from the use of widgets
D. Automatic Brightness apps/settings
E. Small Screen Times before Screen Sleep
F. Turn Off WiFi and/or Data when not needed
G. Task Killers apps/settings

Related

[REF][SCRIPTS] Android Optimization Tips - i9000 (UPDATED 1/10/12)

Attention!
If you're looking for scripts, here it is:
[CWM][SCRIPTS][TWEAKS] Thunderbolt!
Script Reviews are here:
Script Reviews
Introduction
I've been meaning to share this with the whole Android community. It seems unfair that only the i9000 folks have access to the vast research that I've done so far. Hence I'm sharing this in the general Android thread in hopes that it'll benefit everyone in the long run
A lot of people often asked about how Android really works and the optimizations can be made to their Android to make it perform better in terms of:
- battery life
- raw performance
- GUI smoothness
With Android based on Linux, and with the experience I have with Linux/Unix (I deal with Unix/Linux on a daily basis for my work) I managed to find some tweaks that we can do to optimize our phones.
I also hope that people will experiment with the tweaks posted here and feedback to me if there are certain ways that I'm doing incorrectly or there are better ways than what I've posted here.
Script tweaks
There are a lot of scripts in XDA that specifically uses the optimizations (Linux or Android based) that I will explain below to actually increase performance/battery life. However, you need to know what those scripts do before using it.
I've done some reviews of the script here:
Script Reviews by Pikachu01
There are good scripts that are properly tested and made sure that it works. It's a script by Zacharias maladroit, the kernel dev who makes the platypus kernel for CM7 and snail kernel for i9000. I modded it to be compatible with i9000 and it'll probably do more than some of the scripts I reviewed
From there, I've also taken the liberty of modifying it some more based on my knowledge and research I've done. It's called ThunderBolt!:
LINK
Now onwards to what actually goes on beneath the hood.
Android Governors
Some custom kernels provide customized governors for you to choose. These are currently known:
- Ondemand (CPU scales to the highest frequency immediately after a certain CPU threshold)
- Conservative (CPU scales to the highest or 1 scale lower than that after a certain threshold gradually and scales down if CPU is below a certain threshold
- OndemandX (Has sleep codes that scales down the CPU when device is asleep. Threshold is set to scale slower)
OndemandX
OndemandX has a suspend frequency that it maintains when the phone is sleeping. It does have a known issue of waking up too slowly when a call comes in.
Conservative
Conservative is used when you would like the CPU to scale to the maximum through each frequency slowly before reaching the maximum. It saves more battery at the expense of smoothness. There are a few tunables that can be configured in Conservative governor, namely the freq_step and both the up and down thresholds.
freq_step is a tunable that determines how much frequency (a percentage of the maximum frequency of your device) to increase at each sampling rate. e.g. you have 5 as freq_step and your maximum frequency is 1GHz. At each sampling rate, it'll increase by 50MHz. If your current frequency is 100MHz, it'll increase to 150MHz at the next sampling. What if your device doesn't support 150MHz? This is done by splitting time between 100MHz and 200MHz (assuming your next frequency is 200MHz) so that in average, your phone is performing at 150MHz.
The up_threshold is how much threshold to wait for before increasing the base frequency to the next freq_step. I.e. if it is 80, the CPU will wait until it is 80% loaded before increasing the frequency. The down threshold is the opposite of up_threshold, which is the threshold to wait until the CPU downscales the frequency to the next frequency step.
Ondemand
Ondemand is a governor that basically a simpler version of conservative. One difference is that it scales to the maximum frequency after load has exceeded a threshold. This is usually 80. After that, it looks at the load again when it's at the max frequency. If it's below 80 (example), it'll scale down one frequency step. The frequency step mentioned here is the available frequency step. I.e. if your device has frequencies of 100,200,400,800 to 1GHz then it'll scale down from 1GHZ to 800, 400 then 200 and 100.
One optimization I have for Ondemand for i9000 TalonDev is that I tuned it to be 80 rather than 65. I have not felt any slowdowns from using this setting and it saves a tiny bit more battery. You can experiment on this value however you want, but bear in mind that I'm not responsible for any slowdowns or damage that is caused by it. Read up a bit more on thresholds to know more (Google it).
I/O scheduler tweaks
Another tweak that can be done is the I/O scheduler tweak. Some kernels come with a few standard I/O schedulers while others have extra schedulers that you can choose from. I'll explain the few that I know and if you have more information on the schedulers, you can post it here for everyone to discuss/share
CFQ - Completely fair. Most will come with this, but this is not optimized for android. Some kernels do optimize it and use it.
Noop - Simple and least overhead of all I/O schedulers. Produces the best outcome for some cases and some do swear by it. It's downside is that it is easily bogged down by high I/O transactions.
Deadline - Optimized for mobile-like devices like Android. Also, some do swear by this. If its writes_starve sysfs is tweaked to be fair, it's the same as SIO.
SIO - It's a fair deadline scheduler. It's the best scheduler. Nuff said.
VR - A newer I/O scheduler that places penalty on reverse seeks. Not for flash drives, though the R penalty can be tweaked to be a multiplier of 1. Even if this is done, it has a high overhead.. Read more here: http://www.gelato.unsw.edu.au/IA64wiki/IOScheduling/VRscheduler
BFQ - Too high of an overhead, it is optimized for spindle disks.
You can pick and choose from Voltage Control or other UV/OC apps and apply it immediately to feel the difference.
Here's my assessment of all the schedulers that I know:
SIO> NOOP> Deadline > VR > BFQ > CFQ
NOOP is a simple I/O scheduler without overhead that tries to do each I/O transaction as it comes (FIFO). When a group of transactions is detected, it will try to merge it together to make batches of transactions (makes the whole transaction faster). NOOP doesn't have starvation detection, hence if an I/O transaction takes a painfully long amount of time, it will still continue to do it rather than switch the CPU into doing something else e.g. GUI interrupts (i.e. scrolling lists, flicking screens). All other schedulers also have the "merge" feature. NOOP is the only one that makes the "merge" feature its only feature.
CFQ is a complex I/O scheduler that tries to determine the address space of the transaction and applies a cost algorithm in that if the address is close together, it will group them up and perform them. It also tries to make the transaction incremental (i.e. reading/writing through address incrementally so that the disk spindle needs to wind down the least in conventional platter hard disks) The problem is, our flash devices have very little delta between reading a far reaching address space (than the one currently being written/read) or a closer one as it doesn't rely on spindle/rotations. Hence, having this costing algorithm adds overhead and slows down the overall transaction. CFQ has a lot of algorithms to make sure each process gets a fair slice of time on I/O transcations. Too much overhead.
Deadline has a starvation detector and is simple enough that it doesn't have all the overhead of doing rotational/costing disks algorithm. However, reads are done 2x more likely than writes as it has a algorithm based on weights in that reads must be done first if both a read and a write is detected. It has a 2:1 ratio of read to write weights coded into the scheduler (that can be tweaked - writes_starved, will include it in the next version of system_tweak). Hence it's not a fair scheduler.
SIO is Simple I/O that tries to implement a NOOP type scheduler that has starvation detection. Hence, long I/O transactions will be preempted and given CPU time only after other faster transactions are completed, guaranteeing smoothness. Also, it doesn't have overhead of calculating costs. Also, it has a fair number of writes to read, guaranteeing that all transactions are equal.
BFQ has a lot of algorithms to make sure each process gets a fair slice of bandwidth (Budget Fair Queueing). Too much overhead.
V(R) tries to make sure that each transaction has a weight associated with it, being R. And if the seek is reversed, the R will be multiplied by a penalty making it less likely to be processed. Not for flash drives as reverse seek in a flash drive is just as fast as a forward seek.
In benchmarking tests, the tests normally consists of testing the time it takes for a contiguous I/O transfer from 1 point to another. NOOP excels at that because it won't let itself get interrupted to perform another I/O task. This would mean that in real life testing, NOOP will let a long arduous task to finish while at the expense of UI functionality (you will get UI lags)
SIO on the other hand will perform badly at benchmarking as it gets pre-empted when the contiguous tasks takes more than 0.5secs (for synchronous tasks as benchmarking tools perform a synchronous I/O task from one point to another) to another more important task like UI interrupt (when you're scrolling) or Kernel interrupt (when your kernel needs to perform garbage collecting or swap memory etc)
The 0.5 secs can be tuned in the SIO tuneables though, but I would think 0.5 secs for synchronous tasks and 5 secs for async tasks is pretty good to maintain a balance between long/short tasks enabling a smoother experience in Android.
LowMemoryKiller
The LowMemoryKiller is a constant debate between more free RAM and more multitasking capabilities as free RAM (more than 60MB free) is actually wasted RAM. The fact is SGS only has a puny amount of RAM left after a few big chunks are allocated to the Graphics, Modem, Sound and Video (and some others that I do not know a lot about). With that knowledge, Samsung decided to give the SGS SL a bigger amount of RAM when they released it ( about ~650MB of RAM read that from somewhere, can't remember).
The LowMemoryKiller is actually a feature in the Android OS for better memory management.
You can read about it more here:
http://forum.xda-developers.com/showpost.php?p=5442369&postcount=1
This is an important feature due to the perennial problem of having low free memory causing lagginess and slowness in launching apps. When you have free memory lingering around the number of 40MB or less, the Android OS just lags like hell.
What this would mean is, you would want to tweak the LMK to not have the situation of it having less than 40MB (or even close to that).
The modern Linux machine in the Android ecosystem relies on a mechanism called Low Memory Killer (LMK) to consistently free up RAM. This is due to Android's internal mechanism of caching apps (and never fully exiting them) when you press the back button. This is to enable faster app switching and provide a seamless experience for apps usage model. Android also, by itself will also constantly look for often used apps to cache them for faster app opening. This will happen even before your system fully boots.
Now, when you mention LMK, the most obvious thoughts that come up are minfrees and Out Of Memory (OOM) groupings. Yes, those two are integral parts when it comes to LMK. The issue here is that no one actually mentioned that there are two LMK systems in Android, that being:
- Linux LMK
- Android Dalvik VM LMK
Both are separate entities that kills/removes app/dalvik cache from RAM when RAM reaches a certain level.
What confuses most people (including me) is that the OOM groupings of both mechanisms have the same names being (Android 2.3 based):
LMK App Categories
FOREGROUND_APP: Your apps in the foreground, being used currently, interfacing with the user.
VISIBLE_APP: Visible app that is still viewable by the user, but not interacting with the user, example could be apps that reside in the status bar, and giving live information i.e. Os monitor graphs.
PERCEPTIBLE_APP: App that the user can still perceive i.e. Music app that is playing music.
HEAVY_WEIGHT_APP: RAM heavy apps that are not being interacted with, but will be a pain to load if its information is cleared in the memory.
SECONDARY_SERVER: App that acts as a secondary server. Not sure what this really means, but client-server thingy but secondary? Could be something that syncs with an app, but is not syncing currently?
BACKUP_APP: App that is currently making a backup (like Titanium backup?)
HOME_APP: Your launcher.
HIDDEN_APP: An exited app that still significant residual memory in the RAM. Exited only some time ago, or is constantly used by the user.
EMPTY_APP: An exited app that only has small remnants of residual memory in RAM. App that is exited quite some time ago.
Take note that this is my understanding of the OOM groupings. If there are mistakes, please correct me
Tuning LMK
Both the LMK and Dalvik VM has this groupings and they can be tunable by using prop and lowmemorykiller/parameters/adj respectively.
One errata about this is that the Dalvik LMK has one extra tunable which is CONTENT_PROVIDER, which affects widgets that are not currently refreshing or displaying information. The ADJ (which I will explain later) is not available to be tuned though. And it is clearly missing from the Linux LMK.
The ADJ is the so-called priority of the app categories, with 0 being the highest (should not be killed) and 15 being the lowest (should be the first to be killed). I haven't seen values other than 0-15 but I have a feeling that the numbers are arbitrary, and can be extended up to 65535, but who would want to do that since they're only 9 app categories
LMK are specified by pages, with memory = 4 * pages.
e.g.
4096 pages represents 16MB RAM (16 *1.024)
From the Linux LMK source code, the parameters can be adjusted as such:
Code:
* For example, write "0,8" to /sys/module/lowmemorykiller/parameters/adj and
* "1024,4096" to /sys/module/lowmemorykiller/parameters/minfree to kill processes
* with a oom_adj value of 8 or higher when the free memory drops below 4096 pages
* and kill processes with a oom_adj value of 0 or higher when the free memory
* drops below 1024 pages.
Take note that the oom_adj so far takes only 6 values (although I am confident that it can take more than that). Haven't experimented enough to validate that, but I shouldn't need to as assigning different oom_adj should be a given for all the app categories. This is to make the LMK intelligent enough to determine which app to kill first rather than grouping different app categories into one priority, in which a lot of popular LMK settings that devs provide do that.
And for the Dalvik LMK, my understanding is that it will remove all dalvik caches of <INSERT_APP_CATEGORY_ADJ> or higher if free RAM/pages reaches the level specified.
Hence, two things are learned here:
- Linux LMK will kill an app category of that particular RAM level or higher if free RAM drops below a certain level e.g.
Hidden_APP has a minfree of 16384 pages. If pages fall below this level, Empty_App will be killed first, free pages is recalculated, then if RAM is still below that, Hidden_Apps will be killed next.
- Dalvik LMK will clear all dalvik caches in RAM of all the App category if free RAM reaches the level e.g.
SECONDARY_SERVER_MEM is 8192 pages. When RAM reaches 8192 pages, all SECONDARY_SERVER caches are cleared.
Best Practices
Now, how do we tweak both so that it is efficient in doing its job, i.e. LMK.
From my experiments I can safely say that:
- Below 60MB free RAM you will feel lag 5-10% of the time.
- Below 52MB free RAM you will feel lag 5-15% of the time.
- Below 46MB free RAM you will feel lag 15-20% of the time.
- Below 42MB free RAM you will feel lag 20-50% of the time.
- Below 36MB free RAM you will feel lag 100% of the time.
The experience of lag increases exponentially from 60 down to 36MB. Hence, the LMK should be tweaked against that.
Also, it is considered best practices to group oom_adj settings of Linux LMK with the Dalvik LMK as when free RAM drops to that level, both the Linux LMK and Dalvik LMK will work together to free up at both sides.
The 6 oom_adj that can be tuned for Linux minfree also need to be tuned correctly, failing this would make the LMK too aggressive/under aggressive in mid levels (even if your EMPTY_APP is aggressive, if your oom_adj is selected incorrectly, you'll get to a point where memory leak occurs).
Talon LMK - This is obsolete, TalonDev is using ThunderBolt! LMK from 0.5.x
Take for example, the Talon default LMK setting where:
LMK_ADJ is 0,1,2,3,7,15.
It's EMPTY_APP is 15
It's HIDDEN_APP is 5
It's HEAVYWEIGHT, SECONDARY and BACKUP is 3
Last three values of MINFREE is 4096, 9216, 12288.
Where's the issue here? If you noticed it congrats.
If you didn't, here's the issue:
The minfree 12288 is tied to EMPTY_APP which has a OOM_ADJ of 15.
The minfree 9216 is tied to nothing but has a OOM_ADJ of 7
The minfree 4096 is tied to HEAVYWEIGHT,SECONDARY and BACKUP with the OOM_ADJ of 3.
The LMK_ADJ is important as it represents the checkpoints where the Linux kernel will check for minfrees and kill them. Here's a situation:
Memory is below 12288 pages, OOM is triggered and Linux looks for EMPTY_APP to kill and kills all of them. Job done. Memory is back to >12288 pages.
After a few days, memory is below 12288 pages again, OOM kills all EMPTY_APP, but free memory is still lower than that. It sees if the next checkpoint is fulfilled, which is 9216 pages, and yes memory is still below 9216 pages. It looks for an OOM_ADJ of 7 and above to kill, but fails to find any as 7 and above OOM_ADJ only consists of EMPTY_APP.
Here comes the quandary. The next checkpoint is 4096. We're not ever going to reach that as you'll need memory to fall below 16MB, and at that time it'll be super sluggish to even support GUI. Hence BAM, memory leak or lag or something.
Supercharger LMK 512HP - Multitasking
Let me just paste this to avoid a lot of retyping
Code:
FOREGROUND_APP_ADJ=0
VISIBLE_APP_ADJ=4
PERCEPTIBLE_APP_ADJ=2
HEAVY_WEIGHT_APP_ADJ=5
SECONDARY_SERVER_ADJ=6
BACKUP_APP_ADJ=7
HOME_APP_ADJ=1
HIDDEN_APP_MIN_ADJ=8
EMPTY_APP_ADJ=15
FOREGROUND_APP_MEM=1536
VISIBLE_APP_MEM=3072
PERCEPTIBLE_APP_MEM=1024
HEAVY_WEIGHT_APP_MEM=10240
SECONDARY_SERVER_MEM=10240
BACKUP_APP_MEM=15360
HOME_APP_MEM=1024
HIDDEN_APP_MEM=15360
EMPTY_APP_MEM=25600
LMK_ADJ="0,4,6,8,14,15"
LMK_MINFREE="1536,3072,10240,15360,20480,25600"
A few things here:
It's EMPTY_APP and HIDDEN_APP is too large, 80 and 100MB respectively, but the 80MB is a false flag hence it doesn't really matter if you tweak that and you can get a very minor degree of multitasking because of this false flag. I'll get to that in a moment.
It's PERCEPTIBLE_APP has higher OOM_ADJ than VISIBLE_APP (odd selection, but RAM rarely goes below 40MB before it starts lagging like hell) People would reboot their phones when it gets to that, but it rarely gets to that for this configuration as LMK is pretty aggressive here.
Now, it's LMK_ADJ is "0,4,6,8,14,15"
15 is EMPTY_APP,
14 is nothing
8 is HIDDEN_APP - it looks like it'll only kill HIDDEN_APPs when it reaches 60MB, with HIDDEN_APPs being the heavy hitter of apps as most apps will end up in this category. Hence why multitasking is still doable (to an extent) but an aggressive LMK means taking a call or switching to a browser will kill your game (losing saves). Inconvenient, but it works for some people who haven't played a long game without saving and never took a call in between. Imagine the horror LOL!
Juwe's RAM Script
Code:
if [ -e /sys/module/lowmemorykiller/parameters/adj ]; then
echo "0,1,2,4,6,15" > /sys/module/lowmemorykiller/parameters/adj
fi
if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
echo "2560,4096,5632,10240,11776,14848" > /sys/module/lowmemorykiller/parameters/minfree
fi
No OOM_ADJ are given, hence the stock ones are in effect here.
From init.rc, this is the stock 2.3.5 OOM_ADJ.
FOREGROUND 0
VISIBLE, PERCEPTIBLE 1
HEAVY_WEIGHT, SECONDARY_SERVER, BACKUP 2
HOME 4
HIDDEN_APP 7
EMPTY_APP 15
This one also suffers from the false flag of the 2nd last minfree not being used. It will start killing HIDDEN_APP at 40MB, which is usable (you'll only get lags 15-20% of the time, and most probably after long usage). Other than that, it's pretty stable.
Misc
There are a few known scripts that tweaks the LMK as well as the app priority (yes, the priority of the process categories can be changed too by using setprop.)
Supercharger is one of them:
http://forum.xda-developers.com/showthread.php?t=991276
Take note that Talon doesn't permit Supercharger to be used (it will override it when booting through boot scripts) as Talon itself uses its own LMK settings that are optimized for ZRAM/Swap.
Kickasskernel script is also included in Supercharger. The script will clash with Zach's script in ThunderBolt! too as both of them tries to set different values for the same settings.
Note that Zach's script doesn't tweak LMK settings as i9000 Talon doesn't permit it. With that, if you're using Zach's scripts, you would need to find other ways of tweaking the LMK. Using Auto Memory Manager is good. You can download Supercharger, look at the presets and apply it using Auto Memory Manager. The preset is the only thing important here
LMK App Category Priorities
Using setprop, there is a way to set the priorities of the category. Since, app categories are different, I can only offer one recommendation: The HOME_APP_ADJ.
This prop setting sets how high of a priority your launcher is. A 1 or 2 is sufficient to make sure your launcher doesn't get killed. However, do you really want it to be on 1 or 2. Based on the previous article (LMK/OOM), you would know that OOM priorities are comparatively based on one another. Setting it 1 or 2 in stock 2.3.5 values would basically override PERCEPTIBLE/VISIBLE app priorities. Do you want your launcher to be killed only after your keyboard/music player to be killed? You decide
Journaling/Barriers
This has been a touchy subject here in XDA for most people who debate about it. Most recently, the SAS/Acid tweaks included a way to disable journaling on these partitions:
/system (System is read only, it's safe to remove journaling. However, you will not see speed increase by removing it as you're not writing onto /system 99.99% of the time unless you're using Titanium backup to remove system apps or copying init.d scripts to it)
/cache (Cache can be rebuilt on the fly. Data corruption on it is not game breaking)
/data (All of your data on your phone is here. Removing journaling can risk data corruption. Read more below)
On whether we need journaling or not, I will pose this situation:
Journaling is required to maintain data consistency in events that could lead to data corruption. Data could get corrupted in a number of situations:
- Misbehaving app that constantly writes without syncing/committing data to the disk
- Power loss due to forced reboots or bootloops when data is partially written/committed into disk
Android will normally buffer its writes before committing to the disk. This way, data stays in the RAM before data would only get written into the disk after a period of time. Take note that we as Android enthusiasts seek ways to better our phone to get the most out of it through experimental and sometimes wacky ways. Take OC/UV for example. When we OCed or UVed too much, sometimes our phone will get deadsleep or constant reboots. This leads to corruption if journaling is not turned on. However, we can get corruption too even with journaling but the risk is smaller.
Mount options too, play a role in whether journaling can be safe/unsafe. Most lagfixes will place a "barrier=1" in the /data to make sure that journals are actually committed before an out-of-order write is done. With that, the risk is greatly reduced at the cost of performance. You could experiment by removing barriers and see if it works for you. No guarantees on data if you remove barriers! More info on ext4/barriers:
http://lwn.net/Articles/283161/
http://kernelnewbies.org/Ext4#head-25c0a1275a571f7332fa196d4437c38e79f39f63
If you do disable journaling, make sure to manually run an fsck on your disk. Make sure the fsck binaries are in your binary paths (echo $PATH to show your binary paths). Don't ask how to do this if you're unable to do fsck. It is your own risk that you are disabling journaling/barriers.
One experiencing I would like to relate is this:
I've personally disabled ext4 journaling on my device. After experiencing a sudden power loss (forced reboot), my apps started FCing left and right and device became unstable that it sometimes rebooted when the device is sleeping. In other words, it's a lost case. Reflashing was the only way to restore my phone. This happened 1 day after disabling my journals.
Also note that ext2 is basically an ext4 without journaling. However, ext4 is updated all the time while ext2 source is not updated for quite some time (2 or 3 years?). Most optimizations are already in ext4 while ext2 even without journaling is slower than ext4 without journaling. A comparison of performance:
No journal:
ext4 > ext2
With Journal:
ext2 (can't do journaling in ext2) > ext4 > ext3
Update: Attached is a JournalingOn.zip for i9000 only that you can flash to rejournal your partitions (Only for i9000 devices!). Also attached is Acid Tweaksv6 - Removed Useless Stuff that will disable journaling only for /system and /cache, if anyone is interested. You will need to rejournal first before unjournaling. To be sure that /system and /cache has no journaling and your mounts are applied correctly, type "mount" without the quotes.
You'll be able to see that /data will have:
Code:
barrier=1, data=ordered
/system and /cache will have:
Code:
barrier=0, data=writeback
To be really sure, you can check by using tune2fs included in both the JournalingOn.zip and Acid Tweaksv6 - Removed Useless Stuff.zip.
Copy the tune2fs to /tmp and set rwxr-xr-x as its permissions using Root Explorer/File Expert
Code:
/tmp/tune2fs -l /dev/block/mmcblk0p2 | grep features
You can substitute the /dev/block/mmcblk0p2 (which is /data) to /dev/block/stl10 (/dbdata) /dev/block/stl9 (/system) /dev/block/stl11 (/cache) to check each partition.
Continued in Post #2 - Lack of space
Still posting ...
Question
I guess this is safe too on a deodexed ROM, too freeze those bloatwares u listed?
Page 2
Undervolting/Overclocking
This is also another touchy subject, but more towards people complaining about phones that get forced reboots or bootloops. OCing is done to get better performance on your android. WARNING: Ocing will cause more wear and tear on your CPU and will reduce your CPU lifetime. How much it will reduce it? No one knows. It depends on how sturdy your CPU is, and that cannot be measured by any means. It could be reducing months out of year e.g. 6months out of 3 years? No one actually knows.
UVing on the other hand reduces battery drain especially when you UV your 100MHz as 90% of the time in normal usage, your CPU will idle at 100MHz. How much can it save? No one actually did a benchmark on it. Save to say, UVing does not harm your CPU, it will actually extend the life of it by reducing wear and tear Oh, bootloops do corrupt data if you're without journaling
Always remember to clear your UV/OC settings before flashing another kernel!
Take note that the ability to OC/UV depend on your phone. Some SGS can UV better or OC better and some might not.
On how to UV:
1. You can UV more on the lower frequencies than the higher frequencies.
2. Do a UV for
100MHz with (950-150=800) - Take note that 950 is the base value for the voltage. Some kernels might have changed this value to 925 or 900. This is why clearing your OC/UV settings is important as the OC/UV settings will only load the voltage difference, which in this case -150. If the base voltage is 900 and you do a -150 for it, you'll end up with 750 which might cause bootloops.
3. Limit the max frequency to 100MHz. WARNING: Doing this will significantly slow down your system to a crawl, but it is still running. This is done only to test the stability of your system. You can skip this if you want, but you would need to find a way to stress test your CPU at the 100MHz value (and other values as well by limiting the max frequency). Failing in testing this will result in deadsleeping (as your phone is in 100MHz when you sleep and if you undervolt too much, you deadsleep)
3. Test with RockPlayer (or MX Video Player) and play an RMVB file using software decoding for 10mins. If your settings is unstable, Android will freeze up and reboot. (this is just an example, but I find that this way stresses the CPU to the max. I fail to find another way of stressing it as even playing NFS is stable on some voltages but fails when I play rockplayer. Hence rockplayer is the best way so far)
4. After doing this, remove the limit and move on with the next few frequencies.
The rest of the voltages, just rinse and repeat.
200MHz with (950-100 = 850)
400MHz with (1050-75 = 975)
800MHz with (1200-25= 1175)
1000MHz with (no change)
You can experiment with lesser values than these if you get freezes/bootloops as this is by no means a one size fits all value. Some might think this UV is overly aggressive or some might think that this UV value is too underwhelming.
Mine if you're interested:
Code:
100MHz = -200 (950 base)
200MHz = -150 (950 base)
400MHz = -125 (1050 base)
800MHz = -75 (1200 base)
1000MHz = -50 (1275 base)
As for OCing, you would do the same to test the stability. Just that you will be enabling a higher clock for your L0 frequency (L0 is the highest frequency). Some kernels might add more frequency states i.e. from the 5 states above to 6. You can try using Tegrak OC app too. It all depends on your own experimentation.
Memory Leaks
If you found out that your Android is laggy after sometime and a reboot will make it faster, then you're experiencing memory leaks. "free" is a command to show your currently free memory. It will not necessarily be the same value as your phone's free memory (as it takes into account swaps and buffers)
1. Go to terminal emulator (or download the script at Post #3)
Code:
su <ENTER>
free <ENTER>
This will show your buffers and free memory.
My example:
Code:
total used free shared buffers
Mem: 348548 340280 8268 0 1320
Swap: 163836 47292 116544
Total: 512384 387572 124812
Then do this:
Code:
sync <ENTER>
echo 3 > /proc/sys/vm/drop_caches <ENTER>
Type:
Code:
free<ENTER>
And you'll realize that the buffers will reduce and free memory will increase, like this example:
Code:
total used free shared buffers
Mem: 348548 305212 43336 0 88
Swap: 163836 46804 117032
Total: 512384 352016 160368
That means it's done.
Click to expand...
Click to collapse
If this solves the laggginess problem, it's due to vfs_cache_pressure being too low and dirty_ratio being too high. However, in most cases, you don't have to do this as Linux will manage to clear the RAM in a timely manner as long as there are no apps that constantly hold on to the memory (not releasing it). Hence, only do this when necessary (lagginess and such).
With that, I've updated the system_tweak yet again, with this knowledge by making the VM settings more aggressive, which will trigger the memory leak faster. I made this so, as there's a workaround to clear the caches when it gets full.
Having a low vfs_cache_pressure and a high dirty_ratio will save battery and make your device perform faster at the cost of higher RAM usage.
You can actually automate it by using Script Manager by making a script, pasting the instructions and making a widget out of it. To learn more, read the android market description or the in-help guide in the app.
Some commonly asked questions about drop_caches that were answered by me from flolep:
http://forum.xda-developers.com/showpost.php?p=17727859&postcount=3428
http://forum.xda-developers.com/showpost.php?p=17731938&postcount=3446
http://forum.xda-developers.com/showpost.php?p=17736421&postcount=3450
Checking for Battery Drain/ Saving battery
Starting from Gingerbread, you can't really look for Partial wakelocks anymore to determine what is draining your battery at night. BetterBatteryStats is a way to check for that. It also can provide the process that drains your battery most of the time.
A high partial wakelock usually says that something is waking up your phone at night. With that, checking partial wakelock, you can see if these are the culprit:
-Network Location
-Location Manager Service
If so, disable Lattitude or any location check-in app that you're using. It's checking you in every few minutes that drains the battery.
Disabling Wifi/3G/HSDPA saves battery too. I find that Wifi/Edge drains the least amount of battery when idling. To switch to EDGE as opposed to HSDPA/3G.
Go to:
Code:
Settings > Wireless > Mobile Networks > Network Mode > GSM Only
Disabling "Use Wireless Networks" in location and security would save a little bit of battery too I guess. It's in:
Code:
Settings > Locations and Security > Use wireless networks
CSC
CSC is a folder that defines your APN settings and country/region specific configurations aside from Language/Time that is configured in build.prop(also for Samsung Apps).
Having to manually set your APN is annoying right?
Your product code being KOR by default is another annoying thing to deal with. How do I resolve this?
1. Get your CSC from your own country here: http://forum.xda-developers.com/showthread.php?t=948790
2. Extract from the zip file /system/csc/<folder> (where <folder> is your Country's CSC)
3. Use Root Explorer/File Expert to copy it to the phone's /system/csc/.
4. Use nitrality to change your product code. WARNING: This will wipe all your data.
Odexed vs Deodexed
I've been using Deodexed ROMs since I first flash my custom ROMs. One gripe I have is that I seem to have lost the stock smoothness/speed that I experience when I'm using a stock ROM. I found out that deodexing actually extracts the customization files back to the APK (using APK manager) and Odexed files are actually done to optimize the speed of those files itself.
The only reason ROM chefs are using deodexed files is that it is easier to theme. There is no need to decompile the odex files and make the changes as all the theme files are in the APK themselves.
Only other reason that I know of is the overscroll glow. Odexed files can't support it. However, that is a small price to pay for speed/smoothness that I am willing to sacrifice.
Busybox
Busybox is required to perform all of your superuser activities in your android phone. There are some problems associated with this when ROM developers decide to use a certain version of Busybox that are incompatible with the binaries that we use in our phones. When you found out that after changing your kernel/ROM:
- You still have superuser and Titanium Backup still works but,
- Root Explorer/File Expert can't copy files correctly to the /system after mounting rw
- Voltage Control/ Pimp My CPU/ Control Freak/ SetCPU cannot create the Svolt_scheduler file in /etc/init.d
You have a clashing busybox version issue. This can be remedied by:
- Installing the busybox installer from the market
- Installing busybox 1.17.x into /xbin
- Removing all other busybox binaries from your binary path. (This is optional if you found out that after installing busybox, everything works. Try it first before removing) To know your binary path, do an
Code:
echo $PATH
Nandroid Backup
Nandroid Backup is done in recovery (VolumeUp + Home + Power). In recovery, choose Backup And Restore. What it does is it backs up your:
- Boot
- System
- Data
- Cache
When you restore, you should preferably use Advanced restore and restore the /system and /data. All others can be built from scratch (except /boot). If you're converting from CM7 to Samsung Roms, it's best to start from scratch either ways. Restoring nandroid from any is considered dangerous and not supported by most cases. Best is to use Titanium Backup to backup as it can be restored both ways (only restore app though, restore data sometimes can lead to FCs)
Voodoo Color
Voodoo Color is also a point of contention among users. Some like it and some hate it with a passion. If your kernel does support it, here's a way to tweak it:
1. Tweak the color profiles. Can't see a difference, hence I would just pick Voodoo most of the time.
2. Tweak the gamma first to a comfortable value. I.e. drag the 3 sliders together to a comfortable gamma level. After that, try looking in the gradient (the gray slab below the slider) and try to find for neutral gray values. Adjust each slider until you find a neutral gray (i.e. left and right until you see that slab is truly gray)
3. Tweak the RGB multiplier until you have a comfortable level (3 sliders together). Then tweak it the same by referring to the gradient until you're comfortable.
4. Switch off your display for a while and look at your surroundings to reset your eyes. Then turn on your screen again and see if its too green/yellow/blue etc. Adjust the gamma/RGB multiplier until you're satisfied.
This might take a few rounds of testing, but in the end you'll be truly satisfied with it
i9000 Specific
i9000 Kernels - In Depth
You will need to have a stock odexed (why odexed? read a few passages below)ROM with root. You can easily do this by flashing stock XXJVS 2.3.5 and then flashing a custom kernel through Odin like:
- Dark Core - Uses Voodoo initramfs
- CF-root - Uses CF-root initramfs
- Semaphore - Uses CF-root initramfs
- Midnight - Uses Speedmod initramfs
- Galaxian - Uses CF-root initramfs
- Voodoo - Uses Voodoo initramfs
You can flash the custom kernel through Odin by placing the tar file into the PDA section and pressing Start. At this point, do not convert your partitions to ext4 (lagfix) unless you're using a Voodoo based initramfs as Voodoo based initramfs will convert your partitions to ext4 automatically at first boot.
After flashing a custom kernel through Odin, you will gain root. From there, you can choose to use any other custom kernels that use CWM to install or stick with the custom kernel that you've flashed through Odin like:
- TalonDev - Uses Voodoo initramfs
- TalonSH - Uses Voodoo initramfs
There are other kernels as well, but since I did not stress test them, I will not include them here. This thread lists the full repertoire of custom kernels that you can choose from:
http://forum.xda-developers.com/showthread.php?t=1196704
On which custom kernel to pick, you're advised to look at the individual threads original post as well as the last 5 pages of the thread to know about its stability and features. I pick TalonDev myself as it has compache as well as the latest upstream (kernel updates from the Linux OS as well as the official Android Open Source Project/AOSP and optimizations) patches.
At this point, you should decide if you would want to convert to ext4 (lagfix) or not. Your phone by default will reside in an RFS system. The RFS at this point in time is pretty stable and its performance can easily match ext4. Too bad Quadrant scores are bad for RFS, but who cares about Quadrant anyways. I myself choose to use ext4 as the TalonDev kernel has a lot of ext4 upstream patches that optimizes the usage of ext4 on Android.
If you're using Voodoo initramfs, you'll be converted to ext4 automatically.
If you're using CF-root initramfs, you will require the CF-root ext4 app to convert that can be found here:
http://forum.xda-developers.com/showpost.php?p=12651371&postcount=7
Note that on some kernels that use CF-root initramfs, the ext4 app will warn you that you're not on CF-root type kernels. Ignore this warning. You'll be able to convert to ext4 anyways unless you're on Galaxian. Certain Galaxian versions (since the kernels are not versioned, I can't tell which versions are not working) will bar you from converting to ext4 using the ext4 app. If that is the case, just flash CF-root, convert to ext4 and then flash back to Galaxian.
Also not that CF-root based initramfs kernels will remove your bootsounds on first boot. Don't be alarmed by this.
In terms of which lagfix is better (Voodoo vs CF-root lagfix), I can't tell at this point in time. Both are equally good. Since TalonDev uses the Voodoo initramfs, I am inclined to use the same when I am using the same kernel. That should be a good yardstick to follow.
BIGMEM/ Non-BIGMEM:
Some kernel developers released BIGMEM versions of their kernel:
-TalonDev BIGMEM
-TalonSH BIGMEM
-Semaphore bm version
The only difference a bigmem kernel can bring is more memory at the expense of 720p video recording. Playing a 720p video is still possible. Recording it is not on a bigmem kernel. Bigmem kernels normally have 13MB more than their non-bigmem counterparts. How this 13MB could affect you? It depends on the apps you use and how aggressive your LowMemoryKiller is.
XXJVT System apps
System apps can be frozen/removed to make your system faster/less battery draining.
In order to remove/freeze system apps, you would need Titanium Backup (Pro) or System Tuner.
The choice whether we want to remove or freeze the system apps should now be decided. Titanium Backup Pro and System Tuner uses a built in Android mechanism to freeze your system apps - PM disable. PM disable will actually disable the app from the system itself. It will not drain the battery or even launch itself. It is a safer way so to speak. Removing will physically delete the APK app from the system freeing up disk space. If you decide to remove, make sure to have a backup before proceeding. Even if you have a backup, restoring from Titanium Backup may sometime fail. Hence, do this only if you're sure you want to remove that certain app. Freezing an app will make it easier to defrost without any consequences.
Here are the apps that I disabled:
Code:
AngryGPS > Used to manually configure GPS. Not needed if GPS works OK.
BluetoothTest
Buddies Now
lcdtest
screencapture > Screen capture app
Daily Briefing
Days
EncryptApp
Factory Test
Gallery -> I use QuickPic as a replacement. It's faster than Gallery.
Google Partner Setup
Google Search > Google search widget
Home screen tips
HTML Viewer
Market Feedback Agent
Market Updater > I froze this to avoid being updated to Market 3.0. It currently sucks now
Mobile tracker > Mobile tracker, only if you use it, then keep it
Mobile tracker settings > Mobile tracker, only if you use it, then keep it
Perso
PhoneSetupWizard > Required if you're first booting/installing the ROM, not needed afterwards
PopupuiReceiver
Press Reader
Print via Bluetooth
RoseEuKor
Samsung Account
Samsung Keypad -> I use Swype beta instead
Self Test Mode
Service mode
SimDetachNotifier > Will notify you if you detached your sim card. Seems pointless
SNS > Only necessary to sync your contacts if you're using Social hub to do so or syncing calendar from Facebook
SNSAccount > Same as above
Social Hub
Software Update
Synchronise
TwLauncher -> Using Go Launcher Ex instead
wipeoutreceiver > Wipe if phone is stolen. Not needed if you don't use the Samsung service
WlanTest
wssyncmlnps
There are others that you can remove as well. I'm hoping to gather feedback on the other APKs that can be removed and what will be affected by its removal. Please post if you have more information
Disabling Lagfix
Most ROMs would advice you to disable lagfix before flashing a new ROM. Although this is not necessary in most cases (as all Gingerbread kernels support ext4 from the get-go) moving from one kernel to another might need it (to optimize the initramfs it is used on). Hence if you're swapping from one kernel (that has a different initramfs) to another. It is adviseable to undo the lagfix.
CF's lagfix can be undone by using the ext4 app.
Voodoo lagfix can be undone by using the Voodoo Control App.
Speedmod lagfix can be undone by using it's recovery.
Odexed ROM
You might say, hey if I'm using stock, I'll be missing extended power menu, battery percentage and all other theme mods that are not in the stock ROM. Fear not, you can get all these back including Gtalk2, CRT screen off etc here:
$omator's stock+
Gtalk2
There are odexed themes too, in which the developers would decompile the odex files into APKs, make the changes then compile the APKs into odex files again. It is more tedious than deodexed themes but odexing generally makes the phone smoother
You can find the themes here:
http://forum.xda-developers.com/forumdisplay.php?f=666
WIFI Issue on JVR/JVS/JVT
You might be facing some wifi connectivity issues on JVR/JVS/JVT ROMs i.e. it disconnects every few seconds.
This is due to some changes in the ROM that doesn't permit a "Forever" lease time from your modem. Change your lease time to an hour (or two) or if you don't have that option, remove your address reservation option from your modem (Yes, it's a modem only tweak, nothing you can do on your phone)
Memory Freak
Memory Freak is an app in TalonDev that tweaks the ZRAM/Swap and LMK settings. There's a golden rule to the ZRAM/Swap that is:
Swapping to and from the ZRAM will be slower if the amount of ZRAM is more than 50% of the total usable memory, . Hence, I set mine to 160MB (from the 340 total usable RAM). Swappiness in most Linux machines is 60. This means, the system will be inclined to swap in/out more than just using the RAM. I set mine to 50 as a personal preference so that there would be 50% chance that the system will use swap or RAM.
HiddenApp is the amount of free memory to be when LMK starts looking for hiddenapps to kill. I set mine to 52 for my multitasking preference. Experiment with it to see how much multitasking vs smoothness you're looking for. My preference will change in time. Check my signature for the most updated ones.
WIP:
This is obviously a work in progress article that will undergo changes as the Android scene improves. I will spend time to make edits and additions to the post whenever I see fit. Sometimes I will post changelogs at the end of the thread, sometimes I won't if I only make minor edits. Just be sure to check back often to see any new tips offered
Credits:
I claim no credit on these findings except for the ones that I've researched on my own. However, all of it is not of original work since I form my own opinions after reading a lot. I also don't claim that the settings I posted are the most optimal there is. It might not even work well for most of you guys. The key here is tweaking it to your own perfection as there is no setting that will cater to everyone's needs. Hence the real people who deserve credits are:
* All the devs' kernel/apps that I posted here
* XDA forum
* Google
Attention!
If you're looking for scripts, here it is:
[CWM][SCRIPTS][TWEAKS] Thunderbolt!
Script Reviews are here:
Script Reviews
GUIDE UPDATES
UPDATE 1/10/12
* Edited some sections with some new knowledge that I have. A few places, can't name them all Check them out and see if you can spot them.
UPDATE 10/19/11
* Moved around some guides and grouped them together
* Updated some guides to make them more Android centric (as opposed to i9000 centric)
UPDATE 10/18/2011 - Added an indepth article about LMK/OOM. CTRL-F for LMK.
UPDATE 10/12/2011
* Added some comments on the apps removed/frozen so that you can make an informed choice of why the apps can be removed/frozen.
* Added my analysis of most schedulers that I know of and why they are good/bad.
* Moved the scripts to ThunderBolt!: LINK
* Added a guide on the wifi issue for JVR/JVS/JVT
UPDATE 10/1/2011 - Moved the script reviews to this post LINK
UPDATE 9/23/2011:
* Removed the JournalingOn.zip and Acid Tweaksv6 - Removed Useless Stuff.zip because people might use it for devices other than the i9000. This is because in other devices such as SGS4G, the /dev/block/stl10 is /data while in i9000 it's /dbdata. The JournalingOn.zip will not enable journaling on /dbdata without some editing. Hence, I removed it as I don't have a time to put up a warning or notice, and didn't have time to edit the script inside the zip file.
* Readded an edited JournalingOn.zip and readded the Acid Tweaksv6 - Removed Useless Stuff.zip (did not change) to the first post. Only for i9000 devices!!
* Added another way to check if you're journaled or unjournaled. Check the guide below.
* Added some more explanation on common scripts I found.
* Moved the guides around due to lack of space. I added some minor changes to most of the guides. See if you can detect them
Helpful!
pikachu01 said:
Yes it is safe to remove for a deodexed ROM too
My point of stating odexed is that my tweaks can be used from the stock odexed ROM itself
Click to expand...
Click to collapse
oh ok, now I understand, thanks for this thread, very helpful indeed .
Awesome post thanks!
Not only for the tips but for teaching me a lot too!
Sent From My Android Shizzle!
thx dude!! awesomely useful!!
Great information thanks
Can you please include GPS tweaks as well?
awesomeandroid said:
oh ok, now I understand, thanks for this thread, very helpful indeed .
Click to expand...
Click to collapse
Thank you for reading it.
SkinBobUk said:
Awesome post thanks!
Not only for the tips but for teaching me a lot too!
Sent From My Android Shizzle!
Click to expand...
Click to collapse
It was my hope that it will give knowledge so that people could pass it on to more people
midikarma said:
thx dude!! awesomely useful!!
Click to expand...
Click to collapse
Thank you
ajazz said:
Great information thanks
Can you please include GPS tweaks as well?
Click to expand...
Click to collapse
Thank you for reading it What kind of GPS tweaks? There are a few notable ones. The most useful ones are disabling AGPS as well as updating the gps.conf. Do you mean that?
Oh man... Thx for your work... This thread is very useful.
I take my hat off.
Sent from nobody knows where
Wonderful job, pikachu01! A new user will need weeks, maybe months to gather all the bits of info you put here, served on a silver platter! Thank you veeeery much.
Mods, this should be stickied!
demonstone said:
Oh man... Thx for your work... This thread is very useful.
I take my hat off.
Sent from nobody knows where
Click to expand...
Click to collapse
Thank you
ZioGTS said:
Wonderful job, pikachu01! A new user will need weeks, maybe months to gather all the bits of info you put here, served on a silver platter! Thank you veeeery much.
Mods, this should be stickied!
Click to expand...
Click to collapse
Thank you Zio I forgot to add a few more posts to reserve. I guess I will add links if I do have any other things to add
Indeed lots of good info here for people just starting out, and some for people like me who've been around the block once or twice too!
I figured out how to do the CSC change myself, I just put the BMC folder from stock ROM into /system/csc and used one off the CSC selector apps from the market. Is this much different from the instructions here?
Since this has brought up the topic of freezing apps I will ask a question here if I may: Is there a way to keep apps from starting services, without getting rid of them? For example I use Skype and Facebook but I don't want their services running all of the time sucking up memory. Also I notice now that I game I installed recently (E Warriors) is running a service! WTF this is out of control. Any ideas?
haloimplant said:
Indeed lots of good info here for people just starting out, and some for people like me who've been around the block once or twice too!
I figured out how to do the CSC change myself, I just put the BMC folder from stock ROM into /system/csc and used one off the CSC selector apps from the market. Is this much different from the instructions here?
Since this has brought up the topic of freezing apps I will ask a question here if I may: Is there a way to keep apps from starting services, without getting rid of them? For example I use Skype and Facebook but I don't want their services running all of the time sucking up memory. Also I notice now that I game I installed recently (E Warriors) is running a service! WTF this is out of control. Any ideas?
Click to expand...
Click to collapse
Yes, the CSC instruction does the same thing. I'm just a bit thorough sometimes
You could use System Tuner or Titanium Backup Pro to freeze the app and then unfreeze it when you want to use it. Freezing is actually just doing a PM disable. PM disable basically makes Android think that the app is gone when it's actually still there. Unfreezing an app is basically just 1 click, hence its hassle free.
ZioGTS said:
Wonderful job, pikachu01!
Mods, this should be stickied!
Click to expand...
Click to collapse
Agreed +1
Excellent & informative
Awsome post pika.. Great work.. thx
Very nice tutorial. Should be pinned
Sticky please (with sgs chlorine).
Great work, much appreciated.
Sent from my Galaxy S using XDA Premium App
pikachu01 said:
Thank you for reading it.
It was my hope that it will give knowledge so that people could pass it on to more people
Thank you
Thank you for reading it What kind of GPS tweaks? There are a few notable ones. The most useful ones are disabling AGPS as well as updating the gps.conf. Do you mean that?
Click to expand...
Click to collapse
I have tried lot of Roms and none gave me satisfactory GPS performance except InnOvaTioN v2 by bezke,this Rom gave me almost instantaneous gps lock , when under partial cover it took a minute or so !
Then i moved on to v3 and was back to square one!
unfortunately v2 is no longer available for download.
I have tried Faster Fix, Gps Aids, tried changing setting through sgs tools but no go.
even tried different modems.
ajazz said:
I have tried lot of Roms and none gave me satisfactory GPS performance except InnOvaTioN v2 by bezke,this Rom gave me almost instantaneous gps lock , when under partial cover it took a minute or so !
Then i moved on to v3 and was back to square one!
unfortunately v2 is no longer available for download.
I have tried Faster Fix, Gps Aids, tried changing setting through sgs tools but no go.
even tried different modems.
Click to expand...
Click to collapse
well, then open a thread on general, Q&A, etc.
and let someone upload it
hopefully there are still copys of it out there
so there's a way to analyze and understand what was done to get those great results
@pikachu01:
great work on collecting all of this information & putting it in a central place !
*subscribes*
+1 for sticky
Very nice guide. It'll be very helpful for begginers. +1 for the idea to stick it

[Guide]Using OC/UV Beater for overclocking

This guide on how to use the OC/UV beater app that is used to control my overclock daemon that is included in some roms, and is flashable here for advanced users : http://forum.xda-developers.com/showpost.php?p=21253167&postcount=38 . If you cant find the app, unfortunately its not available in market but installable here: http://forum.xda-developers.com/showthread.php?t=1207546
First of all you need to make sure that any apps like setCpu or other overclocking apps are uninstalled not just disabled. Once this is done you need to reboot for it to take effect.
In the app you will normally have 3 tabs, these can be used to create different profiles. You can set a profile name if you like or just leave them.
You then have 6 dropdown menus for the overclock settings, 3 for each phone state. Your phone has 2 states, awake and asleep, asleep is when the phone is screen off and nothing too cpu consuming is running in the background and awake is for any other time. When you open the app for the first time the will say !set this is normal.
For each state you have a governor, min and max setting. When choosing a governor dont choose smartass as this does not work properly with the daemon (see below for why). Personally i use the normal on demand for awake and conservative for a asleep. Other governors can be used though depending on your preference.
Next you set your frequencies. Normally for minimum its safe to choose the lowest value unless you are having issues. As for the awake maximum choose what ever is the highest your phone runs stable at, or if you dont know, try out the one above your current speed. For asleep maximum either choose the minimum again or the one above (message to all kernel devs- try and enable a speed around 120mhz for maximum battery life).
Now we want to test these speeds out to see if they work, hit save, then temp activate. Now use your phone for a while, preferably trying a few intensive apps. When you are sure its stable use perm activate to set it on boot.
This should be enough for most people, but the app has a couple more features like profile switching based on battery state and ill leave you to work them out if you want as they are fairly self explanatory.
About the smartass governor: this governor was designed to switch maximum speeds based on phone state like screen on and off however the daemon does this for you if you set it correctly and will conflict with each other.
For some reason, I can't set anything except the govs (and they both show the same possibilities - there is no "conservative" for sleep) the rest just says !set and it's the only possibility there is.
Is it the app or is my problem ROM-specific?
Using TurboFire beta 6 ROM
barzhdu said:
For some reason, I can't set anything except the govs (and they both show the same possibilities - there is no "conservative" for sleep) the rest just says !set and it's the only possibility there is.
Is it the app or is my problem ROM-specific?
Using TurboFire beta 6 ROM
Click to expand...
Click to collapse
Looks like its rom specific the app is rock solid normally. I think that the daemon config has gotten messed up in the mix of roms so ill try and see what is breaking it.
I cant seem to get the 460800mhz freq stable no matter what voltage i set. Is there a way to delete that crequency from ever being used, and how?
Works like a charm altho it seems the cm7 kernel does not support UV only OC or might be just me not understanding the UI. Antway i ll play around with it alot cuz so far it seems to ne runing alot better an utilising all freq properly.
Sent from my Wildfire S using xda app-developers app

[How to] Improve battery life

I'm new here & making this thread in order to share my own experience plus what I've learned from others since there're a lot of concerns regarding battery life.
Followings are what identified as the most power consumption sources and we'll fix them 1 by 1:
1. HD screen: I usually set the display brightness manually to about 15-20%. It is quite acceptable as I almost stay indoor at day time (surely this will make your screen nearly blind at this level if you try it outdoor under sunset)
2. Duo core 1.5GHz CPU: Having your CPU at this speed makes your phone soooo hot for heavy tasks. I use SetCPU to set the speed to 1188Mhz max and 192MHz min and also use SetCPU to enable the Screen Off profile where the max & min speed both set to 192MHz (there're no reasons to run it at high speed when the screen is off, right?).
3. The stock home launcher: I found the stock launcher (called LG Home) always takes a high portion of battery so I replace it with Go Launcher. This app also has a nice feature where you can see and close all running programs so you won't have to install another task killer.
4. Bloatware: Firstly, install Titanium Backup and "Freeze" whatever bloatware you found in this list (thanks youngv408) including the LG Home but only after you install & use Go Launcher. Secondly, install Gemini App Manager, at its home screen you will see running apps, for each of them that you don't want them to autorun (no more running in background & no more auto restart if you kill it), tap on the app name > choose More Operation > Config "Autorun" (root) > disable all of its autorun options (don't ever disable or freeze the Go Launcher if you are using it!)
Above tips keep my boy easily survive 1 day with 50% battery left (with 5,6 phone calls, some SMS, some 3G for web & downloading and little gaming). Hope they help.
All good tips, thanks!
Some good suggestions except for maybe #2. Personally, I found SetCPU had a dramatic negative effect on my battery life. Uninstalling it netted me several more hours with average usage immediately. Also, don't use task killers other than the built-in features of Gingerbread to kill a misbehaving app. The OS already does a good job managing running apps. Turn off GPS because some apps like to ping your current location occasionally and GPS uses a lot of juice. Finally, make sure apps like Facebook, Twitter, Google Plus, Google Currents, Gmail, etc. aren't set to sync too frequently.
Malnilion said:
Some good suggestions except for maybe #2. Personally, I found SetCPU had a dramatic negative effect on my battery life.
Click to expand...
Click to collapse
+1
According to battery use info smaller cpu clock resulted in more cpu total time usage
This battery gets better everyday... never had this experience with another phone.
Weird is, that after i no-bloated and did some tweaking in the beginning, the batterylife was still very disappointing. It seems that it is growing with the user...
we can turn off wifi or 3g if we don't use them,so we can extend the time

Possible simple fix to Multitasking and battery life help - worked a charm on my D3

This may be of great use - it was to me on my Droid 3 and I noticed weird settings posted on here in HTC's default Build.prop that explain IMO the memory Issues people are perceiving.
Multitasking can easily be fixed in build prop by editing the corresponding values (I assume, not tried it yet but I've seen the values in the prop.). Some of the default HTC settings baffle me. Or use RomToolbox by JRummy - its easy and works on Boot. You can also edit lowmemorykiller using this app, I always start on mild and take off about 6 megabytes on the bottom 3 categories.
Ive not rooted yet but on my D3 (512mb ram) I used dirty ratio 70% (HOX default is 0%....!) Dirty background 90% (Hox default is 30%) and vfs cache pressure 10. Hox default is 100. This makes android flush the cache less often, saving battery and eliminating stutter (uses CPU time and I/O to flush the cache), keeps apps in background ram leaving you where you left off and doesn't negatively impact on battery life or degrade performance over time (reboots every couple of days can't harm though). I've no idea why the HOX's default settings are so aggressive - unless they thought users might get an errant app, leave it running and complain when they dont know why the battery is draining... oh and kill OOM allocating task was also a yes (can't remember if you set that to 1 or true in build.prop but there's a checkbox on Romtoolbox for it).
On my Droid 3 with the above settings, I could infinitely multitask (VM Heap of 48mb - but on HOX you could easily double that for more tabs in browser etc) and my battery gained a perceived time of about an hour at least - maybe more, due to the apps always remaining open and CPU time not having to be used reopening them and redrawing the past state they were in because theyve been pushed out of RAM.
I researched the above for ages looking for and testing the best combinations online when I had my D3 (even with 512mb ram Moto's settings were way less aggressive than HTC's are at default) and made sure they wouldn't cause lag over time, or loss of performance over time - as well as providing optimal battery life.

[How to]--->Simple Guide to Better Battery Life

Battery Life on a SmartPhone - The Riddle, The Enigma
I have been asked to port my original Battery Guide over to the SGS3 threads, so here it is in all it's glory.​
This thread was also recently featured on the XDA Portal. Thanks to Haroon Q. Raja for the write up.​
Attaining 20+ hours of battery life is not only possible it is totally attainable with most phone configurations. The secret to making this happen is, understanding what are the contributing factors are and knowing what to do first.
This guide will help. After reading this guide, you will be able to understand how to end power eating culprits and answer those same questions we see over and over in the threads...... that is .... solving the passive battery drain and get the 20 hours of battery life we all want and desire.
As we all know, all Samsung Galaxy S 3's and their Chipsets are not created equal. So if something works for one person and not the other, then is it a software, hardware or human error. Chances are it is a combination of all three. Hopefully this can slim those down a bit and answer some questions that you might have or have seen. I have tried to get almost everything I can think of and put it in one place.
You can click on the Post # below and it will take you directly to that post if you wanted to skip some things (although I don't know why you would want to do that)
Post 1: Tips and Tricks
Post 2: Roms/Kernels, OverClocking/Undervolting, Governors & I/O Schedulers
Post 3: Memory Management
Post 4: Apps (for your download pleasure)
Post 5: Proof
I will be using satirical stories and anecdotes to get my point across below. Not meant to offend or point fingers at anyone. I am just using real life references to get to the point. Also I am not much for fancy colors. I tried it at the top here but not so much further down. If there is something specific I want to call attention too, I will BOLD it and maybe RED it too.
This is not a GUIDE to get better battery life but rather a GUIDEline to get it. What is the difference, you say? A Guide is a step by step process that you must/should follow to get the outcome that the person who created it wanted you to get [A+B+C+D should = E]. A Guideline is more of a recommendation that allows some choice or flexibility in the understanding, execution or use [A +B-(C+D) can = E].
TopShelf10 has this to say about getting the most out of your battery life
the problem is, people want to believe that they can save battery without changing their usage habits. this simply is not possible. no rom or kernel will realistically do this for you. if you remove 1 brick from a bag full of 15 bricks, the bag will be lighter, but still very heavy. you need to download "spare parts" or "process monitor" from the market and start analyzing the way your apps are acting. also look into data syncs that are happening in the background. apps that stay open behind your back/what they are doing 9an app called "autostarts" can prevent apps from self-running under certain scenarios). animation speed. polling for notifications. gps. wifi scans. overclocking. cpu/ram usage. proper sleep. widgets. brightness. 2g/3g. data usage. call time. text volume. - THESE are the things that really affect your battery life.
bottom line is, if you truly want to save battery you are going to have to get your hands dirty...there simply isnt a one-click (or one-flash) solution.
Click to expand...
Click to collapse
Below is a list of fundamental things that can be done without rooting or custom ROM/Kernels. (Standard disclaimer applies: You use it, you set it and you are responsible)
1. Be Realistic -
Do you really think that you can get two whole days out of your battery? If you do, then you must have a very important pile of papers it is sitting on to not even pick up your phone for that long. These are phones. These are mini-computers. These are arcade games. And they want, dare I say, need to be played with, talked on or downloaded to. USE YOUR PHONE.
2. Syncing –
I know you are very important and you need to know what LeBron is doing right now, just in case you get a cup for a coffee and he might be in Starbucks at the same time and you get your picture taken with him and upload it to Facebook, Twitter or Google+. That is fine and I applaud you for it and will probably download the picture and Photoshop myself in your place. This is not the problem. Syncing your accounts is. That is what is causing battery drain. Do you really need to have your FB widget (see widgets section) streaming all day long? Does Kim K.’s endorsement of a potato chip really affect your everyday life? I doubt it. Kill them (not LeBron or Kim K. but rather the auto-syncing). Every time you “friend” someone their numbers, contact info gets sync’d to your phone. Also, there are settings in Facebook, Twitter and Google+ that you can upload pictures instantly. Don’t do that. Once you do, it is out in the Ether-World and just swallowed a bunch of battery doing it too.
Settings>Accounts and Sync>Auto-sync>uncheck it
3. Widgets –
They look cool. But widgets are nothing more than RAM and battery hungry monsters that you purposely put in your home screen. Think about it. What does a widget really do? All it really does is monitor an app that you have running. So not only is it running and taking up battery and RAM but the app that it is linked to is running in the background al’ a Facebook, Twitter, Google+, CNBC, MSNBC, BBC,… the list goes on and on because they want us to put THEM on our home page.
What a great marketing campaign the widget is.
“Hey look at me new home screen”
“Cool. Hey what widget is that?”
“Oh, it is X”
“Nice, I’ll have to download that tonight when I get home” and then and there they have you and your battery.
4. Apps –
You have to pay attention to your apps. I repeat. You have to pay attention to your apps. Especially if they run in the background. This can be anything from a harmless .99c game to a monster like Live Wallpaper. The battery drain threat is twofold here because the app is running in the background but it could also be using its anonymous data collection abilities and sending that back to the Mothership. Ever wonder why you have a 4/3G with up and down arrows in your status bar when your phone is just sitting there? This is because some app is transmitting data, whether you are using it or not. There are apps in the market that monitor these situations like Watchdog or kill the data link when the lock screen is enabled like Juice Defender (see Apps below) or you can adjust app permissions like LBE Privacy Guard. Data transfer is #2 on the What Kills My Battery list.
5. Display/ Wifi/ Airplane Mode/ Animations/ Location –
Display:
#1 when it comes to what is eating your battery. Always has been and always will be. Accept it and try to do something about it. This part is easy. Just lower the brightness. You can use Auto or set it as a brightness that is low but you are still able to see well enough to function. Live Wallpapers fall into this category. They are cool to look at but static ones take up less RAM and also less display because they are not running all the time in the background. These screens are bright at 100%, so tone it down. (see Apps below).
WIFI:
Another helpful tip is setting your WIFI sleep policy to Always. This can be done by going here Setting>Wireless>WIFI> Menu key>Advanced>WIFI Sleep Policy and set it to Always.
--->Then you can also do this Build.Prop edit as well (this is if you are Rooted, of course)
Allows your wifi to scan less, saving more battery:
wifi.supplicant_scan_interval=240 (I have mine set to 420)
Airplane Mode Toggle:
DocHoliday77 has this very helpful trick regarding Airplane Mode and how it effects your Data/Battery life.
I generally suggest toggling Airplane Mode on/off as a recommended step before running data speed tests, and to help with signal strength.
When you move from one area to another, generally your phone will automatically switch to another tower as the signal/connection to the current tower degrades. This is perfectly fine while travelling since you are not in a single location for very long. The problem comes into play once you have reached your destination. For many people, when they get home from work, for example, their phone will remain connected to the last tower they switched to on their drive home. However, there is very often a tower closer to their home that can provide better signal. The phone does not automatically switch to the better tower because it is still close enough to the current one to have adequate signal. By toggling Airplane Mode on/off, when the radio turns back on it will search for the strongest signal and will now connect to the closer, better tower!
Stronger signal will directly translate to a better battery. The better your signal, the less power is consumed for ALL radio operations (Including Cell Standby, Data, and Voice)! When the signal is weak, the radio requires more power to transmit to the receiver (the tower), which translates to higher battery use.
Toggle Airplane Mode on then off again to force the phone to connect to the best possible tower.
Animations: Set Settings > Display > Animations to .5 animations.
Location:
As pointed out by Arlanthir if your device is broadcasting your location, then you may need to rethink whether or not that is good for you and your battery. Generally, your location is based off GPS, Wifi or Mobile Networks. If these are on, then battery drain is occurring. Sometimes you need your location to work with Maps, Google Now, but most of the time, it is because of the unholy trinity, Facebook, Twitter and Google+. I mean, how do you think you "Check-In' at places right?
If you don't utilise these types of features on those three, then go into Settings>Location and untick them. Now there are also other apps like MLB At-Bat and the like that require location for blacked out games or services based on your location. I find that there is always a toast in those applications that notifies me and allows me to turn then on as needed. Then when I am done, I can turn them off.
These are 5 fundamental things that you can do to help reduce battery drain and get some more life out of your phone. Anyone can do these. All you have to do is watch your phone and use some common sense. “Why does my battery drain after only 6 hours? All I was doing was checking Facebook.” Do you really need to be on Facebook for that long of a time? I doubt it. How many services do you have running? How many tasks do you have running? (Android does a good job of shutting down tasks on its own, but if you are using a task killer, it takes more juice to start up an app than to turn it back on, so to say.) Think of it like an airplane. Takes more fuel to get up in the clouds, but once you are up there, it is pretty much coasting along with way less burn.
*******************
A special thanks to DocHoliday77 for convincing me to port this over and also for some of his helpful tips as well. You know who he is, so hit his thanks button to show your appreciation for all he does for this community.
ROMs are key things to think about when it comes to battery life. They can be fully established and working fine, can be RCs and still in development or they can be Alpha/Betas and completely experimental or just beginning. Choosing the best ROM or Kernel is going to depend on what YOU want out of your phone. Do you want a stable 4.0 ROM that has great battery life but not the customizability as MIUI or CM10 or AOKP? Because we have so many versions of 4.0.x ROMs that are official and almost all the sources have been attained, they have been Optimized to their fullest and some outstanding tweaks have really brought them to the forefront in daily drivers. Again, the choice is up to you.
Kernels go hand-in-hand with your ROM. Does the kernel support Overclocking or Undervolting. How much RAM and what tweaks are included in the kernel? Does THIS kernel work with THAT ROM? These are all spelled out for you in the OP of each kernel (and ROM) for you to find out. Read them because if you don’t, you’ll bork your phone and then your next post will be, “Help. I Bricked my phone”.
Overclocking/Undervolting –
If you don’t already know what Overclocking is, well it is pretty much self-explanatory. You can Overclock your CPU above the clock-speed that Samsung, T-Mobile governed it at. This can be done with apps like SetCPU (here and here and CPUtuner,…Generally have to be ROOTed to do these but if you are flashing ROMs and Kernels then you probably already are. UnderVolting is basically what it sounds like too. You are Undervolting your CPU to conserve battery.
This can be one of the best ways for a more advanced user to save battery. Overclocking is great to see those really cool Quadrant scores. Wow!!! But it also ramps up the battery drain, as well as temperature which can shorten your battery’s TOTAL life. If you want to Overclock to 1.8-2.1 just to see what you score on Quadrant or SmartBench, then do it for that time. Most ROMs/Kernels run stable and smooth at or about 1.2-1.6 with minimal effects on battery (as long as you do tweaks in above post). If you decide to Undervolt you can use Pimp My CPU, Voltage Control, SetCPU,... to do this but take care to step it down slowly until you find the right settings for you or you will see random reboots or phone freezes and those suck trying to diagnose.
***Please note that whether you Overclock or Undervolt, do NOT “Set on Boot” until you know that they are going to work. Otherwise if it doesn’t work and your phone randomly reboots, you will get into a boot cycle (not a bootloop) because you put them in “Set on Boot”. You must test before you should do this.***
Example scale of OC/UV setting from Ktoonsez' thread:
[KERNEL][TMO][AOSP/Touchwiz][JELLYBEAN & ICS][10/31/2012] KT747 - LJ7 - KTweaker
Stock___________________Undervolt startoff point___________________jerrygooch
Mhz - mV___________________Mhz - mV___________________________Mhz - mV
1890 - 1300___________________1890 - 1300____________________________1890 - 1200
1809 - 1275___________________1809 - 1250____________________________1809 - 1150
1728 - 1250___________________1728 - 1200____________________________1728 - 1100
1674 - 1200___________________1674 - 1175 ____________________________1674 - 1075
1512 - 1200___________________1512 - 1200 ____________________________1512 - 1075
1458 - 1187___________________1458 - 1187 ____________________________1458 - 1050
1404 - 1187___________________1404 - 1187 ____________________________1404 - 1050
1350 - 1175___________________1350 - 1175 ____________________________1350 - 1025
1296 - 1175___________________1296 - 1175 ____________________________1296 - 1025
1242 - 1150___________________1242 - 1150 ____________________________1242 - 1000
1188 - 1150___________________1188 - 1150 ____________________________1188 - 1000
1134 - 1125___________________1134 - 1125 ____________________________1134 - 975
1080 - 1125___________________1080 - 1125 ____________________________1080 - 975
1026 - 1075___________________1026 - 1075 ____________________________1026 - 925
972 - 1075____________________972 - 1075 _____________________________972 - 925
918 - 1050____________________918 - 1050 _____________________________918 - 900
864 - 1050____________________864 - 1050 _____________________________864 - 900
810 - 1025____________________810 - 1025 _____________________________810 - 875
756 - 1025____________________756 - 1025 _____________________________756 - 875
702 - 975_____________________702 - 925 ______________________________702 - 825
648 - 975_____________________648 - 925 ______________________________648 - 825
594 - 950_____________________594 - 850 ______________________________594 - 800
540 - 950_____________________540 - 850 ______________________________540 - 800
486 - 925_____________________486 - 850 ______________________________486 - 800
384 - 925_____________________384 - 825 ______________________________384 - 800
192 - 900_____________________192 - 825 ______________________________192 - 800
Governors and I/O Schedulers
Governors and I/O schedulers also have a huge impact on how your CPU regulates.
Here is about everything you need to know about them from Recognized Contributor droidphile from his thread:
[REF][TWEAKS] Kernel Governors, Modules, I/O Schedulers, CPU Tweaks, AIO App Configs .
If you haven't checked out his thread do yourself a favor and do it. A vast amount of information. Be sure to hit his THANKS too.
Governors
I) MANUAL:
These are the 19 governors we're talking about.
1) Ondemand
2) Ondemandx
3) Conservative
4) Interactive
5) Interactivex
6) Lulzactive
7) Lulzactiveq
8) Smartass
9) SmartassV2
10) Intellidemand
11) Lazy
12) Lagfree
13) Lionheart
14) LionheartX
15) Brazilianwax
16) SavagedZen
17) Userspacce
18) Powersave
19) Performance
NOTE: Info on Samsung's own multi-core aware governor - Pegasusq is here
1) Ondemand:
Default governor in almost all stock kernels. One main goal of the ondemand governor is to switch to max frequency as soon as there is a CPU activity detected to ensure the responsiveness of the system. (You can change this behavior using smooth scaling parameters, refer Siyah tweaks at the end of 3rd post.) Effectively, it uses the CPU busy time as the answer to "how critical is performance right now" question. So Ondemand jumps to maximum frequency when CPU is busy and decreases the frequency gradually when CPU is less loaded/apporaching idle. Even though many of us consider this a reliable governor, it falls short on battery saving and performance on default settings. One potential reason for ondemand governor being not very power efficient is that the governor decide the next target frequency by instant requirement during sampling interval. The instant requirement can response quickly to workload change, but it does not usually reflect workload real CPU usage requirement in a small longer time and it possibly causes frequently change between highest and lowest frequency.
2) Ondemandx:
Basically an ondemand with suspend/wake profiles. This governor is supposed to be a battery friendly ondemand. When screen is off, max frequency is capped at 500 mhz. Even though ondemand is the default governor in many kernel and is considered safe/stable, the support for ondemand/ondemandX depends on CPU capability to do fast frequency switching which are very low latency frequency transitions. I have read somewhere that the performance of ondemand/ondemandx were significantly varying for different i/o schedulers. This is not true for most of the other governors. I personally feel ondemand/ondemandx goes best with SIO I/O scheduler.
3) Conservative:
A slower Ondemand which scales up slowly to save battery. The conservative governor is based on the ondemand governor. It functions like the Ondemand governor by dynamically adjusting frequencies based on processor utilization. However, the conservative governor increases and decreases CPU speed more gradually. Simply put, this governor increases the frequency step by step on CPU load and jumps to lowest frequency on CPU idle. Conservative governor aims to dynamically adjust the CPU frequency to current utilization, without jumping to max frequency. The sampling_down_factor value acts as a negative multiplier of sampling_rate to reduce the frequency that the scheduler samples the CPU utilization. For example, if sampling_rate equal to 20,000 and sampling_down_factor is 2, the governor samples the CPU utilization every 40,000 microseconds.
4) Interactive:
Can be considered a faster ondemand. So more snappier, less battery. Interactive is designed for latency-sensitive, interactive workloads. Instead of sampling at every interval like ondemand, it determines how to scale up when CPU comes out of idle. The governor has the following advantages: 1) More consistent ramping, because existing governors do their CPU load sampling in a workqueue context, but interactive governor does this in a timer context, which gives more consistent CPU load sampling. 2) Higher priority for CPU frequency increase, thus giving the remaining tasks the CPU performance benefit, unlike existing governors which schedule ramp-up work to occur after your performance starved tasks have completed. Interactive It's an intelligent Ondemand because of stability optimizations. Why??
Sampling the CPU load every X ms (like Ondemand) can lead to under-powering the CPU for X ms, leading to dropped frames, stuttering UI, etc. Instead of sampling the CPU at a specified rate, the interactive governor will check whether to scale the CPU frequency up soon after coming out of idle. When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks. If the CPU is very busy between exiting idle and when the timer fires, then we assume the CPU is underpowered and ramp to max frequency.
5) Interactivex:
This is an Interactive governor with a wake profile. More battery friendly than interactive.
6) Lulzactive:
This new find from Tegrak is based on Interactive & Smartass governors and is one of the favorites.
Old Version: When workload is greater than or equal to 60%, the governor scales up CPU to next higher step. When workload is less than 60%, governor scales down CPU to next lower step. When screen is off, frequency is locked to global scaling minimum frequency.
New Version: Three more user configurable parameters: inc_cpu_load, pump_up_step, pump_down_step. Unlike older version, this one gives more control for the user. We can set the threshold at which governor decides to scale up/down. We can also set number of frequency steps to be skipped while polling up and down.
When workload greater than or equal to inc_cpu_load, governor scales CPU pump_up_step steps up. When workload is less than inc_cpu_load, governor scales CPU down pump_down_step steps down.
Example:
Consider
inc_cpu_load=70
pump_up_step=2
pump_down_step=1
If current frequency=200, Every up_sampling_time Us if cpu load >= 70%, cpu is scaled up 2 steps - to 800.
If current frequency =1200, Every down_sampling_time Us if cpu load < 70%, cpu is scaled down 1 step - to 1000.
7) Lulzactiveq:
Lulzactiveq is a modified lulzactive governor authored by XDA member robertobsc and is adapted in Siyah kernel for GS2 and GS3. Lulzactiveq aims to optimize the second version of luzactive from Tegrak by a) providing an extra parameter (dec_cpu_load) to make scaling down more sensible, and b) incorporating hotplug logic to the governor. Luzactiveq is the first ever interactive based governor with hotplugging logic inbuilt (atleast the first of its kind for the exynos platform). When CPU comes out of idle loop and it's time to make a scaling decision, if load >= inc_cpu_load CPU is scaled up (like original luzactiveq) and if load <dec_cpu_load, CPU is scaled down. This possibly eliminates the strict single cut-off frequency for luzactiveq to make CPU scaling decisions. Also, stand hotplug logic runs as a separate thread with the governor so that external hotplugging logic is not required to control hotplug in and out (turn On and Off) CPU cores in multi core devices like GS2 or GS3. Only a multi core aware governor makes real sense on muti-core devices. Lulzactiveq and pegasusq aims to do that.
8) Smartass:
Result of Erasmux rewriting the complete code of interactive governor. Main goal is to optimize battery life without comprising performance. Still, not as battery friendly as smartassV2 since screen-on minimum frequency is greater than frequencies used during screen-off. Smartass would jump up to highest frequency too often as well.
9) SmartassV2:
Version 2 of the original smartass governor from Erasmux. Another favorite for many a people. The governor aim for an "ideal frequency", and ramp up more aggressively towards this freq and less aggressive after. It uses different ideal frequencies for screen on and screen off, namely awake_ideal_freq and sleep_ideal_freq. This governor scales down CPU very fast (to hit sleep_ideal_freq soon) while screen is off and scales up rapidly to awake_ideal_freq (500 mhz for GS2 by default) when screen is on. There's no upper limit for frequency while screen is off (unlike Smartass). So the entire frequency range is available for the governor to use during screen-on and screen-off state. The motto of this governor is a balance between performance and battery.
10) Intellidemand:
Intellidemand aka Intelligent Ondemand from Faux is yet another governor that's based on ondemand. Unlike what some users believe, this governor is not the replacement for OC Daemon (Having different governors for sleep and awake). The original intellidemand behaves differently according to GPU usage. When GPU is really busy (gaming, maps, benchmarking, etc) intellidemand behaves like ondemand. When GPU is 'idling' (or moderately busy), intellidemand limits max frequency to a step depending on frequencies available in your device/kernel for saving battery. This is called browsing mode. We can see some 'traces' of interactive governor here. Frequency scale-up decision is made based on idling time of CPU. Lower idling time (<20%) causes CPU to scale-up from current frequency. Frequency scale-down happens at steps=5% of max frequency. (This parameter is tunable only in conservative, among the popular governors )
To sum up, this is an intelligent ondemand that enters browsing mode to limit max frequency when GPU is idling, and (exits browsing mode) behaves like ondemand when GPU is busy; to deliver performance for gaming and such. Intellidemand does not jump to highest frequency when screen is off.
11) Lazy:
This governor from Ezekeel is basically an ondemand with an additional parameter min_time_state to specify the minimum time CPU stays on a frequency before scaling up/down. The Idea here is to eliminate any instabilities caused by fast frequency switching by ondemand. Lazy governor polls more often than ondemand, but changes frequency only after completing min_time_state on a step overriding sampling interval. Lazy also has a screenoff_maxfreq parameter which when enabled will cause the governor to always select the maximum frequency while the screen is off.
12) Lagfree:
Lagfree is similar to ondemand. Main difference is it's optimization to become more battery friendly. Frequency is gracefully decreased and increased, unlike ondemand which jumps to 100% too often. Lagfree does not skip any frequency step while scaling up or down. Remember that if there's a requirement for sudden burst of power, lagfree can not satisfy that since it has to raise cpu through each higher frequency step from current. Some users report that video playback using lagfree stutters a little.
13) Lionheart:
Lionheart is a conservative-based governor which is based on samsung's update3 source. Tweaks comes from 1) Knzo 2) Morfic. The original idea comes from Netarchy. See here. The tunables (such as the thresholds and sampling rate) were changed so the governor behaves more like the performance one, at the cost of battery as the scaling is very aggressive.
To 'experience' Lionheart using conservative, try these tweaks:
sampling_rate:10000 or 20000 or 50000, whichever you feel is safer. (transition latency of the CPU is something below 10ms/10,000uS hence using 10,000 might not be safe).
up_threshold:60
down_threshold:30
freq_step:5
Lionheart goes well with deadline i/o scheduler. When it comes to smoothness (not considering battery drain), a tuned conservative delivers more as compared to a tuned ondemand.
14) LionheartX
LionheartX is based on Lionheart but has a few changes on the tunables and features a suspend profile based on Smartass governor.
15) Brazilianwax:
Similar to smartassV2. More aggressive ramping, so more performance, less battery.
16) SavagedZen:
Another smartassV2 based governor. Achieves good balance between performance & battery as compared to brazilianwax.
17) Userspace:
Instead of automatically determining frequencies, lets user set frequencies.
18) Powersave:
Locks max frequency to min frequency. Can not be used as a screen-on or even screen-off (if scaling min frequency is too low).
19) Performance:
Sets min frequency as max frequency. Use this while benchmarking!
So, Governors can be categorized into 3/4 on a high level:
1.a) Ondemand Based:
Works on "ramp-up on high load" principle. CPU busy-time is taken into consideration for scaling decisions. Members: Ondemand, OndemandX, Intellidemand, Lazy, Lagfree.
1.b) Conservative Based:
Members: Conservative, Lionheart, LionheartX
2) Interactive Based:
Works on "make scaling decision when CPU comes out of idle-loop" principle. Members: Interactive, InteractiveX, Lulzactive, Luzactiveq, Smartass, SmartassV2, Brazilianwax, SavagedZen.
3) Weird Category:
Members: Userspace, Powersave, Performance.
I/O Schedulers
1) Noop
Inserts all the incoming I/O requests to a First In First Out queue and implements request merging. Best used with storage devices that does not depend on mechanical movement to access data (yes, like our flash drives). Advantage here is that flash drives does not require reordering of multiple I/O requests unlike in normal hard drives.
Advantages:
Serves I/O requests with least number of cpu cycles. (Battery friendly?)
Best for flash drives since there is no seeking penalty.
Good throughput on db systems.
Disadvantages:
Reduction in number of cpu cycles used is proportional to drop in performance.
2) Deadline
Goal is to minimize I/O latency or starvation of a request. The same is achieved by round robin policy to be fair among multiple I/O requests. Five queues are aggressively used to reorder incoming requests.
Advantages:
Nearly a real time scheduler.
Excels in reducing latency of any given single I/O.
Best scheduler for database access and queries.
Bandwidth requirement of a process - what percentage of CPU it needs, is easily calculated.
Like noop, a good scheduler for solid state/flash drives.
Disadvantages:
When system is overloaded, set of processes that may miss deadline is largely unpredictable.
3) CFQ
Completely Fair Queuing scheduler maintains a scalable per-process I/O queue and attempts to distribute the available I/O bandwidth equally among all I/O requests. Each per-process queue contains synchronous requests from processes. Time slice allocated for each queue depends on the priority of the 'parent' process. V2 of CFQ has some fixes which solves process' i/o starvation and some small backward seeks in the hope of improving responsiveness.
Advantages:
Considered to deliver a balanced i/o performance.
Easiest to tune.
Excels on multiprocessor systems.
Best database system performance after deadline.
Disadvantages:
Some users report media scanning takes longest to complete using CFQ. This could be because of the property that since the bandwidth is equally distributed to all i/o operations during boot-up, media scanning is not given any special priority.
Jitter (worst-case-delay) exhibited can sometimes be high, because of the number of tasks competing for the disk.
4) BFQ
Instead of time slices allocation by CFQ, BFQ assigns budgets. Disk is granted to an active process until it's budget (number of sectors) expires. BFQ assigns high budgets to non-read tasks. Budget assigned to a process varies over time as a function of it's behavior.
Advantages:
Believed to be very good for usb data transfer rate.
Believed to be the best scheduler for HD video recording and video streaming. (because of less jitter as compared to CFQ and others)
Considered an accurate i/o scheduler.
Achieves about 30% more throughput than CFQ on most workloads.
Disadvantages:
Not the best scheduler for benchmarking.
Higher budget assigned to a process can affect interactivity and increased latency.
5) SIO
Simple I/O scheduler aims to keep minimum overhead to achieve low latency to serve I/O requests. No priority quesues concepts, but only basic merging. Sio is a mix between noop & deadline. No reordering or sorting of requests.
Advantages:
Simple, so reliable.
Minimized starvation of requests.
Disadvantages:
Slow random-read speeds on flash drives, compared to other schedulers.
Sequential-read speeds on flash drives also not so good.
6) V(R)
Unlike other schedulers, synchronous and asynchronous requests are not treated separately, instead a deadline is imposed for fairness. The next request to be served is based on it's distance from last request.
Advantages:
May be best for benchmarking because at the peak of it's 'form' VR performs best.
Disadvantages:
Performance fluctuation results in below-average performance at times.
Least reliable/most unstable.
7) Anticipatory
Based on two facts
i) Disk seeks are really slow.
ii) Write operations can happen whenever, but there is always some process waiting for read operation.
So anticipatory prioritize read operations over write. It anticipates synchronous read operations.
Advantages:
Read requests from processes are never starved.
As good as noop for read-performance on flash drives.
Disadvantages:
'Guess works' might not be always reliable.
Reduced write-performance on high performance disks.
Some Kernel Settings from Users out "there" (Note: These are for the SGS3 kernels):
Swifks using LeanKernel (4.3 kernel/4.2 OS):
Swiftks said:
Just thought I'd share my settings:
Governor: InteractiveX
Custom Settings:
go_hispeed_low = 95
screen_off_maxfreq = 486000
Scheduler: ROW
Min: 192 MHz
Max: 1512 MHz
Frequency Lock: ON
MP-Decision: OFF
Multicore Power Saving: 1
GPU Governor: On Demmand
GPU Max Frequency: 480
Voltages:
192 MHz = 775mv
384 MHz = 800mv
486 MHz = 800mv
594 MHz = 825mv
702 MHz = 850mv
810 MHz = 900mv
918 MHz = 950mv
1026 MHz = 1000mv
1134 MHz = 1025mv
1242 MHz = 1050mv
1350 MHz = 1075mv
1458 MHz = 1100mv
1512 MHz = 1125mv
Enjoy
Sent from my SGS III
Click to expand...
Click to collapse
liltitiz from his thread [KT747: Share & discuss your settings]+[govs & scheds info] using ktoonsez' KT747 kernel.
Post is here
liltitiz said:
With my new settings I can get up to 5-6 hour of screen on with a discharging time of around 24 hours. Before I start playing with cpu1, I couldn't get more than 4hours of screen on with a discharging time around 15hours since the Linux 3.4 kernel
Note that I also use greening to hibernate apps and Tasker to turn on things like gps, data, wifi, auto rotate only when I need them.
I readjusted my settings yesterday to test something out if you got no loss in performance yet you can try them out:
Ktoonservative setup to input in ktweaker:
Boost 2nd core on button:0
Boost cpu:540
Boost gpu: doesn't matter
Boost hold cycle :0
Boost turn on 2nd core:0
Cpu down block cycle:0
Down threshold:75
Down threshold hotplug:60
Freq step:3
Ignore nice load:0
No 2nd cpu screen off:1
Sampling down factor:3
Sampling rate: 25000
Sampling rate screen off: 45000
Up threshold:94
Up threshold hotplug:96
---------------------------------------------------
Command lines to apply my asswax settings on cpu1 :
echo asswax > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 135000 > /sys/devices/system/cpu/cpufreq/asswax/awake_ideal_freq
echo 200 > /sys/devices/system/cpu/cpufreq/asswax/down_rate_us
echo 189000 > /sys/devices/system/cpu/cpufreq/asswax/interactive_ideal_freq
echo 95 > /sys/devices/system/cpu/cpufreq/asswax/max_cpu_load
echo 65 > /sys/devices/system/cpu/cpufreq/asswax/min_cpu_load
echo 250000 > /sys/devices/system/cpu/cpufreq/asswax/ramp_down_step
echo 50000 > /sys/devices/system/cpu/cpufreq/asswax/ramp_up_step
echo 81000 > /sys/devices/system/cpu/cpufreq/asswax/sleep_ideal_freq
echo 135000 > /sys/devices/system/cpu/cpufreq/asswax/sleep_wakeup_freq
echo 5000 > /sys/devices/system/cpu/cpufreq/asswax/up_rate_us
---------------------------------------------------
If you set your ktoonservative to turn off 2nd core(cpu1) when screen is off, then it doesn't matter because your cpu1.will be off so only your ktoonservative(cpu0) settings matter. Personally I use 486 as my max freq when screen is off.
Click to expand...
Click to collapse
Before we begin on the below, I must continue something about kernels from above due to character limits in posts.
A word of advice from vikas.mishra via XDA RD dorimanx in this post:
This is long INFO post from real chip designer that help to create CPU/GPU and other chips for the living for 14 years now, so respect
He sent me PM, for now he cant post that by him self.
Vikas is monitoring our thread and want to say his professional stand about UV/OV and why it's works for some and why not for others.
==================
I am calling Vikas(vikas.mishra) to the speech stand
Hello people.
Let me introduce myself - my name is Vikas Mishra and I am a chip designer by profession. .
I have worked on critical parts of design of TI OMAP4, OMAP5, Nvidia Tegra 3 etc and have been doing this for the last 14 years.
Of late - I have seen a lot of folks posting BUGS about undervolting of the GPU/CPU.
I think I can explain what are the possible issues with undervolting/overclocking in a laymans language.
It is a little long winded but I think the length is needed for providing the appropriate context.
* What is inside your Cellphone
Your cellphone is an amazing device. It is a full fledged computer
that fits into your pocket. They have all the standard components
that a computer has - except that they are all usually soldered on
the motherboard directly and are not meant to be user-servicable.
The chief components inside your cellphone are
1. Application Processor (AP)- this is the heart of a modern
cellphone. These are manufactured by many companies - the main
ones are Qualcomm, Nvidia, Samsung and Apple. The other not so
well known ones are made by Texas Instruments, ST Ericsson,
Marvell and Broadcom.
A modern AP has logic to control the camera and process the image
that it generates, to do video encoding (video recording) and
video decoding (movie watching), Audio processor etc. in addition
to the well known CPU and GPU.
2. Power Management Controller - This is the chip that is
responsible for generating and regulating the voltages that are
used by all the components on the board.
3. DRAM - not very different from the DRAM found on a PC (except
that it is lower voltage)
4. Flash - for storage
5. Touchscreen controller
6. Logic for microphone, speaker
7. Battery
One of the most complex piece of circuitry on the phone is the AP
and the power management controller.
* Circuit Basics
A modern AP has millions of circuit units called (Flip
Flops). These flip flops have two parameters associated with them
called Setup time and Hold time. More details on what a flip flop
can be found on the wikipedia at
http://en.wikipedia.org/wiki/Flip-flop_(electronics) . This is a
nice bit of bedside reading if you are interested.
A setup time roughly indicates what frequency you can run a design
or an AP at before it becomes unstable.
A hold time roughly indicates the maximum voltage till which a
design is stable.
A fully technical analysis of what is involved in these timing
parameters requires a degree in electrical engineering but in broad
terms the problem is described below.
Chip designers diligently ensure that all of the millions of the
flip flops in a chip meet the setup and hold time across a broad
range of voltages and silicon parameters. They do a pessimistic
analysis to ensure that a chip will run reliably across a wide
range of voltage/frequency combinations.
However, contrary to the popular belief, chips vary widely in their
silicon parameters. Even chips on a the same wafer and different
flip-flops within the same chip can have widely different silicon
parameters. This is why what works on one particular chip will not
work on the other chip.
Your silicon manufacturer provides a range of voltages and
frequencies across which the device can work reliably. The phone
manufacturer will further narrow down the range depending on the
other components they choose within the phone board.
* How does voltage affect the design
Reducing voltage makes the design slower and increasing voltage
makes the design faster.
So can I keep on increasing the voltage for ever and make the
circuit faster and faster. The answer is no - a point will come when
the circuit will become unreliable. This becomes unreliable because
the "hold time" of one or more of the flops will start
violating.
As you reduce the voltage of the design, the circuit will start
becoming slower. However typically it will continue to work till at
apoint it starts failing - this failure occurs due to violation of
"setup time" of one or more flops in the design.
So what happens when the setup time or the hold time of a design
fails - the answer is that it is unpredictable. Meaning suddenly if
you ask the processor what is the value of 2+2, the answer it will
provide could be unreliable - in some cases it could be 3, in some
cases it could be 4 in some cases it could be -2349783297 (a random number).
I am of course oversimplifying but I hope you get the picture.
* How does undervolting affect your phone processor
The reason undervolting is so appealing to people because they
thing that undervolting will save power and improve battery
life. While this is true in theory, in practice there is a caveat.
It will reduce the power of the chip, but the power consumed by the
phone as a whole will not improve. In some cases in fact it can
deteriorate. Let me explain.
The most power hungry part in the phone is not the AP - it is the
LCD screen. All of these screens consume a ton of power. So even
though your AP is now consuming lesser power, the overall impact to
the phone as a whole is not that much.
If you accompany undervolting with a frequency reduction (which you
should), the total time taken for doing a web page rendering (for
example) would increase. During this time the screen is on and it
has more than compensated for the power that you saved in the
AP.
You could of course come up with examples where this wouldn't
happen - but on a whole, IMHO, you should leave the voltage of the
AP/GPU/CPU to the guys who know the system best - the guys who
designed the chip and people who manufactured it.
* How does overvolting/overclocking affect your phone processor
If you want that last drop of performance from your phone and you
over clock it, at a point some of the design flops will start
violating the hold time and the design will stop working reliably.
Again, in some anecdotal cases this would work - but this is not a
reliable means/mode of working. Just because your friend's or your
first cousin's girlfriend's phone works - doesn't mean yours will
work as well.
* What are the user observable impacts of undervolting/overclocking?
It is hard to say - simply because there are so many of flops in
the design.
In some cases - you wouldn't see anything wrong with the phone
until one day you do. In some cases it will result in a SOD
immediately. In some cases it will result in your phone not waking
up reliably.
IMHO the risks of issues with undervolting/overclocking far
outweighthe potential gains you may get out of it. Usually there
is no lasting damage to the phone/AP if you overlock/undervolt but
it is possible to do it. For example, You run the phone at such a
high frequency that the chip temperature becomes more than what it
was designed for and the Silicon just fails.
So "Just say No" . Don't overclock or undervolt your phone -
leave it to the guys who really understand what they are doing.
Thanks,
Vikas
Click to expand...
Click to collapse
^*v*^*v*^*v*^*v*^*v*^*v*^*v*^*v*^*v*^
Memory Management
Did you know that you can also free up some internal memory space by just basic maintenance? You can install a Cache Cleaner from the market. I use Cache Cleaner NG (root) and CacheMate (root) which will clear your cache for you, Cache Cleaner NG will even clear your cache on your SDcard. Open Root Explorer and if you see a bunch of free floating cache files, those need to go. Wasted space. Small in the scheme of your SDcard, but still wasted.
So here we go (best part is at the bottom though):
Ok so you go into XDA on your phone, go to the themes page and look at what and how people are theming their phones or see some pix of someone's SetCPU profiles. All those develop a cache that takes up space on your phone. Now lets say that you go to the market and look through some apps or update your apps (more on this later). This also generates cache, usually up to 2-4mb. Ever try to download something from the market and it says something like "not enough space". This not needed cache may be some of the reason.
Here are some tricks and apps that some of you may know and also some tricks that I have found that I am sure most don't know about.
SOME GOOD LOW MEMORY APPS:
Cache Cleaner NG and Cache Mate (both root and free-Cache Mate has a paid but the free one works just fine.)
Diskusage (free) ~ This one will show you a graphical version of your /data/apps and also you SD card to show you exactly what is taking up so much space. You can click on that item and hit "Show" and it will take you to the app's page in Manager Applications. It also has a root function too that will allow you to see what is in /system, /cache, /data,…
Some sort of file manager to get to some things I'll mention below. (I use Root Explorer)
SOME MEMORY CLEARING TIPS AND TRICKS:
Home Launcher ~ If you have a 3rd party home launcher, see if it has the ability to long-press an icon to take you to its screen in the Manage Apps section. I use APEX and if you long-press on say Market, it takes me to the same place as is I were to go to Settings->Applications->Manage Apps->Market. Instead of all that, just long-press on the icon and BAM! it takes you there. Here you can clear out your cache for the market or delete the data (if you need to do that). Or clear the cache of the XDA app b/c you looked at too many pix.
Browsers ~ These develop cache that takes up memory and space, especially the stock browser. If you use a 3rd party, you can get the settings to clear cache, cookies, passwords,…on exit. I use Dolphin, but I am pretty sure that most have something like this on them. (side note: most 3rd party browsers once exited will not run in the background unlike the stock one)
Media ~ So you download a bunch of mp3's from the net or click on some pix and save it to your SD card. Or maybe you just felt like wiping your card and having a fresh start. Every time you reboot, you phone will scan media. No big deal, but the more you criss-cross things from PC to phone and back again, it can create a bunch of double files in your media cache on the phone. With the proper placement of .nomedia files (this prevents your media scanner from doing just that, scanning media- i.e. pix, jpegs,…Don’t place a .nomedia in your music, album art or DCIM files**bad).
Every once in a while, I'll hit the Diskusage or go to Manage apps and clear the media cache. Then I got to my file manager and the DCIM->Thumbs and delete the .Thumbnails files (should be 2). Unmount the SD card and remount to start the media scan, pull up the Gallery and wait for the thumbs to come back (depending on how many you have, this could take awhile). By doing this you can get almost 5 mb back if you have a bunch of double scans in your media folder.
AND NOW FOR SOME TIPS THAT MOST COULD NOT KNOW:
LOSTDIR - Lets say that you have your phone plugged into your PC and for some reason you, in a fit of rage, jerk the plug out without unmounting it first. This creates a file that is put into your LOST DIR folder on your SD card. Anytime you don't safely unmount the SD card, it will create a file in that folder. In the scheme of the SD card, it isn't too much, but I don't like having useless items free floating about.
Here is a good explanation of what the Lost.dir is for, seems legit, I buy it.
TOMBSTONES - So you are downloading an update from the market and for some reason your phone freezes and the Force Close-Retry-Wait doesn't work out for you. You have to do a battery pull. Frustrating I know and the memory takes a hit too. Every time you have to do a battery pull because of a freeze up or something of the like, it creates a TOMBSTONE file in /data. These are useless and can be deleted. If you are flashing ROMs and are constantly having to do battery pulls b/c market crashes or an app freezes, then you are creating a Tombstone file.
**Here is where your file manager (with root) will help. Go into /data and scroll all the way to the bottom and open /tombstone. There should be some files in there and depending on how many there are, I could be a nice chunk of wasted memory. Just select all and delete. They are not needed. Your internal memory should go up by doing this.
LOST & FOUND - Same scenario, but now go into /data/ cache or /cache and you'll see Dalvik-Cache (don’t mess with this), Lost & Found and Recovery. If you tried to download an app and it got frozen for some reason and had to do a battery pull, the apk will be free floating in there, uninstalled (free floating radical). You can delete this. While it isn't in the Dalvik-Cache folder, it is taking up space. Once you are able to download something completely and correctly from the market, it will populate into Dalvik-Cache correctly and won't be a free radical, as I like to say.
Useful Apps
These are some apps that will help you get the most of your battery life. I will put a brief descpition of them and you can also click on their names to take you directly to their market link. Note that some of these are ROOT apps and almost all of them also have PAID versions that greatly expand their functionality. Use the free ones and see how you like them and then kick in for the PAID ones if you want. The only one that I really suggest paying for right out of the gate to get the most out of your battery is Juice Defender Plus.
Tasker –
Paid app from the Market. This app is highly technical and not for noobs. Use at your own risk.
I would love for some of you out there to give me your Tasker Battery Saving Profiles. Either put them in the thread here or PM to me directly.
Here is a thread about how it works by brandall:
[TUT] The Ultimate Noob/Beginners Guide to Tasker
Greenify –
XDA Thread is here: READ IT (at the very least, read the OP)
This app is probably one of the best battery saving apps that has come out in quite a long time. It allows you to "Hibernate" apps that are not being used at the time, get them out of the foreground and prevents them from running when not in use, thus eating battery.
It is really easy to use. All you have to do is fire it up, grant Root and then select the apps that you want to "Hibernate". (Note: be very careful what types of apps that you do this with, i.e. /system/apps, as it could cause adverse effects like missed notifications, missed SMS/MMS, misbehaving apps,...you get my point I hope).
Batstat Widget –
I know, I know. Above I said that widgets were nothing more that monitoring apps on your home page, but this one works great, has low memory and is very, very simple. It shows Charge in %, Volts to know when you are FULLY charged and Temperature F/C to tell you that your phone is getting hot and exactly how hot it is.
BetterBatteryStats –
This app will show you what exactly is eating at your battery. Processes, Running Services, Wakelocks, Partial Wakelocks. It is a PAID app but for XDA users it is free. See here for more extensive details, instructions, screenies, change-logs,... and credits go to Chamonix and his development team for this app.
JuiceDefender (Plus) [Since I use JD+, that is what I am going to refer too.]
–
This app’s ability to kill Radio/Data has NO EFFECT on phone calls or messaging. You will still get that call in the middle of the night you were expecting.
If you set it to custom, the go into the settings tab on the right and then all the way at the bottom, there is two buttons to push, The first in Interactive which will pull up Juice Defender for up for any app that isn't already configured and the other is Configure Apps. This is the one that you can customize on an app-to-app basis where if you are no using an app and the screen is locked, it kills the radio/data traffic for that app.
Say you are listening to IHeartRadio, this you would want either Enable or Enable/off (which means the screen will be locked but the radio/data will be working). Now take the browser. If you are not using the browser, then you don't need it transmitting data right? So you would set that one to Enable (which means that it will only enable data traffic when that app is being used).
Juice Defender only works when the screen is locked (WidgetLocker lock screens interfere with JuiceDefender), don't forget and all widgets are battery drains b/c all they really are is a monitoring app and if it is tied to something like Facebook or Google+, then that data will be running constantly.
Settings:
Enable = Radio/data on when app is in use (front)
Enable/off = Radio/data on for background apps (when screen is locked)
Disable = Disables radio/data traffic completely when that app is running
Do Nothing = What is says
Examples:
Angry Birds = Disable (Here is a little known trick that I use for this and any game with Ads. With this and something like Adfree, no more ads in Angry Birds even though the ads are embedded in the .apk)
Pandora/Jango/ Tune-in = Enable/Off (this will keep your battery temp down when streaming)
Browser/ Market = Enable (not enable/off b/c then it will keep your radio/data open)
Beautiful Widgets = Enable/off
mClock/Clockr = Enable/off
SMS/MMS = Enable or Do Nothing (why would you push disable)
I have been using JD+ for over a year on 3 different phones and multiple ROMs and have noticed a considerable difference in battery life. Just takes some time to figure out YOUR settings and what YOU like. I have also used it on Stock kernel and had no problems either.
Here are my personal setting but I am on JD+ and not Ultimate
Profile - Customize
Notification - Graphical
Settings
Mobile Data and WIFI both Enable
Options - Auto Disable
Location - Disable
Schedule -Enable --->2hrs
Night Enable --->12a to 9a (user take priority)
Apps --.Set to Interactive
E = Enable
ESo = Enable/Scrren Off
D = Disable
DN = Do Nothing
At-Bat12 = ESo
IHeartRadio = ESo
Jango = ESo
Sticher = ESo
Dolphin = E
Google Play Store = E
Messaging = E
Twitter = E
XDA pre = E
Zedge = E
Angry Birds (all variants) = Disable --->You get no ads this way wink wink
These are all Do Nothing
Addfree
Apparatus
BW
Betterbatterystats
Cachemate
Elixir
Fasterfix
FlickGolf
Google Search
Maps
Moboplayer
PowerAmp -->I can listen to music without it looking for Album Art b/c it is set to do nothing, so one of the above apps take priority and when the screen is off, data is off when I am listening to music
Quadrant
Blah, blah, blah you get the idea.
If you have every app you own and in the phone set to do "something", then you are going to run into priority issues when multi-tasking which will kill your battery for 1 b/c it is opening and closing radios and 2 for the RAM it is taking to figure out which priority take the lead. Hence why I have so many set to Do Nothing.
LBE Privacy Guard –
There may or may not be some issues with this app and Jelly Bean, so make sure you read the Market Comments and hit their website to make sure. Thanks to mypenismighty for the tip.
This will go good with JuiceDefender, as they both prevent unwanted data transfer. Protect your privacy by controlling the permission of each application to access your sensitive data. Block malicious operation from Mal-wares and Trojans. Block unwanted network traffic if you don’t have a unlimited data plan. Find out which application is trying to steal your privacy by checking the security log.
RAM Munchers eat battery too. These will fix that for you.
Autostarts (paid-CAUTION this is for advanced users) –
Keep control over your phone: See what applications do behind your back.
Shows you what apps run on phone startup, and what other events trigger in the background. Root users can disable unwanted autostarts and speed up their phone boot.
Watchdog –
See what is eating your RAM. Hint: if it is using RAM,then probably it is also using battery too.
Spare Parts –
Spare Parts allows you to enable some settings
that are not found in the default setting menu
Process Monitor –
List the running process on your Android device.
Long click item to kill application or open application.
Fastboot –
This is a handy little app that kills all your services at once and lets them restart back up. I use this right before I hit the lock screen, so that if any app-services are running that I don’t have configured in Juice Defender Plus they will be killed, frees up about 50-70mb of memory, and then I lock the screen and JD takes over. This one is optional if you want it or not. I like it just fine and it works for me.
Matte Screen Filter –
Puts a sort of Dim setting on your screen. Almost like a display overlay, ok? And I did mean to rhyme those. I don’t use it because I have my display set how I want it but you can.
Battery Calibrator –
Pointless, but if you want to check out more info, click the hide tag below.
If you are having some haywire battery readings, this is for you. THIS WILL NOT INCREASE YOUR BATTERY LIFE, but will give you a truer reading if your battstats somehow get corrupted.
When you flash a new ROM, it is always best to wipe the old battery stats associated with that ROM, so you can start fresh as a daisy. How this works is you plug you phone in and charge to 100%, do not mess with it or surf the net (I do this overnight). While still plugged in, hit the apps, grant SU permission and hit the Calibrate Battery button. Grant SU permission again and once done, unplug your phone. Your Batterystats.bin has been deleted. You running your phone down by just using it normally. Most say to run it until it shuts off, but I have had bad experiences doing this, so I let it get to 10-15% and plug it in then. Charge fully up to 100% (again no surfing or games) and you will notice a dramatic increase in battery life.
**Note that this can be done two other ways. You can boot into CWR or Custom Recovery and go to Advanced Settings and there will be the Wipe Batterystats.bin option. Or you can do it manually by going into /data/system/ and deleting the batterystats.bin in there. Any of the three methods work to get the entirely same result in the end. I just like using the app or manually myself. **
Why battery calibration is important and what it is doing.
The app and what it does is more for when you are flashing a ROM and have around 60% and then once booted up fully, you charge it up to 100%. Decided you don't like your ROM and go back to your original ROM via backup, it will show 60% instead of the 100 or 90% you had before you went back to back up b/c you backed up the batstat bin when you nandroided your original ROM. Also simply charing your phone up to 100% and shortly after you unplug it, the Battstats will reset.
Recently (about this time last year) there has been information debunking this process. I will post it below. Here is the post by Dianne Hackborn, a Google Dev on her G+ account.
Dianne Hackborn - Jan 12, 2012 - Public
Today's myth debunking:
"The battery indicator in the status/notification bar is a reflection of the batterystats.bin file in the data/system/ directory."
No, it does not.
This file is used to maintain, across reboots, low-level data about the kinds of operations the device and your apps are doing between battery changes. That is, it is solely used to compute the blame for battery usage shown in the "Battery Use" UI in settings.
That is, it has deeply significant things like "app X held a wake lock for 2 minutes" and "the screen was on at 60% brightness for 10 minutes."
It has no impact on the current battery level shown to you.
It has no impact on your battery life.
Deleting it is not going to do anything to make your more device more fantastic and wonderful... well, unless you have some deep hatred for seeing anything shown in the battery usage UI. And anyway, it is reset every time you unplug from power with a relatively full charge (thus why the battery usage UI data resets at that point), so this would be a much easier way to make it go away.
Click to expand...
Click to collapse
Here is a post from this thread with ERD Entropy512 and I discussing the Battery Calibration app.
Proof that these things work. Stock battery by the way. Sorry for the huge pix. I'll tag them with a Hide Parse for better viewing real estate.
{
"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"
}
Battery screenshots as of 12/13/12
View attachment 1561698View attachment 1561700View attachment 1561701
Change Log:
9 August 13 -Added in Greenify, Tasker, Kernel settings, cleaned up a bit.
13 December 12 - Added more battery screenies
2 November 12 - Initial Post
***********
If anyone has any tips or tricks that they want to share, by all means post them in here and I will link it in the OP. We are all in this together.
After reading this posts I am afraid to even use my phone cuz battery will drain lol jkjk! Thanks great thread!
Awesome thread man! Really glad to see you brought it over here!
Thanks for taking the time! I know it'll come in very handy for just about everyone.
Great job on a great guide!
:thumbup::thumbup:
Sent from my SGH-T999 using xda app-developers app
Woodrube said:
Y U Quote the whole OP
Click to expand...
Click to collapse
Awesome guide.. We thank you
Sent from my SGH-T999 using xda premium
This is some really great information. Thank you for taking the time to share it with everybody.
I knew it wouldn't take long for this to get to the top!
:thumbup:
Sent from my SGH-T999 using xda app-developers app
Great thread thank you
Sent from my SGH-T999 using xda app-developers app
I wanted to warn people that LBE Privacy Guard caused crazy boot loops for me. The reviews from the Play Store suggests that it's a Jellybean issue. Anyway, I was able to go into recovery, fix permissions, and force stop and uninstall before it went crazy again. Other than that, thanks for the great tips!
Woodrube good post, I remember seeing this in the vibrant section. Keep up the good work mod.
Sent from my SGH-T999 using Tapatalk 2
Thanks man. I ported the meat and bones of it over, but I added a ton of stuff specific to the SGS3, plus the sections about Governors and I/O schedulers.
If anyone reads this, I could use more OC/UV examples to put in the OP. It would be much appreciated.
This is great, what really got me is how the phone doesnt automatically go to the best tower for the best signal, so I will defnitely start toggling airplane mode when I travel, thanks a lot for all this helpful information and apps that can help up save battery as much as possible!
Be sure to turn off Latitude updates in
Maps > Menu > Settings > Location settings > Location reporting > Do not update your location
Already on the portal.
Great Great Great!
Thanks a lot.
Plus Post for anyone.....we seem to forget the things that kill us....back stab us the most when it comes to Battery Life!!
GOOD POST!!! VERY DETAILED AND INFORMANT!!!!
Great advice on the whole, but I don't agree with the stuff about app widgets.
Widgets don't use a bunch of resources just because they are widgets - I think you could almost say the opposite: the design of widgets allows them to be visible on your desktop without using any resources because the app code that controls the widget only needs to be loaded when the widget changes.
In the end, the resources used by an app widget depend on what it does and how it is designed - same as for any app. If your widget is supposed to go to the network and update some info for you every few minutes then this will drain your battery. However, there are tons of utility widgets that do nothing (and are not in memory) unless they are pressed or one of the phone states they are listening to changes (e.g. a radio is turned on).
Of course, a badly designed app will hurt your battery regardless. Personally I think apps need to get away from creating a custom Application object since these get instantiated whenever the system creates the app's (or app widget's) process, even if it is just to update a widget.
Nice thread
Thxs for this nice thread Any ore would be appreciated.
I have learned a few things besides already being techy.
Nice to see whole lot of apps for android

Categories

Resources