[XPERIA X8 General] Pjay12:
This thread is a big mess. Heres a summary of pretty much everything -

Credits to Zeppelinrox and alfsamsung

I tried to make this as noob-friendly as possible.

First steps

- Run the script and reboot once (just in case) It will create a 99SuperCharger in init.d, deleting this is not necessary.

Uninstall/freeze AMM, AKMO, Minfree Manager, whatever else you have that can alter Minfree values.

This may differ with each rom but delete any other ramscript from etc/init.d

[On a standard GingerDX these are the files that should be in init.d

01sysctl

03firstboot

04modules

05mountsd

06gingerdx

06mountdl

10apps2sd

20userinit

99SuperCharger <-- after running the SuperCharger Script]

Changes -

1. system/etc/hw_config :

Add these lines to the bottom

# tweak launcher hard to kill from supercharger

echo "0,3,5,7,14,15" > /sys/module/lowmemorykiller/parameters/adj

echo "1536,2048,6656,7168,7680,8192" > /sys/module/lowmemorykiller/parameters/minfree

echo "0" > /proc/sys/kernel/panic

echo "0" > /proc/sys/vm/oom_kill_allocating_task

echo "0" > /proc/sys/vm/panic_on_oom

echo "1" > /proc/sys/kernel/panic_on_oops

echo "0" > /proc/sys/kernel/panic

The values in bold are my settings (Balanced 3 option in supercharger)

Values you will see are 6 ,8 ,26 ,28 ,30 ,32.

Change them to your desired values.

[Additional (how it works) - <value> * 4 / 1024 (<value/256)

Example - 1536/256 = 6, 8192*4/1024 = 32]

2. data/local.prop :

Make sure it looks like this-

ro.FOREGROUND_APP_ADJ=0

ro.VISIBLE_APP_ADJ=3

ro.PERCEPTIBLE_APP_ADJ=2

ro.HEAVY_WEIGHT_APP_ADJ=4

ro.SECONDARY_SERVER_ADJ=5

ro.BACKUP_APP_ADJ=6

ro.HOME_APP_ADJ=2

ro.HIDDEN_APP_MIN_ADJ=7

ro.EMPTY_APP_ADJ=15

ro.FOREGROUND_APP_MEM=1536

ro.VISIBLE_APP_MEM=2048

ro.PERCEPTIBLE_APP_MEM=1024

ro.HEAVY_WEIGHT_APP_MEM=6656

ro.SECONDARY_SERVER_MEM=6656

ro.BACKUP_APP_MEM=7168

ro.HOME_APP_MEM=1024

ro.HIDDEN_APP_MEM=7168

ro.EMPTY_APP_MEM=8192

Now reboot and check sys/module/lowmemorykiller/parameters/minfree (long press and select view as text) Your values should be what you put as the bold text in hw_config.

------------------------------------------------------------------------------------------------------

OPTIONAL -

The following may or may not affect your phones performance. DO NOT rely on quadrants or any other benchmarks for performance. Its your own experience.

1. hw_config

Add these lines-

# we love fast sd speed

echo 512 > /sys/devices/virtual/bdi/179:0/read_ahead_kb

# sysctl and ram tweak

echo "0" > /proc/sys/vm/swappiness

echo "2000" > /proc/sys/vm/dirty_writeback_centisecs

echo "1000" > /proc/sys/vm/dirty_expire_centisecs

echo "200" > /proc/sys/vm/vfs_cache_pressure

echo "80" > /proc/sys/vm/dirty_ratio

echo "40" > /proc/sys/vm/dirty_background_ratio

echo "0" > /proc/sys/vm/oom_kill_allocating_task

echo "2048" > /proc/sys/vm/min_free_kbytes

NOTE -

The above lines under "#sysctl and ram tweak" are alfsamsung's original tweaks.

If you haven't flashed kickasskernel, the below lines are editted with a few kickasskernels values (its what I use) If you want to try it, REPLACE the above lines under #sysctl and ram tweak with the lines below.

# sysctl and ram tweak

echo "0" > /proc/sys/vm/swappiness

echo "2000" > /proc/sys/vm/dirty_writeback_centisecs

echo "1000" > /proc/sys/vm/dirty_expire_centisecs

echo "20" > /proc/sys/vm/vfs_cache_pressure

echo "95" > /proc/sys/vm/dirty_ratio

echo "60" > /proc/sys/vm/dirty_background_ratio

echo "0" > /proc/sys/vm/oom_kill_allocating_task

echo "8192" > /proc/sys/vm/min_free_kbytes

2. system/build.prop

Add these lines to the bottom

#wifi network etc..

rild.libpath=/system/lib/libril-qc-1.so

rild.libargs=-d

/dev/smd0

ro.ril.hsxpa=2

ro.ril.hsupa.category=5

ro.ril.enable.a52=1

ro.ril.enable.a53=1

ro.ril.def.agps.mode=2

ro.ril.gprsclass=12

ro.ril.def.agps.mode=2

ro.telephony.default_network=0

wifi.interface=wlan0

wifi.supplicant_scan_interval=90

#windows management

ro.sf.lcd_density=160

windowsmgr.max_events_per_sec=60

settings.display.autobacklight=1

settings.display.brightness=160

# The OpenGL ES API level that is natively supported by this device.

ro.opengles.version=131072

debug.sf.hw=1

# Tweaks

debug.sf.hw=1

ro.compcache.default=0

#media

ro.workaround.noautofocus=1

media.stagefright.enable-player=true

media.stagefright.enable-meta=true

media.stagefright.enable-scan=true

media.stagefright.enable-http=true

ro.media.dec.jpeg.memcap=10000000

ro.media.enc.file.format = 3gp,mp4

ro.media.enc.vid.codec = m4v,h263

ro.media.enc.vid.h263.width = 176,352

ro.media.enc.vid.h263.height = 144,288

ro.media.enc.vid.h263.bps = 64000,800000

ro.media.enc.vid.h263.fps = 1,30

ro.media.enc.vid.m4v.width = 176,352

ro.media.enc.vid.m4v.height = 144,288

ro.media.enc.vid.m4v.bps = 64000,800000

ro.media.enc.vid.m4v.fps = 1,30

# For SD storage insert notification sound

persist.service.mount.playsnd = 0

#dalvik options (more tweaks)

dalvik.vm.execution-mode=int:jit

dalvik.vm.heapsize=40m

dalvik.vm.dexopt-flags=m=y

#Other tweaks

mot.proximity.delay=400

Quote alfsamsung - mot.proximity.delay=400 - sets the delay of screen on when using proximity sensor in calls (mseconds)

The important lines above are in bold. Make sure they are the same.

Reboot and check sys/module/lowmemorykiller/parameters/minfree. Values should be the same. If they aren't, feel free to PM. Hope it helps.

NOTE- After editting build.prop, on reboot if all the changes you made are reset, edit both build.prop files and reboot.

One is in system/build.prop and one in system/bin.

If it helps hit thanks for the respective contributors.

:)

Enjoy.

Cheers.

Pjay