29 May 2012

Android tunings

If you don't know what this means, it's not for you.


1. Network

Sometimes you feel your device a little "clumsy" depending your connection. I really don't know why this happens. For example, at home my wifi is ok, but in some others is different (with same routers). Or even worse, some differences from carrier to carrier, and I'm not talking about latency (and don't start talking about android quality of connection because I've already feel the same using an iPad).
Sometimes.. you know.. if you doesn't use a custom rom because you really believe that the manufacturer knows what is the best for your phone, I'm really sorry for you.
This settings will give you a little more latency, you need a little test to see if fits for you.


2. Image related

Some manufacturers thinks you like this type of garbage, you can optimize this:
This one give the full quality for jpeg images (yes, sometimes you're not using what your device is capable):


Disable this, unless you like the red borders for strict applications

Render UI with GPU (yes, sometimes isn't turned on)

debug.sf.hw = 1
Improve the scrolling response

windowsmgr.max_events_per_sec = 120
Disables the surface dithering (if enable will improve image quality, at cpu cost)

persist.sys.use_dithering = 0
Use hardware acceleration to render videos.


3. Battery Related

Do you know about governors right? I you know all manufacturers (including sw ones like google, unfortunately) thinks no one needs a DECENT governor on your device, so your battery will sucks big time.
There's some types of governors for almost all devices that you HUGE increase the battery life without making your device a garbage, like smartassV2, interactiveX and Drewi's ondemand. but… if you don't use a custom rom and thinks that your manufacturer is the god of devices, just stop reading already :D.
You have a custom kernel with a custom governor? Good! Did you use smartassV2? Very good. Now some minor tunings.

Decrease the scan time of the wifi (will not hurt):

This will improve the "deep sleep", but depends on kernel in some way


Increase battery saving

pm.sleep_mode = 1


Based on supercharger script (because not all supercharger script settings are good to everyone, Ive filtered the best compatible options):

Define the OOM adj values for the classes of processes that can be killed by kernel.


Define the memory threesholds at which the above process classes will be killed


init.d Scripts

Of course, your ROM must support init.d scripts


echo "3" > /proc/sys/vm/drop_caches
echo "20" > /proc/sys/vm/swappiness
echo "15" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/vfs_cache_pressure
echo "3000" > /proc/sys/vm/dirty_expire_centisecs
echo "500" > /proc/sys/vm/dirty_writeback_centisecs
echo "3" > /proc/sys/vm/dirty_background_ratio
echo "2048,4096,51200,56320,61440,70400" > /sys/module/lowmemorykiller/parameters/minfree
echo "veno" > /proc/sys/net/ipv4/tcp_congestion_control

AIX Clone

Many people will already know how to do this, since there's some (huge) machines you need lots of AIX Virtual Servers, and of course, you'll not make thousands of installs (will you?).

...and if the AIX boot partition fails?

First, you need to boot with an AIX installation disk or Diagnostics disk (Virtual I/O bootdisk also works) and go to maintanence mode. Choose the option to give you a shell (mounting rootvg, of course).
Just in case, this is a quite dangerous process, so you need to know what you're doing (and so, if you destroy the world, it's your fault, not mine).