[REF][DEV] Tweaks for i9003 list [UPDATE] - Samsung Galaxy SL i9003

This is a list of all threads avaiable to our phone, using for ROM developer too...
i decided to post in general, becouse this is not developer threads, developer threads are done from developers and i'm a human no developer.
Adrenaline Shot v14 Universal ​What do these tweaks do?
the first improve is under /system/bin, replace 2 bin with leaked from ICS 4.0 , with GREAT EPIC improvement , 2 bins 're app_process and system_server.
app_process executes, and executes a runtime environment for a dalvik class
The system server is the core of the Android system and as described in the boot sequence post it is started as soon as Dalvik is initialized and running.
like all tweaks , this will add some /system/etc/init.d script , if kernel supports of curse
( for everyone using Gentoo, know init.d too )
the first one is 00remount
Code:
#!/system/bin/sh
#Partition mounts by Dsexton702
mount -o remount,noatime,nobh,nodiratime,nodelalloc,noauto_da_alloc,barrier=0 /system /system
mount -o remount,noatime,nobh,nodiratime,nodelalloc,noauto_da_alloc,barrier=0 /cache /cache
mount -o remount,noatime,nodiratime,delalloc,noauto_da_alloc,barrier=0 /data /data
This script will (re) mount the EXT4 partitions with some "tweaks", like noatime, nodiratime,delalloc and soso.. , speed increased in R/W
the second is 01kerneltweak
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_GENTLE_FAIR_SLEEPERS > /sys/kernel/debug/sched_features
unmount /sys/kernel/debug
using NO_GENTLE_FAIR_SLEEPERS as schedule features, nothing to hard
the third 02journaling
provide to delete cache if its too big
the 4th is 03sysctl
Code:
#!/system/bin/sh
sysctl -p
This is simply call to sysctl ( parameters settings under linux kernel ), its under kernel tweak
the 5th is 04sysctltweaks
this will set a lot of utils things about kernel and its driver ( like governor ) , if people using ondemand it will set ondemand/up_threshold to 65 ( more responsive , but increase battery drain ) and ondemand/sampling_rate to 30000 ^^
05sdcardspeedfix
fixing READ_AHEAD_KB , suggest it will increase sdcard speed ( not too much )
06zipalign
provide to zipalign all /data/app/*.apk files, anything know to apk files are zip archive contains a lot of things, zipalign optimize this archive , major info at developer.android.com/guide/developing/tools/zipalign.html
07vacuum
this provide to "VACUUM" all *.db ( see SMS's DB, etc ... ) to rebuild all *.db better, increase performance too!
08ramscript
i never will use this, this is not designed for our phone IMHO it can be replace with superchanger ( see after )
/system/lib/libsqlite*
will replace sqlite's lib for better performance, sqlite has sync and async method, this will disable sync , theorically it will double the performance in I/O
/system/xbin
it simply provide a sqlite3 bin and zipalign bin, nothing tweaks
Click to expand...
Click to collapse
Thunderbolt tweaks ( this is not avaiable, i upload some script i've download a time ago )​/system/etc/init.d
s78enable_touchscreen_1
Code:
#!/system/bin/sh
#Touchscreen
#Configure touchscreen sensitivity
#Sensitive(Chainfire)
echo 7035 > /sys/class/touch/switch/set_touchscreen;
echo 8002 > /sys/class/touch/switch/set_touchscreen;
echo 11000 > /sys/class/touch/switch/set_touchscreen;
echo 13060 > /sys/class/touch/switch/set_touchscreen;
echo 14005 > /sys/class/touch/switch/set_touchscreen;
this is IMHO the best script i've ever seen , this will increase sensitivity of touchscreen
07sqlite_optimize
this will vacuum and re-index all db, better than Adrenaline's 07vacuum IMHO
S70darky_zipalign
Another zipalign script, useless
*bolt_siray*
this is not developer for our phone, this will working only with adeguate kernel ( we haven't )
S98CFS
it will provide a lot of tweaks using sysctl and kernel proc/ interface
S98system_tweaks
this is a lot of script unify in one script
i edit this to be "better" with our phone, i delete re-mount runtime , adrenaline's 00remount do it better
and modify this part:
Code:
# ==============================================================
# smartassV2
# ==============================================================
if [ -e /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq ]; then
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq;
if [ "`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq`" -eq 300000 ]; then
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
else
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq;
fi;
echo "800000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq;
echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load;
echo "75" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load;
echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step;
echo "0" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step;
fi;
to have a correctly step for our processor
​
"after applied this , my phone morth into blonde, blue eyes galaxy Supersayan [cit.]
THIS IS THE ONLY MEMORY Manager, this provide a better ram manager by android, anyone know that Random Access Memory contains a kernel and all APP run, kernel are loaded in lowest address possible , and all app are loaded when open, android usually doesn't close this, for better speed when you re-open its, but if you have small RAM ( 512 MB too ) this will cause a lot of problem , superchange fix it!
i suggest to use 512HP Balanced ( or Performance ) with Bulletproof launcher + OOM FIX, Nullify lag work too
HOW INCLUDE THIS INTO MY ROM?
Poseidons ROM include this by ****ty init.d script, i suggest to delete and re-apply
if you are not ROM Developer is simple, download latest avaiable by link i provide at top and with ROOT-enabled ( check su ) and Script Manager ( or terminal emulator -> # su -> sh script_location ) follow the scripts guide, remember, using this can cause ( 0.01% ) bootloops, i suggest to use local.prop and init.rc integration
if you are a ROM Developer is more complicated than simple user, for stick you can use:
init.d script ( like poseidons )
local.prop and init.local.rc ( suggest ) under /data
build.prop
init.d script ( i do not see this, for me is the worst way to get it )
init.local.rc:
create a /data/init.local.rc contains
* This is for 512HP-Performance + Bulletproof
Code:
write /sys/module/lowmemorykiller/parameters/adj 0,3,6,10,12,15
write /sys/module/lowmemorykiller/parameters/minfree 2048,3584,19200,23040,24320,32000
# V6 SuperCharger, OOM Grouping & Priority Fixes created by zeppelinrox.
# SuperMinFree Calculator & MFK Calculator (for min_free_kbytes) created by zeppelinrox also :)
#
# See http://goo.gl/krtf9 - Linux Memory Consumption - Nice article!
# See http://goo.gl/hFdNO - Memory and SuperCharging Overview ...or... "Why `Free RAM` Is NOT Wasted RAM!"
# See http://goo.gl/4w0ba - MFK Calculator Info - explanation for vm.min_free_kbytes.
#
# DO NOT DELETE COMMENTS. DELETING COMMENTS WILL BREAK UNINSTALL ROUTINE!
#
# BEGIN OOM_MEM_Settings
setprop ro.FOREGROUND_APP_MEM 2048
setprop ro.VISIBLE_APP_MEM 3584
setprop ro.PERCEPTIBLE_APP_MEM 1024
setprop ro.HEAVY_WEIGHT_APP_MEM 19200
setprop ro.SECONDARY_SERVER_MEM 19200
setprop ro.BACKUP_APP_MEM 23040
setprop ro.HOME_APP_MEM 1024
setprop ro.HIDDEN_APP_MEM 23040
setprop ro.EMPTY_APP_MEM 32000
# END OOM_MEM_Settings
# BEGIN OOM_ADJ_Settings
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 3
setprop ro.PERCEPTIBLE_APP_ADJ 2
setprop ro.HEAVY_WEIGHT_APP_ADJ 4
setprop ro.SECONDARY_SERVER_ADJ 6
setprop ro.BACKUP_APP_ADJ 7
setprop ro.HOME_APP_ADJ 0
setprop ro.HIDDEN_APP_MIN_ADJ 9
setprop ro.EMPTY_APP_ADJ 15
# END OOM_ADJ_Settings
write /proc/sys/vm/min_free_kbytes 15360
write /proc/sys/vm/oom_kill_allocating_task 0
write /proc/sys/vm/panic_on_oom 0
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/swappiness 0
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/panic 30
# End of V6 SuperCharged Entries.
or build.prop way ( need a supplie init.d script )
i9003 tweaks​
01loopy
this will make phone more smoothness by renice ( change priority ) the main process will run
i suggest to set your launcher process here like:
Code:
### Launcher apps ###
renice -19 `pidof com.sec.android.app.twlauncher` # TouchWiz Launcher
renice -19 `pidof org.adwfreak.launcher` # ADW Launcher Ex
renice -19 `pidof org.zeam.core` # Zeam launcher
renice -19 `pidof info.tikusoft.launcher7`# Launcher 7

PART2
95allinone
This will provide a complete collection of tweaks avaiable, i hate this becouse, a lot of tweaks here are not implemented correctly , like:
Code:
#Part below here edited by me (changed values) Credits to Juwe11
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
if [ -e /proc/sys/vm/swappiness ]; then
echo "20" > /proc/sys/vm/swappiness
fi
zOOM zOOM :
Code:
echo "2560,4096,5632,10240,11776,14848" > /sys/module/lowmemorykiller/parameters/minfree
This is the same things that do superchanger, but this will be wrost for our phone IMHO
Code:
echo "20" > /proc/sys/vm/swappiness
the right value ( in my cases ) is 0, i haven't swap of anyway we dont have to have a swap!
Zipalign Runtime, it will just implemented by a lot of script, this is also the wrost IMHO zip align script i've never seen
Code:
for k in $(busybox mount | grep relatime | cut -d " " -f3) ; do
sync;
busybox mount -o remount,noatime $k;
done;
this will break 00remount script
Code:
for i in /sys/block/*/queue/scheduler ; do
echo "noop" > $i;
done;
if kernel support i suggest deadline
Code:
# Tweak kernel VM management
echo 0 > /proc/sys/vm/swappiness
echo 10 > /proc/sys/vm/dirty_ratio
echo 4096 > /proc/sys/vm/min_free_kbytes
??? WHAT? again?
Code:
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "cfq" > /sys/block/mmcblk0/queue/scheduler
see upper
Code:
echo "deadline" > /sys/block/mmcblk0/queue/scheduler
What? another change?
this is good:
Code:
# Copyright @ CRANIUM ROM
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
#End Cranium Tweaks
Conclusion: 95allinone is simply a addiction of all tweaks avaiable in one script without any review and improves for our phone ( in this case, this work ), this will only increase the boot time and break others tweaks installed ( some )
99V6_Superchanger
DO NOT USE THIS, THIS IS EPIC FAIL INIT.D SCRIPT!
Code:
mount -o remount,rw /system
mount -o remount,rw /dev/block/mtdblock3 /system
mount -o remount,rw /dev/block/mtdblock6 /system
*facepalm*
in my terminal:
Code:
# su
# ls -la /dev/block/mtd*
ls: /dev/block/mtd*: No such file or directory
anyway this is not init.d script, this is v6 script , this is not compatible with init.d ,

