im trying to set up a linux_swap partition, but i dont want to use apps2sd, nor do i want to use cache2sd.
can someone point me in the right direction?
kchau said:
im trying to set up a linux_swap partition, but i dont want to use apps2sd, nor do i want to use cache2sd.
can someone point me in the right direction?
Click to expand...
Click to collapse
Just create the linux-swap partition and not the ext partition.
will i have to wipe?
and what is the recommended size?
supremeteam256 said:
Just create the linux-swap partition and not the ext partition.
Click to expand...
Click to collapse
Does that work now? I know it depends on how you are doing it, but assuming a build with auto apps2sd, the script just looks at partition number and will screw up if you do that. I think cyanogen has made adjustments in his experimental line.
im running cyanogen 4.0.4. will it work?
kchau said:
im running cyanogen 4.0.4. will it work?
Click to expand...
Click to collapse
if the script does that couldnt you create a 1mb ext2/3/4?
You also need to edit the user.conf file.
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
The usual setting is mmcblk0p3 but you need to set it to mmcblk0p2 because your linus swap part is going to be 2 instead of 3
This is for swap only with no compcache
#compcache related parameters
compcache{
compcache_en=0 # enable(1) or disable(0) compcache
cc_disksize=32 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limite the memory usage when backing swap is used
cc_backingswap_en=0 # enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p2 # pointing to the backingswap partition device
cc_swappiness=60 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
swappiness=60 # default 60
}
will compcache improve speed while running background applications?
so do i have to create an ext3 partition to put the userconf in there?
wait, where do i put the user.conf file then?
i read around and i think im supposed to put the user.conf file into /system/sd
i also enabled compcache. let me know if that is not advised.
with a 64mb swap
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0) compcache
cc_disksize=70 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limite the memory usage when backing swap is used
cc_backingswap_en=0 # enable or disable backing swap
cc_backingswap=/dev/block/mmcblk0p2 # pointing to the backingswap partition device
cc_swappiness=60 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
swappiness=60 # default 60
}
i have an issue with a boot loop at th eandroid screen now
ok, so, if i dont boot with the sd card inserted, it boots, but then i get to the home screen and it says none of my apps are installed.
so i go to recovery, remove the user.conf file. and same thing
so i restore, and boot with the sd card in. same thing, bootloop.
and now im restoring, but not booting with sd card.
what happened? was i not supposed to enable compcache? or keep the cc_disksize at 32?
so, ive been following this thread
http://forum.xda-developers.com/showthread.php?p=4379172
with this a2sd, it doesnt boot:
Code:
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# [email protected] (cyanogen)
#
echo "--- Welcome to Android/CyanogenMod!";
sysctl -p
# execute any postinstall script then kill it
if [ -e /data/firstboot.sh ];
then
echo "--- Executing firstboot.sh";
/system/bin/sh /data/firstboot.sh;
rm -f /data/firstboot.sh;
fi;
if [ -e /dev/block/mmcblk0p2 ];
then
echo "--- Checking ext filesystems";
# fsck the sdcard filesystem first
e2fsck -y /dev/block/mmcblk0p4;
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $?;
# mount and set perms
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p4 /system/sd;
busybox chown 1000:1000 /system/sd;
busybox chmod 771 /system/sd;
# clean up any old symlinks, create data directories
for i in dalvik-cache data;
do
if [ -h /data/$i ];
then
rm /data/$i;
fi;
if [ ! -d /data/$i ];
then
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
# don't allow /data/data on sd because of upgrade issues - move it if possible
if [ -d /system/sd/data ];
then
busybox cp -a /system/sd/data/* /data/data/;
busybox rm -rf /system/sd/data;
fi;
# move apps and dalvik cache from internal memory to sdcard
for i in app app-private dalvik-cache;
do
if [ ! -d /system/sd/$i ];
then
mkdir /system/sd/$i;
fi
busybox chown 1000:1000 /system/sd/$i;
busybox chmod 771 /system/sd/$i
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox cp -a /data/$i/* /system/sd/$i/;
busybox rm -f /data/$i/*;
fi;
done;
# symlink app dirs - they must be on the same filesystem
for i in app app-private;
do
if [ -d /data/$i ] && [ ! -h /data/$i ];
then
busybox rm -rf /data/$i;
busybox ln -s /system/sd/$i /data/$i;
fi;
done;
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /system/sd/dalvik-cache /data/dalvik-cache;
busybox chown 1000:1000 /data/dalvik-cache;
busybox chmod 771 /data/dalvik-cache;
# clean up old whiteouts
for i in local misc property system tombstones data;
do
if [ -h /system/sd/$i ]; then rm -f /system/sd/$i; fi
done;
# please don't put odex files in the app directory people!
# it causes dexopt to crash when switching builds!
busybox rm -f /system/sd/app/*.odex
# call a userinit.sh script if it's present on the sdcard
# otherwise just enable compcache with no backing swap
if [ -e /system/sd/userinit.sh ];
then
echo "--- Executing userinit.sh"
busybox chmod +x /system/sd/userinit.sh
/system/bin/sh /system/sd/userinit.sh;
else
modprobe ramzswap;
/system/bin/rzscontrol /dev/block/ramzswap0 --init
swapon /dev/block/ramzswap0
fi
setprop cm.a2sd.active 1;
echo "+++ Apps-to-SD successfully enabled";
else
# replace symlinks with directories so we can boot without sd
for i in app app-private;
do
if [ -h /data/$i ];
then
rm -f /data/$i;
mkdir /data/$i;
busybox chown 1000:1000 /data/$i;
busybox chmod 771 /data/$i;
fi;
done;
modprobe ramzswap;
/system/bin/rzscontrol /dev/block/ramzswap0 --init
swapon /dev/block/ramzswap0
setprop cm.a2sd.active 0;
fi;
sync;
setprop cm.filesystem.ready 1;
with this a2sd, no swap shows up when i go adb shell free:
Code:
#!/system/bin/sh
#
# Apps2SD using symlinks and bind mounts
# [email protected] (cyanogen)
#
echo "--- Welcome to Android/CyanogenMod!";
sysctl -p
# execute any postinstall script then kill it
if [ -e /data/firstboot.sh ];
then
echo "--- Executing firstboot.sh";
/system/bin/sh /data/firstboot.sh;
rm -f /data/firstboot.sh;
fi;
if [ -e /dev/block/mmcblk0p2 ];
then
echo "--- Checking ext filesystems";
# fsck the sdcard filesystem first
e2fsck -y /dev/block/mmcblk0p2;
# set property with exit code in case an error occurs
setprop cm.e2fsck.errors $?;
# mount and set perms
busybox mount -o noatime,nodiratime -t auto /dev/block/mmcblk0p2 /system/sd;
busybox chown 1000:1000 /system/sd;
busybox chmod 771 /system/sd;
fi;
sync;
setprop cm.filesystem.ready 1;
and with the default a2sd, no boot.
and this is my user.conf
Code:
# General parameters
general{
apps2sd=0 # this is useless here, require a modified a2sd script
media2sd=0 # moves the medias to sd if /system/sd/media exists
}
#compcache related parameters
compcache{
compcache_en=1 # enable(1) or disable(0) compcache
cc_disksize=70 # Ram swap disksize - any number between 1 to 95 should work
cc_memlimit=18 # Limit the memory usage for backing swap (cc .5x known issue-defaults to 15% of total RAM)
cc_backingswap_en=0 # enable(1) or disable(0) backing swap
cc_backingswap=/dev/block/mmcblk0p2 # pointing to the backingswap partition device
cc_swappiness=60 # default 60
}
#Linux swap parameters
#
# linux swap can only be enabled if cc_backingswap_en is set to "0"
#
linux_swap{
linux_swap_en=1 # enable(1) or disable(0) linux swap
linux_swap_partition=/dev/block/mmcblk0p2 # swap partition device
swappiness=60 # default 60
}
partition 1 is my fat32 which is whatever 8 gigs minus 64
partition 2 is 64 megs of linux_swap
WOW,
You have completely over complicated this. remove the user.conf file from every location you put it in, remove all partitions and leave it with none, boot in recovery and wipe, then reflash cyan 4.0.4. reboot. everything should be normal with no swap and it should ask you if you want to format the sd card. when you get it working normal post back here.
my whole point is not to wipe, and i dont want a2sd.
wiping and doing what you said above will enable a2sd.
what part of my previous post would enable apps2sd?
if you don't want to wipe, then at least do everything else i posted
ok, i removed all the user.conf and repartitioned my sdcard
now what?
reflash cyan 4.0.4 and boot so it will format the card
what is the make, size, and class of your sdcard?
why no apps2sd?
milestone 1 on cm7 0.08-11.04.24 7.0.1 , i have one ext3 partition on my sdcard, everything was working fine,
but after upgrading to cm7.1.0 RC0 11.05.03 yesterday , i can't move the dalvik-cache to ext partition any longer.
even if i do this
mv /data/dalvik-cache /sddata/dalvik-cache
ln -s /sd-ext/dalvik-cache/ /data/dalvik-cache
next time phone reboots, it delete my link and create dalvik-cache directory in "internal storage" while not on my ext3 partition
when i boot into OR 3.3 , the ext3 partition is mounted as /sddata
if i boot into phone ui, the ext3 partition is mounted as /sd-ext
i tiried linking to both directory , none of them works
anyone knows how to do it ?
[edit] after updating to 7.1.0 RC5 11.05.20, the file update-07app2ext-dalvik.on.ext.zip provided by zeppelin doesn't work , ahhhhh.
You will need to edit the 07app2ext file in /system/etc/init.d
Yep.
I did this yesterday actually since my internal storage was getting too low for my liking.
From github, the earlier 07app2ext:
Code:
#!/system/bin/sh
if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext
fi
if [ "`egrep -q $SD_EXT_DIRECTORY /proc/mounts;echo $?`" != "0" ];
then
echo "$SD_EXT_DIRECTORY not mounted.. skipping a2sd"
exit
fi
for dir in app app-private dalvik-cache;do
if [ "`egrep -q \"/data/${dir}\" /proc/mounts;echo $?`" != "0" ];
then
if [ ! -e "${SD_EXT_DIRECTORY}/${dir}" ];
then
install -m 771 -o 1000 -g 1000 -d ${SD_EXT_DIRECTORY}/${dir}
fi
if [ -L "/data/${dir}" ];
then
rm /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
if [ "${dir}" = "dalvik-cache" ];
then
if [ ! -L "/data/${dir}" ];
then
rm -rf /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
fi
if [ "${dir}" = "app" -o "${dir}" = "app-private" ];
then
for app in `find /data/${dir} -type f -iname "*.apk" -o -iname "*.zip"`;do
mv ${app} ${SD_EXT_DIRECTORY}/${dir}/
done
fi
mount -o bind ${SD_EXT_DIRECTORY}/${dir}/ /data/${dir}
fi
done
chmod 755 /system/etc/init.d/07app2ext
chown -R 0.2000 /system/etc/init.d
sleep 1
I just started using s2e from the market, its working so far
zeppelinrox said:
Yep.
I did this yesterday actually since my internal storage was getting too low for my liking.
From github, the earlier 07app2ext:
Code:
#!/system/bin/sh
if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext
fi
if [ "`egrep -q $SD_EXT_DIRECTORY /proc/mounts;echo $?`" != "0" ];
then
echo "$SD_EXT_DIRECTORY not mounted.. skipping a2sd"
exit
fi
for dir in app app-private dalvik-cache;do
if [ "`egrep -q \"/data/${dir}\" /proc/mounts;echo $?`" != "0" ];
then
if [ ! -e "${SD_EXT_DIRECTORY}/${dir}" ];
then
install -m 771 -o 1000 -g 1000 -d ${SD_EXT_DIRECTORY}/${dir}
fi
if [ -L "/data/${dir}" ];
then
rm /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
if [ "${dir}" = "dalvik-cache" ];
then
if [ ! -L "/data/${dir}" ];
then
rm -rf /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
fi
if [ "${dir}" = "app" -o "${dir}" = "app-private" ];
then
for app in `find /data/${dir} -type f -iname "*.apk" -o -iname "*.zip"`;do
mv ${app} ${SD_EXT_DIRECTORY}/${dir}/
done
fi
mount -o bind ${SD_EXT_DIRECTORY}/${dir}/ /data/${dir}
fi
done
chmod 755 /system/etc/init.d/07app2ext
chown -R 0.2000 /system/etc/init.d
sleep 1
Click to expand...
Click to collapse
It works on MIUI?
I think so.
It's based on CM7, yeah?
If people are using app2ext on MIUI then I'd say yes.
If it has an 07app2ext file, then it's 100% guaranteed.
What I did was I replaced the 07app2ext file in the update zip with the one above so when it gets flashed I don't have to do anything.
It has an 07app2ext file, so a replace with this and my app2ext didnt work anymore...
There is my older app2ext code:
Code:
#!/system/bin/sh
if [ "$SD_EXT_DIRECTORY" = "" ];
then
SD_EXT_DIRECTORY=/sd-ext
fi
if [ "`egrep -q $SD_EXT_DIRECTORY /proc/mounts;echo $?`" != "0" ];
then
echo "$SD_EXT_DIRECTORY not mounted.. skipping a2sd"
exit
fi
if [ -L "/data/dalvik-cache" ];
then
rm /data/dalvik-cache
install -m 771 -o 1000 -g 1000 -d /data/dalvik-cache
fi
if [ -e "${SD_EXT_DIRECTORY}/dalvik-cache" ];
then
rm -rf ${SD_EXT_DIRECTORY}/dalvik-cache
fi
for dir in app app-private;do
if [ "`egrep -q \"/data/${dir}\" /proc/mounts;echo $?`" != "0" ];
then
if [ ! -e "${SD_EXT_DIRECTORY}/${dir}" ];
then
install -m 771 -o 1000 -g 1000 -d ${SD_EXT_DIRECTORY}/${dir}
fi
if [ -L "/data/${dir}" ];
then
rm /data/${dir}
install -m 771 -o 1000 -g 1000 -d /data/${dir}
fi
if [ "${dir}" = "app" -o "${dir}" = "app-private" ];
then
for app in `find /data/${dir} -type f -iname "*.apk" -o -iname "*.zip"`;do
mv ${app} ${SD_EXT_DIRECTORY}/${dir}/
done
fi
mount -o bind ${SD_EXT_DIRECTORY}/${dir}/ /data/${dir}
fi
done
ah... sometimes that happens...
If you were to put that in the MIUI update zip and flash it, it will work.
I don't know why that happens.
When it happened to me I couldnt figure it out either since I made sure the permissions stayed the same. Maybe it would work as a standalone flashable zip but I have never made one.
Zeppe, can you send me your 07app2ext and tell me what permissions it have? I have 500 mb in the ext partition but i can load it to maximum 'cause my internal storage get full. Now i have about 80 apps, and only 22mb left in the internal storage.
Attached.
Permissions are the same as other files in ect/init.d
xxx
xox
ooo
But when I did it manually, it didn't work
edit... try the attached update.zip... it just might work
either way, the file is in there.
BAZINGA! lol!! It works!!! Thanks a lot zeppelin!
heh
Sent from my Milestone using Tapatalk
zeppelinrox said:
Attached.
Permissions are the same as other files in ect/init.d
xxx
xox
ooo
But when I did it manually, it didn't work
edit... try the attached update.zip... it just might work
either way, the file is in there.
Click to expand...
Click to collapse
zeppelinrox, can I apply this update on CM7 RC10? Is it safe to do it?
I want to move my dalvik cache to ext2 because my internal storage its almost full (less than 20MB free).
Yes its fine.
It's a mod of an overclock flashable zip so when you flash it, it gives an overclock related message.
You can also replace the app2ext script in the cm7 update with the one in this zip file with 7zip and without extracting the cm7 update.
I just leave it in AOR's update folder tho.
So when I flash a rom, I flash this too
Sent from my Milestone using Tapatalk
Thanks for this script, it works perfectly.
I've applied the update from AOR and after move any app from SD to ext2 and reboot, CM7 moves dalvik cache for that apps to ext2.
Now, I suppose any time I update the ROM then before reboot I need to apply this script again.
Sent from my Milestone using XDA App
Yes as an update would probably overwrite this app2ext script
Sent from my Milestone using Tapatalk
Original Thread: http://forum.xda-developers.com/showthread.php?t=1709836
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 be different from device to device, I've found these pretty consistent throughout many.
I didn't tested all of them, and i don't assume any risk!!! Use them at you own risk!!!
Some useful tips on how to use them at the end of the post
This thread will be updated when new/better things come out
Superuser, Busybox install/update
1. Easily install Busybox (YOU NEED ROOT FIRST)
Code:
https://play.google.com/store/apps/...DEsImNvbS5qcnVtbXkuYnVzeWJveC5pbnN0YWxsZXIiXQ..
2. UPDATE SuperUser (root app)
Code:
http://goo.im/superuser/
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=96m
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=12000000
ro.media.enc.hprof.vid.bps=12000000
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:
http://forum.xda-developers.com/showthread.php?t=860586
13. Loopy Smoothness tweak
Code:
http://forum.xda-developers.com/show....php?t=1137554
http://forum.xda-developers.com/show....php?t=1205744
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:
http://forum.xda-developers.com/showthread.php?t=991276
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.
sysctl_tweaks and sysctl.conf tweaks
added by krabappel2548 Thank him
To make them work:
1. make a new file in /system/etc/init.d, name it sysctl_tweaks
2. make a new file in /system/etc, name it sysctl.conf
3. Paste the right code in the right file
1. sysctl_tweaks
Code:
#!/system/bin/sh
# grep sysctl /etc/init.d/*
/etc/init.d/02vm:# Load /sys/etc/sysctl.conf
/etc/init.d/02vm:sysctl -p
2. sysctl.conf
Code:
#sysctl.conf file
############################
# Battery life tweaks #
############################
sysctl -w vm.dirty_writeback_centisecs=3000;
sysctl -w vm.dirty_expire_centisecs=500;
############################
# kernel tweaks #
############################
sysctl -w kernel.sched_features=15834233;
sysctl -w kernel.msgmni=1024;
sysctl -w kernel.msgmax=64000;
sysctl -w kernel.shmmax=268435456;
sysctl -w kernel.shmall=2097152;
sysctl -w kernel.sem="500 512000 100 2048";
sysctl -w kernel.hung_task_timeout_secs=0;
sysctl -w kernel.sched_latency_ns=18000000;
sysctl -w kernel.sched_compat_yield=1;
sysctl -w kernel.sched_shares_ratelimit=256000;
sysctl -w kernel.sched_child_runs_first=0;
sysctl -w kernel.threads-max=10000;
sysctl -w kernel.panic=30;
sysctl -w kernel.panic_on_oops=1;
sysctl -w kernel.sched_features=24189;
sysctl -w kernel.sched_min_granularity_ns=1500000;
sysctl -w kernel.sched_wakeup_granularity_ns=3000000;
############################
# CPU tweaks #
############################
# Queue size modifications
sysctl -w net.core.optmem_max=20480;
sysctl -w net.unix.max_dgram_qlen=50;
# Net Core Settings
# Location: /proc/sys/net/core
sysctl -w net.core.wmem_max=524288;
sysctl -w net.core.rmem_max=524288;
sysctl -w net.core.rmem_default=256960;
sysctl -w net.core.wmem_default=256960;
############################
# VM & Filesystem tweaks #
############################
sysctl -w fs.lease-break-time=10;
sysctl -w fs.file-max=65536;
sysctl -w vm.overcommit_memory=1;
sysctl -w vm.min_free_order_shift=4;
sysctl -w vm.block_dump=0;
sysctl -w vm.oom_dump_tasks=1;
sysctl -w vm.page-cluster=3;
############################
# Net Speed tweaks #
############################
# UnderUtilized Networking Tweaks below as recommended by avgjoemomma (from XDA)
sysctl -w net.ipv4.tcp_congestion_control=cubic;
# Hardening the TCP/IP stack to SYN attacks
sysctl -w net.ipv4.tcp_syncookies=1;
sysctl -w net.ipv4.conf.all.rp_filter=1;
sysctl -w net.ipv4.conf.default.rp_filter=1;
sysctl -w net.ipv4.tcp_synack_retries=2;
sysctl -w net.ipv4.tcp_syn_retries=2;
sysctl -w net.ipv4.tcp_max_syn_backlog=1024;
sysctl -w net.ipv4.tcp_max_tw_buckets=16384;
sysctl -w net.ipv4.icmp_echo_ignore_all=1;
sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1;
sysctl -w net.ipv4.tcp_no_metrics_save=1;
sysctl -w net.ipv4.tcp_fin_timeout=15;
sysctl -w net.ipv4.tcp_keepalive_time=1800;
sysctl -w net.ipv4.ip_forward=0;
sysctl -w net.ipv4.tcp_moderate_rcvbuf=1;
sysctl -w net.ipv4.route.flush=1;
sysctl -w net.ipv4.udp_rmem_min=6144;
sysctl -w net.ipv4.udp_wmem_min=6144;
sysctl -w net.ipv4.tcp_rfc1337=1;
sysctl -w net.ipv4.ip_no_pmtu_disc=0;
sysctl -w net.ipv4.tcp_ecn=0;
sysctl -w net.ipv4.tcp_sack=1;
sysctl -w net.ipv4.tcp_fack=1;
# Don't accept source routing
sysctl -w net.ipv4.conf.default.accept_source_route=0 ;
sysctl -w net.ipv4.conf.all.accept_source_route=0;
# Don't accept redirects
sysctl -w net.ipv4.conf.all.accept_redirects=0;
sysctl -w net.ipv4.conf.default.accept_redirects=0;
sysctl -w net.ipv4.conf.all.secure_redirects=0;
sysctl -w net.ipv4.conf.default.secure_redirects=0;
This is another init.d tweak It's a battery calibration script
3. This is my battery calibration tweak
Code:
#!/system/bin/sh
# ========================================
# init.d script for KA Xperia SSpeed
# made by krabappel2548
# ========================================
SLEEP=120
if [ -e /data/.battery-calibrated ] ; then
exit 0
fi
(
while : ; do
LEVEL=$(cat /sys/class/power_supply/battery/capacity)
CUR=$(cat /sys/class/power_supply/battery/batt_current)
if [ "$LEVEL" == "100" ] && [ "$CUR" == "0" ] ; then
log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR***: calibrating..."
rm -f /data/system/batterystats.bin
touch /data/.battery-calibrated
exit 0
fi
# log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR ***: sleeping for $SLEEP s..."
sleep $SLEEP
done
) &
#Disable normalize sleeper
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
#battery tweaks (sleepers)
mount -t debugfs none /sys/kernel/debug
echo NO_NEW_FAIR_SLEEPERS > /sys/kernel/debug/sched_features;
echo NO_NORMALIZED_SLEEPERS > /sys/kernel/debug/sched_features;
umount /sys/kernel/debug
Tips Combined twaks and apps
Still testing better values to add!
1. incredibile fast browsing in zoomed pages with no shutters!
♦ VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=96m
♦ Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=250
♦ Opera Mobile Browser
2. Faster internet speed
♦ 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
♦ 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
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
thanks to
kenzo
krabappel2548
its really usefull .. will try it
Sent from my Xperia Arc S using Tapatalk 2
great work, really really great work man! Especially that with the bootanimation! Has it taken much time to gather them all?
Master of Bisaster said:
great work, really really great work man! Especially that with the bootanimation! Has it taken much time to gather them all?
Click to expand...
Click to collapse
you bet..
of course a lot of time man
good job!these will be helpful..
Sent from my ST18i using xda premium
Is this work for Arc S with custom ROM,,,??? coz I saw the "htc" word on 3G tweak script
Sent from my LT18 using xda premium
it would be helpfull know which improove and which deprove specific Rom.
Im using JS 6.1 and for example i dont know if for example this random row:
- wifi.supplicant_scan_interval=180
could improove this rom or it has some better settings somehow
deniel said:
it would be helpfull know which improove and which deprove specific Rom.
Im using JS 6.1 and for example i dont know if for example this random row:
- wifi.supplicant_scan_interval=180
could improove this rom or it has some better settings somehow
Click to expand...
Click to collapse
guys this is for all roms man...plz press thanx
AndriyeZ said:
Is this work for Arc S with custom ROM,,,??? coz I saw the "htc" word on 3G tweak script
Sent from my LT18 using xda premium
Click to expand...
Click to collapse
dude
its a command not really htc company lol....
XtremeSilencer said:
dude
its a command not really htc company lol....
Click to expand...
Click to collapse
hahaha..just wondering mate
I'Ve been used this tweaks
"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"
but without the two lines of "htcmaskw1.bitmask=...."
so what the different ??
AndriyeZ said:
hahaha..just wondering mate
I'Ve been used this tweaks
"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"
but without the two lines of "htcmaskw1.bitmask=...."
so what the different ??
Click to expand...
Click to collapse
Actually htcmaskw1 command sets the perbit mask tranfer means that when u r on ur data conncetion in no wifi u get the max speed by the value
so the most optimized value has to be said there
XtremeSilencer said:
Actually htcmaskw1 command sets the perbit mask tranfer means that when u r on ur data conncetion in no wifi u get the max speed by the value
so the most optimized value has to be said there
Click to expand...
Click to collapse
Got it...thanks mate..
Sent from my Xperia Arc using xda premium
XtremeSilencer said:
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 be different from device to device, I've found these pretty consistent throughout many.
I didn't tested all of them, and i don't assume any risk!!! Use them at you own risk!!!
Some useful tips on how to use them at the end of the post
This thread will be updated when new/better things come out
Superuser, Busybox install/update
1. Easily install Busybox (YOU NEED ROOT FIRST)
Code:
https://play.google.com/store/apps/...DEsImNvbS5qcnVtbXkuYnVzeWJveC5pbnN0YWxsZXIiXQ..
2. UPDATE SuperUser (root app)
Code:
http://goo.im/superuser/
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=96m
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=12000000
ro.media.enc.hprof.vid.bps=12000000
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:
http://forum.xda-developers.com/showthread.php?t=860586
13. Loopy Smoothness tweak
Code:
http://forum.xda-developers.com/show....php?t=1137554
http://forum.xda-developers.com/show....php?t=1205744
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:
http://forum.xda-developers.com/showthread.php?t=991276
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.
sysctl_tweaks and sysctl.conf tweaks
added by krabappel2548 Thank him
To make them work:
1. make a new file in /system/etc/init.d, name it sysctl_tweaks
2. make a new file in /system/etc, name it sysctl.conf
3. Paste the right code in the right file
1. sysctl_tweaks
Code:
#!/system/bin/sh
# grep sysctl /etc/init.d/*
/etc/init.d/02vm:# Load /sys/etc/sysctl.conf
/etc/init.d/02vm:sysctl -p
2. sysctl.conf
Code:
#sysctl.conf file
############################
# Battery life tweaks #
############################
sysctl -w vm.dirty_writeback_centisecs=3000;
sysctl -w vm.dirty_expire_centisecs=500;
############################
# kernel tweaks #
############################
sysctl -w kernel.sched_features=15834233;
sysctl -w kernel.msgmni=1024;
sysctl -w kernel.msgmax=64000;
sysctl -w kernel.shmmax=268435456;
sysctl -w kernel.shmall=2097152;
sysctl -w kernel.sem="500 512000 100 2048";
sysctl -w kernel.hung_task_timeout_secs=0;
sysctl -w kernel.sched_latency_ns=18000000;
sysctl -w kernel.sched_compat_yield=1;
sysctl -w kernel.sched_shares_ratelimit=256000;
sysctl -w kernel.sched_child_runs_first=0;
sysctl -w kernel.threads-max=10000;
sysctl -w kernel.panic=30;
sysctl -w kernel.panic_on_oops=1;
sysctl -w kernel.sched_features=24189;
sysctl -w kernel.sched_min_granularity_ns=1500000;
sysctl -w kernel.sched_wakeup_granularity_ns=3000000;
############################
# CPU tweaks #
############################
# Queue size modifications
sysctl -w net.core.optmem_max=20480;
sysctl -w net.unix.max_dgram_qlen=50;
# Net Core Settings
# Location: /proc/sys/net/core
sysctl -w net.core.wmem_max=524288;
sysctl -w net.core.rmem_max=524288;
sysctl -w net.core.rmem_default=256960;
sysctl -w net.core.wmem_default=256960;
############################
# VM & Filesystem tweaks #
############################
sysctl -w fs.lease-break-time=10;
sysctl -w fs.file-max=65536;
sysctl -w vm.overcommit_memory=1;
sysctl -w vm.min_free_order_shift=4;
sysctl -w vm.block_dump=0;
sysctl -w vm.oom_dump_tasks=1;
sysctl -w vm.page-cluster=3;
############################
# Net Speed tweaks #
############################
# UnderUtilized Networking Tweaks below as recommended by avgjoemomma (from XDA)
sysctl -w net.ipv4.tcp_congestion_control=cubic;
# Hardening the TCP/IP stack to SYN attacks
sysctl -w net.ipv4.tcp_syncookies=1;
sysctl -w net.ipv4.conf.all.rp_filter=1;
sysctl -w net.ipv4.conf.default.rp_filter=1;
sysctl -w net.ipv4.tcp_synack_retries=2;
sysctl -w net.ipv4.tcp_syn_retries=2;
sysctl -w net.ipv4.tcp_max_syn_backlog=1024;
sysctl -w net.ipv4.tcp_max_tw_buckets=16384;
sysctl -w net.ipv4.icmp_echo_ignore_all=1;
sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1;
sysctl -w net.ipv4.tcp_no_metrics_save=1;
sysctl -w net.ipv4.tcp_fin_timeout=15;
sysctl -w net.ipv4.tcp_keepalive_time=1800;
sysctl -w net.ipv4.ip_forward=0;
sysctl -w net.ipv4.tcp_moderate_rcvbuf=1;
sysctl -w net.ipv4.route.flush=1;
sysctl -w net.ipv4.udp_rmem_min=6144;
sysctl -w net.ipv4.udp_wmem_min=6144;
sysctl -w net.ipv4.tcp_rfc1337=1;
sysctl -w net.ipv4.ip_no_pmtu_disc=0;
sysctl -w net.ipv4.tcp_ecn=0;
sysctl -w net.ipv4.tcp_sack=1;
sysctl -w net.ipv4.tcp_fack=1;
# Don't accept source routing
sysctl -w net.ipv4.conf.default.accept_source_route=0 ;
sysctl -w net.ipv4.conf.all.accept_source_route=0;
# Don't accept redirects
sysctl -w net.ipv4.conf.all.accept_redirects=0;
sysctl -w net.ipv4.conf.default.accept_redirects=0;
sysctl -w net.ipv4.conf.all.secure_redirects=0;
sysctl -w net.ipv4.conf.default.secure_redirects=0;
This is another init.d tweak It's a battery calibration script
3. This is my battery calibration tweak
Code:
#!/system/bin/sh
# ========================================
# init.d script for KA Xperia SSpeed
# made by krabappel2548
# ========================================
SLEEP=120
if [ -e /data/.battery-calibrated ] ; then
exit 0
fi
(
while : ; do
LEVEL=$(cat /sys/class/power_supply/battery/capacity)
CUR=$(cat /sys/class/power_supply/battery/batt_current)
if [ "$LEVEL" == "100" ] && [ "$CUR" == "0" ] ; then
log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR***: calibrating..."
rm -f /data/system/batterystats.bin
touch /data/.battery-calibrated
exit 0
fi
# log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR ***: sleeping for $SLEEP s..."
sleep $SLEEP
done
) &
#Disable normalize sleeper
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
#battery tweaks (sleepers)
mount -t debugfs none /sys/kernel/debug
echo NO_NEW_FAIR_SLEEPERS > /sys/kernel/debug/sched_features;
echo NO_NORMALIZED_SLEEPERS > /sys/kernel/debug/sched_features;
umount /sys/kernel/debug
Tips Combined twaks and apps
Still testing better values to add!
1. incredibile fast browsing in zoomed pages with no shutters!
♦ VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=96m
♦ Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=250
♦ Opera Mobile Browser
2. Faster internet speed
♦ 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
♦ 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
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
thanks to
kenzo
krabappel2548
Click to expand...
Click to collapse
sorry for the whole quoted msg but please have a look here before you thanx to starter of this thread
As you prolly see there is EXACTLY same post as here but with wrapped codes on each tweak
XtremeSilencer said:
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
Click to expand...
Click to collapse
That seems very strict for a 512mb Ram device. Have you tested this one on arc/s?
Nooby Arc S User said:
That seems very strict for a 512mb Ram device. Have you tested this one on arc/s?
Click to expand...
Click to collapse
tested in arc s mate
Turn Off LTE on Boot Init.d Script
On my LG Optimus G, even though I can select "GSM / WCDMA preferred" to disable LTE after a reboot it defaults back to "GSM / WCDMA / LTE".
I don't live anywhere near LTE and would like to have LTE turned off after powering up my phone. Is there anyway to create an init'd script for that?
I have done so much research and came up empty. This is actually a greatly wanted feature in the LGOG forums. Any help would be greatly appreciated. Thanks.
Thank you very Much! Very Awesome!
new performance tweaks!
us them in your rom but give credits!
XtremeSilencer said:
Original Thread: http://forum.xda-developers.com/showthread.php?t=1709836
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 be different from device to device, I've found these pretty consistent throughout many.
I didn't tested all of them, and i don't assume any risk!!! Use them at you own risk!!!
Some useful tips on how to use them at the end of the post
This thread will be updated when new/better things come out
Superuser, Busybox install/update
1. Easily install Busybox (YOU NEED ROOT FIRST)
Code:
https://play.google.com/store/apps/...DEsImNvbS5qcnVtbXkuYnVzeWJveC5pbnN0YWxsZXIiXQ..
2. UPDATE SuperUser (root app)
Code:
http://goo.im/superuser/
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=96m
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=12000000
ro.media.enc.hprof.vid.bps=12000000
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:
http://forum.xda-developers.com/showthread.php?t=860586
13. Loopy Smoothness tweak
Code:
http://forum.xda-developers.com/show....php?t=1137554
http://forum.xda-developers.com/show....php?t=1205744
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:
http://forum.xda-developers.com/showthread.php?t=991276
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.
sysctl_tweaks and sysctl.conf tweaks
added by krabappel2548 Thank him
To make them work:
1. make a new file in /system/etc/init.d, name it sysctl_tweaks
2. make a new file in /system/etc, name it sysctl.conf
3. Paste the right code in the right file
1. sysctl_tweaks
Code:
#!/system/bin/sh
# grep sysctl /etc/init.d/*
/etc/init.d/02vm:# Load /sys/etc/sysctl.conf
/etc/init.d/02vm:sysctl -p
2. sysctl.conf
Code:
#sysctl.conf file
############################
# Battery life tweaks #
############################
sysctl -w vm.dirty_writeback_centisecs=3000;
sysctl -w vm.dirty_expire_centisecs=500;
############################
# kernel tweaks #
############################
sysctl -w kernel.sched_features=15834233;
sysctl -w kernel.msgmni=1024;
sysctl -w kernel.msgmax=64000;
sysctl -w kernel.shmmax=268435456;
sysctl -w kernel.shmall=2097152;
sysctl -w kernel.sem="500 512000 100 2048";
sysctl -w kernel.hung_task_timeout_secs=0;
sysctl -w kernel.sched_latency_ns=18000000;
sysctl -w kernel.sched_compat_yield=1;
sysctl -w kernel.sched_shares_ratelimit=256000;
sysctl -w kernel.sched_child_runs_first=0;
sysctl -w kernel.threads-max=10000;
sysctl -w kernel.panic=30;
sysctl -w kernel.panic_on_oops=1;
sysctl -w kernel.sched_features=24189;
sysctl -w kernel.sched_min_granularity_ns=1500000;
sysctl -w kernel.sched_wakeup_granularity_ns=3000000;
############################
# CPU tweaks #
############################
# Queue size modifications
sysctl -w net.core.optmem_max=20480;
sysctl -w net.unix.max_dgram_qlen=50;
# Net Core Settings
# Location: /proc/sys/net/core
sysctl -w net.core.wmem_max=524288;
sysctl -w net.core.rmem_max=524288;
sysctl -w net.core.rmem_default=256960;
sysctl -w net.core.wmem_default=256960;
############################
# VM & Filesystem tweaks #
############################
sysctl -w fs.lease-break-time=10;
sysctl -w fs.file-max=65536;
sysctl -w vm.overcommit_memory=1;
sysctl -w vm.min_free_order_shift=4;
sysctl -w vm.block_dump=0;
sysctl -w vm.oom_dump_tasks=1;
sysctl -w vm.page-cluster=3;
############################
# Net Speed tweaks #
############################
# UnderUtilized Networking Tweaks below as recommended by avgjoemomma (from XDA)
sysctl -w net.ipv4.tcp_congestion_control=cubic;
# Hardening the TCP/IP stack to SYN attacks
sysctl -w net.ipv4.tcp_syncookies=1;
sysctl -w net.ipv4.conf.all.rp_filter=1;
sysctl -w net.ipv4.conf.default.rp_filter=1;
sysctl -w net.ipv4.tcp_synack_retries=2;
sysctl -w net.ipv4.tcp_syn_retries=2;
sysctl -w net.ipv4.tcp_max_syn_backlog=1024;
sysctl -w net.ipv4.tcp_max_tw_buckets=16384;
sysctl -w net.ipv4.icmp_echo_ignore_all=1;
sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1;
sysctl -w net.ipv4.tcp_no_metrics_save=1;
sysctl -w net.ipv4.tcp_fin_timeout=15;
sysctl -w net.ipv4.tcp_keepalive_time=1800;
sysctl -w net.ipv4.ip_forward=0;
sysctl -w net.ipv4.tcp_moderate_rcvbuf=1;
sysctl -w net.ipv4.route.flush=1;
sysctl -w net.ipv4.udp_rmem_min=6144;
sysctl -w net.ipv4.udp_wmem_min=6144;
sysctl -w net.ipv4.tcp_rfc1337=1;
sysctl -w net.ipv4.ip_no_pmtu_disc=0;
sysctl -w net.ipv4.tcp_ecn=0;
sysctl -w net.ipv4.tcp_sack=1;
sysctl -w net.ipv4.tcp_fack=1;
# Don't accept source routing
sysctl -w net.ipv4.conf.default.accept_source_route=0 ;
sysctl -w net.ipv4.conf.all.accept_source_route=0;
# Don't accept redirects
sysctl -w net.ipv4.conf.all.accept_redirects=0;
sysctl -w net.ipv4.conf.default.accept_redirects=0;
sysctl -w net.ipv4.conf.all.secure_redirects=0;
sysctl -w net.ipv4.conf.default.secure_redirects=0;
This is another init.d tweak It's a battery calibration script
3. This is my battery calibration tweak
Code:
#!/system/bin/sh
# ========================================
# init.d script for KA Xperia SSpeed
# made by krabappel2548
# ========================================
SLEEP=120
if [ -e /data/.battery-calibrated ] ; then
exit 0
fi
(
while : ; do
LEVEL=$(cat /sys/class/power_supply/battery/capacity)
CUR=$(cat /sys/class/power_supply/battery/batt_current)
if [ "$LEVEL" == "100" ] && [ "$CUR" == "0" ] ; then
log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR***: calibrating..."
rm -f /data/system/batterystats.bin
touch /data/.battery-calibrated
exit 0
fi
# log -p i -t battery-calibration "*** LEVEL: $LEVEL CUR: $CUR ***: sleeping for $SLEEP s..."
sleep $SLEEP
done
) &
#Disable normalize sleeper
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
#battery tweaks (sleepers)
mount -t debugfs none /sys/kernel/debug
echo NO_NEW_FAIR_SLEEPERS > /sys/kernel/debug/sched_features;
echo NO_NORMALIZED_SLEEPERS > /sys/kernel/debug/sched_features;
umount /sys/kernel/debug
Tips Combined twaks and apps
Still testing better values to add!
1. incredibile fast browsing in zoomed pages with no shutters!
♦ VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=96m
♦ Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=250
♦ Opera Mobile Browser
2. Faster internet speed
♦ 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
♦ 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
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
thanks to
kenzo
krabappel2548
Click to expand...
Click to collapse
I wish someone could turn this into a flashable zip. I'm a noob so it would be great!
great collections of script..
but on newer kitkat some of this script is not found?