PART3
Build.prop and android params
Listed partial by TheFrankestain, thanks
* YOU MUST ADD IT AT BOTTOM OF /system/build.prop and delete cache and reboot*
Code:
ro.ril.hsxpa=2
This will enable High-Speed_Downlink_Packet_Access and High-Speed Uplink Packet Access ( HSDPA and HSUPA )
Code:
ro.ril.gprsclass=10
gprs class, see this LINK
Code:
ro.ril.hep=1
0 meaning off, 1 activated
Code:
ro.ril.enable.dtm=0
Dual Transfer Mode , set 1 only if your network support it
Code:
ro.ril.hsdpa.category=8
Folllow this ( thanks to tnpapadakos )
Code:
#ro.ril.hsdpa.category :
# Cat 1 = 1.2 Mbit/s
# Cat 2 = 1.2 Mbit/s
# Cat 3 = 1.8 Mbit/s
# Cat 4 = 1.8 Mbit/s
# Cat 5 = 3.6 Mbit/s
# Cat 6 = 3.6 Mbit/s
# Cat 7 = 7.2 Mbit/s
# Cat 8 = 7.2 Mbit/s
# Cat 9 = 10.1 Mbit/s
# Cat 10 = 14.0 Mbit/s
# Cat 11 = 0.9 Mbit/s
# Cat 12 = 1.8 Mbit/s
# Cat 13 = 17.6 Mbit/s
# Cat 14 = 21.1 Mbit/s
# Cat 15 = 23.4 Mbit/s
# Cat 16 = 27.9 Mbit/s
# Cat 19 = 35.3 Mbit/s
# Cat 20 = 42.2 Mbit/s
# Cat 21 = 23.4 Mbit/s
# Cat 22 = 27.9 Mbit/s
# Cat 23 = 35.3 Mbit/s
# Cat 24 = 42.2 Mbit/s
# Cat 25 = 46.8 Mbit/s
# Cat 26 = 55.9 Mbit/s
# Cat 27 = 70.6 Mbit/s
# Cat 28 = 84.4 Mbit/s
Code:
ro.ril.enable.a53=1
a53 enabling
Code:
ro.ril.enable.3g.prefix=1
1 will show 3g prefix next to network signal
Code:
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
bitmask &
Code:
ro.ril.hsupa.category=6
See this:
Code:
#ro.ril.hsupa.category :
# Cat 1 = 0.73 Mbit/s
# Cat 2 = 1.46 Mbit/s
# Cat 3 = 1.46 Mbit/s
# Cat 4 = 2.93 Mbit/s
# Cat 5 = 2.00 Mbit/s
# Cat 6 = 5.76 Mbit/s
# Cat 7 = 11.5 Mbit/s
Code:
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
Redefinite TCP Standard size packet, it will increased overall speed
Code:
ro.ext4fs=1
will set ext4fs prop to android system, increased performance if you are under ext4
Code:
persist.sys.purgeable_assets=1
More speed!
Code:
persist.sys.shutdown.mode=hibernate
NOT COMPATIBLE FOR OUR PHONE, we have not hibernate shutdown mode
Code:
ro.ril.disable.power.collapse=0
is ultra-battery-life mode, when phone're sleeping
Code:
ro.ril.enable.cnap
Celler name presentation
Code:
debug.sf.hw=0
Render with GPU Apps ( see last #3 post for better info )
Code:
pm.sleep_mode=1
Permits better sleep mode ( battery ++ )
Code:
wifi.supplicant_scan_interval=150
Android ( when wifi on ) periodically scan for new network, you can set time between its for better battery when wifi on
Code:
windowsmgr.max_events_per_sec=150
Increase the max events record by windows manager , better scroll
Code:
debug.performance.tuning=1
video.accelerate.hw=1
GPU Tune for scrolling performance
Code:
debug.sf.nobootanimation=1
for me, not work, it will theorically disable boot animation for faster boot
Code:
ro.HOME_APP_ADJ=1
USE ONLY IF YOU DONT USE SUPERCHANGER
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
decrease proximity delay for better experience
Code:
ro.sf.lcd_density=240
Simply not sense
Code:
ro.kernel.android.checkjni=0
disable check jni
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
increase media quality
WHICH GOVERNOR DO U USE?​( ref: Simba501 )
SEE THIS
Anyway i suggest:
- Smartassv2 if you want performance over less battery
- InteractiveX if you want battery over less performance
CAN ANY KERNEL DEVELOPER INCLUDE LULZACTIVE CPUFREQ-DRIVER IN OUR KERNELS? ITS THE PERFECT GOVERNOR , EITHER FOR BATTERY AND PERFORMANCE
EGL TWEAK!​Android header said:
Code:
#
# One line per configuration, of the form:
#
# D I TAG
#
# D: display (0: default)
# I: implementation (0: software, 1: hardware)
# TAG: a unique tag
#
# The library name loaded by EGL is constructed as (in that order):
#
# /system/lib/egl/libGLES_$TAG.so
# /system/lib/egl/lib{EGL|GLESv1_CM|GLESv2}_$TAG.so
#
in the stock ROM the egl.cfg is:
Code:
0 0 android
0 1 POWERVR_SGX530_125
what's meaning?
simply using cpu ( with gpu too ) to render all apps and system
if you modify to:
Code:
0 1 POWERVR_SGX530_125
it will use overall GPU render only, more fast and imho better Battery life because, CPU in our cases with overclock consume more than GPU
See original post: http://forum.xda-developers.com/showpost.php?p=14323192&postcount=8

Wow!! very good thread!! I am setting up a custom rom, could u tell me what of these could give my rom a better battery life? Thank u man!

luiseteyo said:
Wow!! very good thread!! I am setting up a custom rom, could u tell me what of these could give my rom a better battery life? Thank u man!
Click to expand...
Click to collapse
Battery life is influence by:
Running Apps
Governors do you use
Memory Manager ( #1 addicted )
If you set /etc/init.d script to set conservative governor and implemented v6 without any stupid app like facebook or bloatware samsung, and your battery seems infinite
in the past i used SCH Rom , its used only v6 and most important tweaks , without any stupid bloatware, battery seems very infinite ^^ like 2% in 5 hours under 2G network

Ok, sorry for my noob question but I am learning a lot of things this days.. where can I find a tutorial about how to set a governor or a frecuency by default in my kernel? Thank u very much

luiseteyo said:
Ok, sorry for my noob question but I am learning a lot of things this days.. where can I find a tutorial about how to set a governor or a frecuency by default in my kernel? Thank u very much
Click to expand...
Click to collapse
I'm noob too
for frequency are too kernel releated to be generalized,
or if you using XDA_Bam kernel
39frequency
Code:
#!/system/bin/sh
echo "300" > /sys/power/overclock_opp1
echo "600" > /sys/power/overclock_opp2
echo "800" > /sys/power/overclock_opp3
echo "1000" > /sys/power/overclock_opp4
anyway you can create init.d script like
40governorbattery
with:
Code:
#!/system/bin/sh
echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
and see if it stick ^^

Hi.
Are there codes that can remove or dissable the TouchUI aka TouchWiz interface on the i9003 and just use the android deffult launcher?
Another thing something that will easy-up my ram usage and allow more usable ram?
If so how do i implement them?

I just want to add a cool sound and audio tweaks using MagaBassBeats_Mod
First download the MagaBassBeats_Mod_9003.zip file from the xda forum.
Now copy it to the sdcard.
Reboot to the recovery mode.
Now select install from zip file and chose internal sdcard.
Search for the zip file, hit power button, and chose yes.
That's it now you can enjoy a great sound quality.
details from here

Related

[MOD]Auto Compcache & backup Swap for CM.

Many people having issues getting compcache/swap working, so here we go.
Replace the content of your userinit.sh with this code. This code was created by uwonsom and modified by yours truely and lastely by Alapapa. to see the original work click Here.
I've also attached the file ready for you to throw directly into /system/sd.
{from original post}
The current setting enables compcache with backing_swap (a physical partition). It can also be tested with linux-swap only--just comment out lines beginning with insmod, mknod, and swapon /dev/ramzswap0. Then uncomment swapon /dev/block/mmcblk0p3.
If you wish to test it out only with compcache, comment out the insmod line with backing_swap and uncomment the insmod line with disksize_kb.
{/from original post}
Code:
#!/system/bin/sh
##adb push userinit.sh /system/sd/
uname_r=`uname -r`
moddir=`find /system/modules -type d -name $uname_r`
insmod=/system/bin/insmod
$insmod $moddir/compcache/xvmalloc.ko;
#$insmod $moddir/compcache/ramzswap.ko disksize_kb=32768;
$insmod $moddir/compcache/ramzswap.ko backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
# Experimental settings
echo 1 > /proc/sys/vm/page-cluster; # default: 3 Changes Page clustering from 8 to 2.
echo 5 > /proc/sys/vm/laptop_mode; # default: 0 Helps keep SSD from getting worn.
echo 5000 > /proc/sys/vm/dirty_expire_centisecs; # default: 3000
echo 800 > /proc/sys/vm/dirty_writeback_centisecs; # default: 500
echo 10 > /proc/sys/vm/dirty_background_ratio; # default: 5
echo 16 > /proc/sys/vm/dirty_ratio; # default: 10
#
swapon /dev/ramzswap0;
#swapon /dev/block/mmcblk0p3;
#Over Clock CPU when in use, puts at lower freq when idol. # if you don't want it.
echo 128000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
Edit: Thank Alapapa for the new code, will now work with all versions of CM 3.6.7 and higher!
Thanks! But it's not going to work if Cyanogen changes the kernal again.
2.6.29.6 is current... but probably not for long.
does the attached userinit come with those changes already or do u have to modd theose changes over to it
here's the code that will work if kernel version changes:
Code:
#!/system/bin/sh
##adb push userinit.sh /system/sd/
uname_r=`uname -r`
moddir=`find /system/modules -type d -name $uname_r`
insmod=/system/bin/insmod
$insmod $moddir/compcache/xvmalloc.ko;
#$insmod $moddir/compcache/ramzswap.ko disksize_kb=32768;
$insmod $moddir/compcache/ramzswap.ko backing_swap=/dev/block/mmcblk0p3;
mknod /dev/ramzswap0 b 253 0;
echo 20 > /proc/sys/vm/swappiness;
# Experimental settings
echo 1 > /proc/sys/vm/page-cluster; # default: 3 Changes Page clustering from 8 to 2.
echo 5 > /proc/sys/vm/laptop_mode; # default: 0 Helps keep SSD from getting worn.
echo 5000 > /proc/sys/vm/dirty_expire_centisecs; # default: 3000
echo 800 > /proc/sys/vm/dirty_writeback_centisecs; # default: 500
echo 10 > /proc/sys/vm/dirty_background_ratio; # default: 5
echo 16 > /proc/sys/vm/dirty_ratio; # default: 10
#
swapon /dev/ramzswap0;
#swapon /dev/block/mmcblk0p3;
#Over Clock CPU when in use, puts at lower freq when idol. # if you don't want it.
echo 128000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
thanks Alapapa, changed the script uptop and the one attached to your modifed script.
Denkai said:
thanks Alapapa, changed the script uptop and the one attached to your modifed script.
Click to expand...
Click to collapse
De nada...I got the kernel version magic from some thread on here at some point.
Cheers!
Denkai said:
# Experimental settings
echo 1 > /proc/sys/vm/page-cluster; # default: 3 Changes Page clustering from 8 to 2.
echo 5 > /proc/sys/vm/laptop_mode; # default: 0 Helps keep SSD from getting worn.
echo 5000 > /proc/sys/vm/dirty_expire_centisecs; # default: 3000
echo 800 > /proc/sys/vm/dirty_writeback_centisecs; # default: 500
echo 10 > /proc/sys/vm/dirty_background_ratio; # default: 5
echo 16 > /proc/sys/vm/dirty_ratio; # default: 10
#
swapon /dev/ramzswap0;
#swapon /dev/block/mmcblk0p3;
#Over Clock CPU when in use, puts at lower freq when idol. # if you don't want it.
echo 128000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
Click to expand...
Click to collapse
Any reason for setting page cluster to 1 instead of 0, as I think i saw earlier in the thread being recommended? Have you had better performance w/ setting it to 1? Thanks
I personally haven't screwed around with the paging. you may get better, you may not.
You could do away with this line since the CPU already scales to 528MHz:
Code:
echo 528000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
Click to expand...
Click to collapse
Add the following.:
Code:
echo 200 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias; # default: 0
#echo 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate; # For build <=3.9.1
"The powersave_bias parameter modifies the behavior of the ondemand governor to save more power by reducing the target frequency by a specified percentage. By default, (powersave_bias = 0), the ondemand governor selects the minimum processor frequency that can still complete a workload with minimal idle time. Doing so should result in the highest performance to power efficiency ratio. In some cases, you might prefer a greater emphasis on power efficiency than performance. In this case, set the powersave_bias parameter to a value between 1 and 1000 to reduce the target frequency by one-thousandth of that value. For example, set powersave_bias to 100 for a one-tenth reduction in target frequency. In this case, if the governor chooses a target frequency of 2 GHz (with powersave_bias = 100), the governor instead will request 1.8GHz – a one-tenth reduction. If 1.8 GHz is an exact match with an available hardware frequency (listed in the scaling_available_freq parameter), the processor is set to this frequency. If 1.8 GHz is not available, the processor fluctuates between the closest available upper and lower frequencies for an average frequency of 1.8 GHz."
If you notice lag, I would set it to 150; 100 was not much of a benefit. 250 will give you longer battery life for sure, but anything over that could result in major lag.
I pushed the file to /system/sd
I run cmd #free and there's 0 under swap
I run cmd #cat /proc/ramzswap and get an error
When I look in /system/sd the userinit.sh file is in lost+found... Did I do something wrong?
bhilgeman said:
I pushed the file to /system/sd
I run cmd #free and there's 0 under swap
I run cmd #cat /proc/ramzswap and get an error
When I look in /system/sd the userinit.sh file is in lost+found... Did I do something wrong?
Click to expand...
Click to collapse
Yeah same here (except my userinit.sh is not being moved to lost+found).
I ensured the permissions were fine... what am I doing wrong?
runderekrun said:
Yeah same here (except my userinit.sh is not being moved to lost+found).
I ensured the permissions were fine... what am I doing wrong?
Click to expand...
Click to collapse
Did you execute it or reboot? Just putting it there does nothing by itself.
In a shell, just do /system/sd/userinit.sh
What happens?
ttabbal said:
Did you execute it or reboot? Just putting it there does nothing by itself.
In a shell, just do /system/sd/userinit.sh
What happens?
Click to expand...
Click to collapse
you should not have to execute it.
ttabbal said:
Did you execute it or reboot? Just putting it there does nothing by itself.
In a shell, just do /system/sd/userinit.sh
What happens?
Click to expand...
Click to collapse
uwonsum said:
you should not have to execute it.
Click to expand...
Click to collapse
Yeah I thought Cyanogen's roms would auto-run userinit.sh?
Anyway trying to manually run it just throws up errors.
Is this correct for a linux swap partition?
I was unsure about lines
$insmod $moddir/compcache/xvmalloc.ko;
$insmod $moddir/compcache/ramzswap.ko
Does the $ mean i do not comment them out?
Code:
#!/system/bin/sh
## adb push userinit.sh /system/sd
#insmod /system/modules/lib/modules/2.6.29-cm/compcache/xvmalloc.ko;
#insmod /system/modules/lib/modules/2.6.29-cm/compcache/ramzswap.ko disksize_kb=32768;
#insmod /system/modules/lib/modules/2.6.29-cm/compcache/ramzswap.ko memlimit_kb=32768
#backing_swap=/dev/block/mmcblk0p3;
#insmod /system/modules/lib/modules/2.6.29-cm/compcache/ramzswap.ko
#backing_swap=/dev/block/mmcblk0p3;
#mknod /dev/ramzswap0 b 253 0;
echo 16 > /proc/sys/vm/swappiness; # default: 60
## Experimental settings
echo 1 > /proc/sys/vm/page-cluster; # default: 3
echo 5 > /proc/sys/vm/laptop_mode; # default: 0
echo 5000 > /proc/sys/vm/dirty_expire_centisecs; # default: 3000
echo 800 > /proc/sys/vm/dirty_writeback_centisecs; # default: 500
echo 10 > /proc/sys/vm/dirty_background_ratio; # default: 5
echo 16 > /proc/sys/vm/dirty_ratio; # default: 10
##
#swapon /dev/ramzswap0;
swapon /dev/block/mmcblk0p3;
## Additional experimental settings
echo 128000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq; # default: 245760
##
exit;
## commands to display useful system info
## **Do not uncomment**
# free
# top -m 8; displays only 8 processes
# cat /proc/swaps
# cat /proc/ramzswap0
# cat /proc/meminfo
# sysctl -a | grep vm
# cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
# vmstat -d 5 -n 10
Also i am stuck at work, so not ADB for me (don't want to install drivers on work pc)
Can i do this with userinit.sh on root of card
Code:
Code:
# su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cp /sdcard/userinit.sh /system/sd/userinit.sh
# chmod 755 /system/sd/userinit.sh
ekeefe41 said:
Is this correct for a linux swap partition?
Click to expand...
Click to collapse
Yes, and you should also comment out this backing_swap=/dev/block/mmcblk0p3;
uwonsum said:
Yes, and you should also comment out this backing_swap=/dev/block/mmcblk0p3;
Click to expand...
Click to collapse
ok, how about now ^^ i edited it
runderekrun said:
Yeah I thought Cyanogen's roms would auto-run userinit.sh?
Anyway trying to manually run it just throws up errors.
Click to expand...
Click to collapse
You have to execute it somehow. Cyanogen's roms do it on boot, that's why I said "execute OR reboot".
If you can't run it manually, it's probably not working on boot either. What errors is it throwing up?
ekeefe41 said:
ok, how about now ^^ i edited it
Click to expand...
Click to collapse
It's fine the way it is. But if you look at this thread, some of my experimental settings have been implemented into a new userinit.sh script with a user.conf file that makes things so easy where you wont ever have to touch the userinit.sh script.
Now, I have edited this new script. I corrected a line that could potentially pose a problem for people using a different kernel. I also added a few more options to the script that can be set in the user.conf file. I will post it on that thread in a few minutes.
ttabbal said:
You have to execute it somehow. Cyanogen's roms do it on boot, that's why I said "execute OR reboot".
If you can't run it manually, it's probably not working on boot either. What errors is it throwing up?
Click to expand...
Click to collapse
Sorry I missed the reboot comment.
I just don't understand it. It will not run the userinit.sh. It is saying it can't find it. If I try to run it with the wrong permissions it gives me a "Permission denied" but as soon as I chmod it too 755 it suddenly can't find the file...
I accidentally pasted the whole userinit.sh text the shell and it started working, so I have no idea whats wrong with this file. None what so ever.

[TWEAKS][SCRIPTS] Collection of 'em all - build.prop; init.d; etc.

On my ROMs adventure I've been collecting some tweaks and scripts and seems to me it's now time to share it. While some values in terms of optimization might fluctuate from device to device, I've found these pretty consistent throughout many.
Build.prop
(edit your /system/build.prop with a file manager with root access)
Careful for already existing settings. In this case, just change the values.
1. Force launcher into memory
Code:
ro.HOME_APP_ADJ=1
2. Raise JPG quality to 100%
Code:
ro.media.enc.jpeg.quality=100
3. VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=48m
4. Render UI with GPU
Code:
debug.sf.hw=1
5. Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6. Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=150
7. Save battery
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
8. Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
9. Increase overall touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
10. Raise photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
11. Signal (3G) tweaks
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
12. Net speed tweaks
Code:
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
13. Disable blackscreen issue after a call
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
14. Fix some application issues
Code:
ro.kernel.android.checkjni=0
15. Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
16. Force button lights on when screen is on
Code:
ro.mot.buttonlight.timeout=0
17. Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
18. Miscellaneous flags
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
19. Specifics to some LG devices
Code:
persist.service.pcsync.enable=0
persist.service.lgospd.enable=0
user.feature.flex=true
user.feature.lgdrm=false
user.feature.lgresource=false
user.feature.lgpoweroff=false
user.feature.ls_event=false
user.feature.ls_normal=false
user.feature.sui=false
Init.d
(needs ROM with init.d access and busybox, open empty file, insert header #!/system/bin/sh and put these there, save in /system/etc/init.d and name it something like 77tweaks)
1. strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2. internet speed tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3. vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
4. misc kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
5. battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6. EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
a) removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
b) perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
7. Flags blocks as non-rotational and increases cache size
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8. microSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9. Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
9. Remove logger
Code:
rm /dev/log/main
10. Ondemand governor tweaks
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11. Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
Code:
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12. Auto-zipalign on boot
(needs zipalign bin)
Code:
[url]http://forum.xda-developers.com/showthread.php?t=860586[/url]
13. Loopy Smoothness tweak
Code:
[url]http://forum.xda-developers.com/showthread.php?t=1137554[/url]
[url]http://forum.xda-developers.com/showthread.php?t=1205744[/url]
14. Move dalvik-cache to cache partition (if it's big enough) to free up data partition space
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
15. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
16. OOM groupings and priorities tweaks - SuperCharger
Code:
[url]http://forum.xda-developers.com/showthread.php?t=991276[/url]
GPS.conf
(create or edit your /system/etc/gps.conf with a file manager with root access)
For improving GPS lock time and signal.
a) European NTP server (replace for america or asia in your case)
Code:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
b) SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
Other tweaks or guidelines
1. Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
Code:
You can use AdFree application for this or changing manually your hosts file.
Here are some databases:
http://www.mvps.org/winhelp2002/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts
2. Use CyanogenMOD's APN list file - it's one of the most complete.
Code:
It's located in /system/etc/apns-conf.xml
3. Use UOT kitchen for basic theming on your device.
Code:
http://uot.dakra.lt/
4. Use Google's dns servers
Code:
Create an empty file, name it resolv.conf and put there these 2 lines:
nameserver 8.8.8.8
nameserver 8.8.4.4
Save to /system/etc/.
5. Update Superuser and su binary to latest version (3.0 beta)
Code:
http://goo-inside.me/superuser/
6. Disable sync feature in sqlite
(author: ownhere - needs a source for your device so you can compile the /system/lib/libsqlite.so)
Code:
Patch file here: http://forum.xda-developers.com/showthread.php?t=903507
7. Do not use task killers.
Alright, I think this is it for now.
If you have any other tweaks or better values, you can PM me and I'll include them.
Wow... Neojn, will tis work on lg optimus one? I know u used to have a optimus one...
Sent from LGE Secret phone using tapatalk app...
Most of them will, yeah.
Noejn said:
Most of them will, yeah.
Click to expand...
Click to collapse
Will try, thanks...
Sent from LGE Secret phone using tapatalk app...
my word thats a MASSIVE list lol thanks, some interesting tweaks there
Sent from my HTC Desire using XDA App
If I have time in the future I can create a script that applies them all.
(with a check of already existing tweaks / compatibility with the device, etc)
If some script fail it may cause bootloop? And can use for all device?
thanks for answer.
Deaw^^ said:
If some script fail it may cause bootloop? And can use for all device?
thanks for answer.
Click to expand...
Click to collapse
None of them should cause bootloop, at least if you follow everything I wrote.
Yes, they work on most devices. Just read what it needs.
how do i test this one because i cant remember what i rename the bold parts to lol
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
thanks in advanced
Eoghan
I hav another question..What is "Flags"?
- 18. Miscellaneous flags
- 7. Flags blocks as non-rotational and increases cache size
thanks for answer
eoghan2t7 said:
how do i test this one because i cant remember what i rename the bold parts to lol
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
thanks in advanced
Eoghan
Click to expand...
Click to collapse
It's like it says, you need the /dev/block/ path to system, data and cache partitions.
And they need to be formatted to ext4 of course.
This varies from device to device, whether it is emmc or mtd.
Running the command "mount" should give you the answer for both.
Deaw^^ said:
I hav another question..What is "Flags"?
- 18. Miscellaneous flags
- 7. Flags blocks as non-rotational and increases cache size
thanks for answer
Click to expand...
Click to collapse
As a noun it's like a property, as a verb is like defining.
Either way, I think I may have some time during next week to make a script to deploy these tweaks on most ROMs.
thanks ya knzo.
thanks . If you have time it would be awesome if you make a zip that can be flashed to CWM
I need a little help creating the script files. I dont need all of these tweaks. So, I need instructions on how to create the file with only what I need.
Can I create just one script file for all the tweaks or do they have to be seperate?
Sent from my Nexus One using Tapatalk
dgart08 said:
I need a little help creating the script files. I dont need all of these tweaks. So, I need instructions on how to create the file with only what I need.
Can I create just one script file for all the tweaks or do they have to be seperate?
Sent from my Nexus One using Tapatalk
Click to expand...
Click to collapse
Pm the tweaks you want and i can make the script for you
Sent from my GT540 using XDA Premium App
eoghan2t7 said:
Pm the tweaks you want and i can make the script for you
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
Thanks! I will PM you shortly...
Question... will these tweaks interfere w/ Juwe's Ram Script? Can they replace it?
dgart08 said:
Thanks! I will PM you shortly...
Question... will these tweaks interfere w/ Juwe's Ram Script? Can they replace it?
Click to expand...
Click to collapse
I will make it so it doesnt interfere with them
Sent from my GT540 using XDA Premium App
eoghan2t7 said:
I will make it so it doesnt interfere with them
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
...and maybe neither with supercharger/kickasskernel/3gturbocharger?
eoghan2t7 said:
I will make it so it doesnt interfere with them
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
PM sent. Thanks!
post removed

[FIX] Bricked kernel fix for kernel tuner users

Some people that used kernel tuner had some problems with kernel tuner! it worked good for sometime but after a specified time the min freq would stick to 918 mhz(boost freq as showp has explained) for both cores and not switching lower! This would make my phone very warm and drain my battery very fast! so i came up with a solution to reset the cpu min freq when you turn on/of your screen! This script i have made has worked very good and battery is in its best with this truly beast kernel! To install the script:
1.copy it in your sdcard
2.save it to a file like S98bricked_fix
3.push it in /system/etc/init.d
4. change permisions
5. reboot or run from terminal emulator
su [enter]
exec /system/etc/init.d/S98bricked_fix [enter]
6.while in terminal emulatur turn on off the screen to see if the script works! you should see cpu freq fixed and after turn on cpu freq refixed!
Ps:Kernel tuner is not needed in this kernel
The script:
#!/system/bin/sh
#
# ==============================================================
# ==============================================================
# begining of bricked fix loop by Mr.Nigma
# ==============================================================
# ==============================================================
(while [ 1 ];
do
# ==============================================================
# ==============================================================
# ==============================================================
# reset low when screen on
# ==============================================================
# ==============================================================
# ==============================================================
AWAKE=`cat /sys/power/wait_for_fb_wake`;
if [ $AWAKE = "awake" ]; then
sleep 2 && chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ;
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ;
echo cpu0 freq fixed;
AWAKE=;
fi;
# ==============================================================
# ==============================================================
# ==============================================================
# reset low whwn screen off
# ==============================================================
# ==============================================================
# ==============================================================
SLEEPING=`cat /sys/power/wait_for_fb_sleep`;
if [ $SLEEPING = "sleeping" ]; then
sleep 2 && chmod 666 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ;
echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq ;
echo cpu0 freq refixed;
SLEEPING=;
fi;
done &);
Get an error :
Sent from my HTC One S using Tapatalk 2
its not a sh script its a binary! you can change the name to smth like fix push it to system/bin
and call it with an init.d script liike
#!system/bin/sh
fix
EDIT:ill post a new version with led notification to notify when the script is running, tomorow!
Can't call it
Sent from my HTC One S using Tapatalk 2
are you sure you set the right permisions rwxrwxrwx??
Alternative would be to use SetCpu and just activate profiles. But this is cool too for those Kernel tuner fans.
echó en Android

[FAQ & Toubleshooing] ThinkingBridge ROM JB 4.2.2

[SIZE=+3]This thread has been created strictly for
Questions & Troubleshooting[/SIZE]
[SIZE=+2]Specific to[/SIZE]
{
"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"
}
[SIZE=+2]This thread has been created for people to share issues, question and help
while using this version of ThinkingBridge ROM​[/SIZE]
Link to ROM thread
PLEASE make sure to thank developer for the dedication to this ROM
Please do not clutter the Development thread with non development-related chatter
*​
F.A.Q. and COMMON ISSUES
Scripts in /etc/init.d/ folder doesn't work. Why?
At the moment you can use one of these apps as a workaround. They will run the 99kernel script (or any other script you like) at boot.
Script Manager: Play Store Link
Universal Init.d: Play Store Link
Because I noticed some errors with CPU settings while running the 99kernel script, I suggest to read the second post and to use the custom script posted there. It's basically the same script, but with CPU settings disabled.
To configure your CPU, you can find the useful tool coming with the ROM under Settings -> Common -> CPU Settings.
My phone gets hot and/or I have random reboots on low battery level.
This could be caused by your kernel settings. Please follow the instructions to run the 99kernel script with this configuration:
GPU=266667000
DD=200000000
FSYNC=2
Now set your CPU with this configuration (don't know how? read the first Q&A above):
Governor CPU: BADASS
Minimum CPU frequency: 384 MHz
Maximum CPU frequency: 1566 MHz
These settings should ensure good stability and good performance.
My UI starts to flicker, specially when I'm on lockscreen.
This is a beahvior experienced by some users. Developers are still looking for a fix. Any temporary solution/workaround will be posted here.
I'd really like to help in solving the "screen flickering issue". I'd like to get some informations to isolate the problem. Please answer these questions and post them here (when you have time and if you want, nothing mandatory!)
Are you disabling hardware overlay from Developer options?
Albino said that screen flickering can be caused by a memory leak in the framework: how many lockscreen widgets do you have? Do you use Ribbons?
Which kernel are you using?
Are you overclocking CPU or GPU? Please post your settings.
In your specific case: the problem is completely random, or does it happen on specific apps/actions?
init.d scripts
Hi guys! I hope you'll find this thread useful.
Sorry for crossposting, but I wanted to keep first post as clean as possible.
I'm trying to understand why scripts in init.d folder does not work. Searching around the web I found out that the android system can be set to run them or not by configuring something in the file init.rc. But I really don't know how to modify it and I read that this file shouldn't be modified by hand because it is re-created at every boot. I'm not a real expert. Can someone confirm this?
By the way I found a simple workaround to run the 99kernel script at boot.
I installed Script manager and I runned the 99kernel script. The script runs, but it gives "file not found" errors when trying to set CPU settings. I think this is beacuse the ROM handles this settings in a different way.
The other configurations in the script (like sweep2wake) are working properly. So I copied the script and I commented out the section related to CPU and I/O scheduler. Here's the code.
Code:
#!/system/bin/sh
#Script originally made by Axetilen. Modified by Sultan (android1234567)
#Updated for albinoman887's ChronicKernel (98% of the credit goes to android1234567. Thanks so much man :)
#Updated for ChronicKernel-linaro
# Configure your options here #
# Config default CPU Gonvernor (Disabled by default: When disabled uses internal Kernel setting)
# For better battery life switch to badass
# Kernel Default: ondemand
# Possible values
# badass
# ondemand
# interactive
#= lagfee
# performance
#GOV=badass
# Config I/O scheduler
# deadline
# cfq
# noop
# vr
# sio (default)
#IO=sio
# Config CPU max frequency
# Default: 1566000 (1566Mhtz)
# Overclockable to - 1836000 (1836Mhtz)
# for badass set to 1566mhtz (best performance/battery life)
#MAXFREQ=1566000
# Config CPU min frequency
# Default: 384000 (384Mhtz)
# Range 384000 - 1944000 (384Mhtz - 1944Mhtz)
#MINFREQ=384000
# Config 3D GPU clock
# 228571000 = 228mhz
# 266667000 = 267mhz (default)
# 300000000 = 300mhz (Recomended For balance of Performance and Battery life)
# 320000000 = 320mhz
GPU=266667000
# Config 2D GPU clock
# 145455000 = 145mhz
# 160000000 = 160mhz
# 200000000 = 200mhz (default)
# 228571000 = 228mhz (Recomended For balance of Performance and Battery life)
# 266667000 = 267mhz
DD=200000000
# Badass
# possible values
# 1 = performance
# 2 = balanced
# 3 = battery saving
#BADASS=2
# Enable Sweep2Wake
# 0 = disabled (default)
# 1 = enabled
# 2 = enabled (with no button backlight during sweep)
SWEEP=2
# Enable Fastcharge
# 0 = disabled
# 1 = substitute AC to USB charging always
# 2 = substitute AC to USB charging only if there is no USB peripheral detected
FASTCHARGE=0
# Fsync Control
# Disabled by default (recomended)
# 2 = Fsync disabled
# 1 = Fsync enabled
FSYNC=2
# TUN
# Disabled by default
# 0 = Disabled
# 1 = Enabled
TUN=0
# End of configurable options #
################# DON'T CHANGE ANYTHING BELOW THIS LINE #################
## Config CPU governor
# echo "$GOV" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# echo "$GOV" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
# Config 3D GPU setting
chmod 644 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
chmod 644 /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
echo $GPU > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
echo $GPU > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
# Config 2D GPU setting
chmod 644 /sys/devices/platform/kgsl-2d0.0/kgsl/kgsl-2d0/max_gpuclk
chmod 644 /sys/devices/platform/kgsl-2d0.0/kgsl/kgsl-2d0/gpuclk
chmod 644 /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/max_gpuclk
chmod 644 /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/gpuclk
echo $DD > /sys/devices/platform/kgsl-2d0.0/kgsl/kgsl-2d0/max_gpuclk
echo $DD > /sys/devices/platform/kgsl-2d0.0/kgsl/kgsl-2d0/gpuclk
echo $DD > /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/max_gpuclk
echo $DD > /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/gpuclk
# Config USB forced fastcharge
chmod 644 /sys/kernel/fast_charge/force_fast_charge
echo "$FASTCHARGE" > /sys/kernel/fast_charge/force_fast_charge
# Config Sweep2Wake (with compatibility with NLJ's fix)
if [ "$SWEEP" = "0" ]
then
chown radio.system /sys/android_touch/sweep2wake
chmod 664 /sys/android_touch/sweep2wake
echo 0 > /sys/android_touch/sweep2wake
fi
if [ "$SWEEP" = "1" ]
then
chown radio.system /sys/android_touch/sweep2wake
chmod 664 /sys/android_touch/sweep2wake
echo 1 > /sys/android_touch/sweep2wake
fi
if [ "$SWEEP" = "2" ]
then
chown radio.system /sys/android_touch/sweep2wake
chmod 664 /sys/android_touch/sweep2wake
echo 2 > /sys/android_touch/sweep2wake
fi
# Config badass CPU Gonvernor
#CUR_GOV="`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`"
#echo badass > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#sleep 3
#case ${BADASS} in
# 1)
# $L "badass: setting performance oriented configuration"
# echo 1188000 > /sys/devices/system/cpu/cpufreq/badass/two_phase_freq;
# echo 1512000 > /sys/devices/system/cpu/cpufreq/badass/three_phase_freq;
# echo 120 > /sys/devices/system/cpu/cpufreq/badass/busy_threshold;
# echo 80 > /sys/devices/system/cpu/cpufreq/badass/busy_clr_threshold;
# echo 8 > /sys/devices/system/cpu/cpufreq/badass/semi_busy_threshold;
# echo 4 > /sys/devices/system/cpu/cpufreq/badass/semi_busy_clr_threshold;
# ;;
# 2)
# $L "badass: setting balanced configuration"
# echo 918000 > /sys/devices/system/cpu/cpufreq/badass/two_phase_freq;
# echo 1188000 > /sys/devices/system/cpu/cpufreq/badass/three_phase_freq;
# echo 50000 > /sys/devices/system/cpu/cpufreq/badass/sampling_rate
# echo 130 > /sys/devices/system/cpu/cpufreq/badass/busy_threshold;
# echo 100 > /sys/devices/system/cpu/cpufreq/badass/busy_clr_threshold;
# echo 14 > /sys/devices/system/cpu/cpufreq/badass/semi_busy_threshold;
# echo 6 > /sys/devices/system/cpu/cpufreq/badass/semi_busy_clr_threshold;
# ;;
# 3)
# $L "badass: setting battery saving configuration"
# echo 918000 > /sys/devices/system/cpu/cpufreq/badass/two_phase_freq;
# echo 1188000 > /sys/devices/system/cpu/cpufreq/badass/three_phase_freq;
# echo 140 > /sys/devices/system/cpu/cpufreq/badass/busy_threshold;
# echo 110 > /sys/devices/system/cpu/cpufreq/badass/busy_clr_threshold;
# echo 80 > /sys/devices/system/cpu/cpufreq/badass/semi_busy_threshold;
# echo 20 > /sys/devices/system/cpu/cpufreq/badass/semi_busy_clr_threshold;
# ;;
#esac
#echo ${CUR_GOV} > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# Config CPU Frequency
# chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# echo $MAXFREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# echo $MINFREQ > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#
# chmod 644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
# echo $MAXFREQ > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
# chmod 644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
# echo $MINFREQ > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
# Config i/o scheduler
# chmod 644 /sys/block/mmcblk0/queue/scheduler
# echo "$IO" > /sys/block/mmcblk0/queue/scheduler
# chmod 644 /sys/block/mmcblk1/queue/scheduler
# echo "$IO" > /sys/block/mmcblk1/queue/scheduler
# Config Fsync
if [ "$FSYNC" = "2" ]
then
echo "0" > sys/class/misc/fsynccontrol/fsync_enabled
fi
# Config TUN
if [ "${TUN}" = "1" ]; then
if [ -e /system/lib/modules/tun.ko ] ; then
insmod /system/lib/modules/tun.ko
$L "Inserted tun kernel module."
fi
fi
This is the script with my setup. Modify it with your preferred settings.
With Script Manager you can run this script from every directory (I'm keeping it on my SD card) and you can run it at boot.
Open the script from Script Manager and select "Root" option and "Boot" option.
I also wrote a script to check if the settings are all ok. You can run it WITHOUT root privileges with Script Manager. Here's the code.
Code:
#!/system/bin/sh
# Simple script to check GPU frequencies and other kernel features status
# Created by TheWall
echo -n "3DGPU max: "
cat /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk
echo -n "3DGPU curr: "
cat /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/gpuclk
echo -n "2DGPU max: "
cat /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/max_gpuclk
echo -n "2DGPU curr: "
cat /sys/devices/platform/kgsl-2d1.1/kgsl/kgsl-2d1/gpuclk
echo -n "Fast Charge: "
FC=$(cat /sys/kernel/fast_charge/force_fast_charge)
if [ "$FC" = "0" ]
then
echo "disabled"
fi
if [ "$FC" = "1" ]
then
echo "substitute AC to USB charging always"
fi
if [ "$FC" = "2" ]
then
echo "substitute AC to USB charging only if there is no USB peripheral detected"
fi
echo -n "Sweep2Wake: "
S2W=$(cat /sys/android_touch/sweep2wake)
if [ "$S2W" = "0" ]
then
echo "disabled"
fi
if [ "$S2W" = "1" ]
then
echo "enabled"
fi
if [ "$S2W" = "2" ]
then
echo "enabled (no button backlight)"
fi
echo -n "Fsync: "
FS=$(cat sys/class/misc/fsynccontrol/fsync_enabled)
if [ "$FS" = "0" ]
then
echo "disabled"
else
echo "enabled"
fi
This is just a workaround, not a real fix. I'd like to know something more about this by ROM's dev.
Ps: as usual on xda, I'm not responsible for how you use the scripts in this post. If you don't know what you're doing don't mess with it!
Hi.. From where can I disable the google search bar.. I'm sorry but I'm not able to find any option for it...
Sent from my HTC Sensation using Tapatalk 4 Beta
nick_862003 said:
Hi.. From where can I disable the google search bar.. I'm sorry but I'm not able to find any option for it...
Sent from my HTC Sensation using Tapatalk 4 Beta
Click to expand...
Click to collapse
Google search bar? Do you mean the widget? Can't you tap and drag it to the X?
TheWall-[ITA] said:
Google search bar? Do you mean the widget? Can't you tap and drag it to the X?
Click to expand...
Click to collapse
Nope not the widget but permanent google search bar.. Please refer the attached screenshot..!
Sent from my HTC Sensation using Tapatalk 4 Beta
nick_862003 said:
Nope not the widget but permanent google search bar.. Please refer the attached screenshot..!
Sent from my HTC Sensation using Tapatalk 4 Beta
Click to expand...
Click to collapse
It must be something related to the default launcher. I use Nova, so I can't help you... sorry
nick_862003 said:
Nope not the widget but permanent google search bar.. Please refer the attached screenshot..!
Sent from my HTC Sensation using Tapatalk 4 Beta
Click to expand...
Click to collapse
you remove it from the trebuchet settings: homescreen > menu > trebuchet settings > homscreen
About the init.d scripts, I do not know what to edit, I also experienced it with Elegancia Sense 3.6 ROM, and as someone told me, I installed Universal Init.d (find it in play store), you can easily force the scripts to be run on boot.
Sent from my HTC Sensation XE with Beats Audio Z715e using xda app-developers app
ashkan-khatar said:
About the init.d scripts, I do not know what to edit, I also experienced it with Elegancia Sense 3.6 ROM, and as someone told me, I installed Universal Init.d (find it in play store), you can easily force the scripts to be run on boot.
Sent from my HTC Sensation XE with Beats Audio Z715e using xda app-developers app
Click to expand...
Click to collapse
Really cool info! Thanks!
I'm on another ROM right now, but I'm going to reflash thinkingbridge soon and try this. :good:
Yes that Universal inid.t.apk method works perfectly....
CONFIRMED
Hi guys i managed fix init.d and some init.rc in boot.img...
Now the rom superb with my custom 99kernel.
Once fresh install all working perfect even sweep2wake too...
If OP approved i can reupload this rom..
Sent from my GT-N7000 using xda app-developers app
pyramid-X said:
Hi guys i managed fix init.d and some init.rc in boot.img...
Now the rom superb with my custom 99kernel.
Once fresh install all working perfect even sweep2wake too...
If OP approved i can reupload this rom..
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
That's really really cool. Ask the developer in the ROM thread or send him a PM. :good:
S manager! how didn't i think about it before! you remind of me! finally can enable s2w on boot efficiently and cleanly!
big thanks to you OP!
AJ205 said:
you remove it from the trebuchet settings: homescreen > menu > trebuchet settings > homscreen
Click to expand...
Click to collapse
Thanx.. It worked
Sent from my HTC Sensation using Tapatalk 4 Beta
hi Guys,
I just installed this awesome ROM a few days a go. I like it very much but I'm having a problem with it.
The problem I mean is a flickering lockscreen and sometimes even the whole UI flickers so that I have to make a complete reboot.
I'm not sure but it seems at if the flickering only happens when my battery has less than 50% of its power.
Maybe someone can help me with this problem
best regards from Germany
eltasmanico said:
hi Guys,
I just installed this awesome ROM a few days a go. I like it very much but I'm having a problem with it.
The problem I mean is a flickering lockscreen and sometimes even the whole UI flickers so that I have to make a complete reboot.
I'm not sure but it seems at if the flickering only happens when my battery has less than 50% of its power.
Maybe someone can help me with this problem
best regards from Germany
Click to expand...
Click to collapse
I had this the first days but it went away after a couple of reboots, haven't seen it for over a week now. I know this isn't much help but if it's a problem before the system have build up its cache you might just have to sit tight and wait? Anyone else experience this?
Skickat från min HTC Sensation via Tapatalk 2
thank you for your quick answer.
Today I do not have this problem yet and my battery is down to 45% now. Maybe I will be lucky like you and the problem solves itselve like it was with your phone :fingers-crossed:
eltasmanico said:
hi Guys,
I just installed this awesome ROM a few days a go. I like it very much but I'm having a problem with it.
The problem I mean is a flickering lockscreen and sometimes even the whole UI flickers so that I have to make a complete reboot.
I'm not sure but it seems at if the flickering only happens when my battery has less than 50% of its power.
Maybe someone can help me with this problem
best regards from Germany
Click to expand...
Click to collapse
jorra said:
I had this the first days but it went away after a couple of reboots, haven't seen it for over a week now. I know this isn't much help but if it's a problem before the system have build up its cache you might just have to sit tight and wait? Anyone else experience this?
Skickat från min HTC Sensation via Tapatalk 2
Click to expand...
Click to collapse
Welcome guys!
Well, our ROM is based on the CM10.1 ROM from Ablinoman887. This problem has been reported several times from some users (not everybody) and the developer is trying to solve it.
Personally, I've never had this problem in any CM10.1 based ROM I tried so far. I hope it will get solved :good:
+1...
Sent from my GT-N7000 using xda app-developers app
just let's hope that this issue will be fixed in the near time or that it will be like it was at jorra's phone

[Tweak][Guide] Init.d Tweaks

Init.d Tweaks
(Needs ROM (Kernel) With init.d Access And Busybox, Open Empty File In Text Editor (Notepad ++ Or Similar), Insert Tweak You Want In Header,Save in /system/etc/init.d and name it Lomething Like 73tweaks)
1. Strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2. Internet speed tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3. Vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
4. Misc kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
5. Battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6. EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
a) removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
b) perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
7. Flags blocks as non-rotational and increases cache size
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8. microSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9. Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
9. Remove logger
Code:
rm /dev/log/main
10. Ondemand governor tweaks
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11. Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
Code:
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
Code:
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12. Move dalvik-cache to cache partition (if it's big enough) to free up data partition space
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
13. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
14. GPS.conf
(create or edit your /system/etc/gps.conf with a text editor)
a) European NTP server (replace for america or asia in your case)
Code:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
b) SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
Warning: Using these tweaks may brick your device. Use it with caution.
:good::good::good:
How can I know that my ROM / kernel support Init.d or not??
AK205 said:
How can I know that my ROM / kernel support Init.d or not??
Click to expand...
Click to collapse
Install Universal Init.d from Play Store and follow in-app instructions. Init.d support will be enabled on your device. Your device must be rooted first.
Build.prop tweaks by @bravonova
bravonova said:
Install Universal Init.d from Play Store and follow in-app instructions. Init.d support will be enabled on your device. Your device must be rooted first.
Click to expand...
Click to collapse
I make and init.d script and i copy your custom values to my init.d script. However, on net speed tweaks, the tcp_rmem and tcp_wmem didn't change the value at all even i edited it. Any help?
Should it be in text file or script file?
So we create a different text document containing each code for each tweak?? Not all In one document in the init.d folder??
Nice write up, bro. Thanks. Will have to try.
Guys so why aren't these enhancing tweaks and buildprop tweaks already available in our phones? Why aren't our phones optimized?
Tweaks good for one person or situation are not necessarily optimal for every case in general .
Medyredy said:
Guys so why aren't these enhancing tweaks and buildprop tweaks already available in our phones? Why aren't our phones optimized?
Click to expand...
Click to collapse
Can you help please?
Hello, I'm a newbie here. I wish to overclock my stock kernal, So it can be done through tweak? or I have to compile new overclock kernal from stock kernal source? Their's already a overclocked kernal for my device but its for cm11 and i want to use it on 4.1.2 JB stock ROM. Is their any simple way out?
Your help will be appreciated. Thanks .
use cm11 for s7392 or try
cm12 new developed
or stock i did give it to you before
choice is yours.......
i no longer have this device
rony raj said:
use cm11 for s7392 or try
cm12 new developed
or stock i did give it to you before
choice is yours.......
i no longer have this device
Click to expand...
Click to collapse
Thanks for suggesting new Cm12 kernal.
As of cm11, X264 encoding is important for me, plus their were some other minor bugs in that build. Though i agree its the best build compiled rom for Trend.
I will myself start some project after June~July.
What happened to your device though? You are among the few members who are guiding peoples on threads related to this device and i really appreciate it.

Categories

Resources