Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/system/bin/sh
- # This program is free software; you can redistribute it and/or modify it
- # under the terms of the GNU Library General Public License as published
- # by the Free Software Foundation; either version 2, or (at your option)
- # any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
- # Portions borrowed from k0nane and ACS Syndicate ROM
- log -p i -t init:setprop "INIT.setprop BEGIN:tweaking settings"
- #setting some properties on first boot
- if [ ! -e /data/local/animset ]
- then
- while [ ! -e /data/data/com.android.providers.settings/databases/settings.db ]
- do
- sleep 1
- done
- echo "running the tweak now"
- kill `pidof system_server`
- echo "REPLACE INTO \"system\" VALUES(123,'window_animation_scale','0.5');REPLACE INTO \"system\" VALUES(125,'transition_animation_scale','0.5');REPLACE INTO \"system\" VALUES(126,'haptic_feedback_enabled','0');REPLACE INTO \"secure\" VALUES(42,'install_non_market_apps','1');REPLACE INTO \"secure\" VALUES(27,'adb_enabled','1');REPLACE INTO \"secure\" VALUES(5,'assisted_gps_enabled','1');" | /system/xbin/sqlite3 /data/data/com.android.providers.settings/databases/settings.db
- kill `pidof system_server`
- echo "yes" > /data/local/animset
- fi
- #set scheduler for stl, bml, mmc, and tfsr
- STL=`ls -d /sys/block/stl*`
- BML=`ls -d /sys/block/bml*`
- MMC=`ls -d /sys/block/mmc*`
- TFS=`ls -d /sys/block/tfsr*`
- for i in $STL $BML $MMC $TFS; do
- echo "cfq" > $i/queue/scheduler
- echo "0" > $i/queue/rotational
- echo "1" > $i/queue/iosched/back_seek_penalty
- echo "1" > $i/queue/iosched/low_latency
- echo "3" > $i/queue/iosched/slice_idle
- echo "128" > $i/queue/read_ahead_kb # default: 128; (recomended: 128)
- echo 1000000000 > $i/queue/iosched/back_seek_max
- echo "16" > $i/queue/iosched/quantum # default: 4 (recomended: 16)
- echo "2048" > $i/queue/nr_requests # default:128 (recomended: 2048)
- done
- #Minfree RamBoost
- if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
- echo "Modifying minfree parameters"
- echo "2560,4096,6144,17408,19456,23552" > /sys/module/lowmemorykiller/parameters/minfree
- else
- echo "minfree not found"
- fi
- sysctl -p
- echo "0" > /proc/sys/vm/swappiness
- #echo "10" > /proc/sys/vm/dirty_ratio
- echo "24189" > /proc/sys/kernel/sched_features
- #mount -t debugfs none /sys/kernel/debug
- #echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
- log -p i -t init:setprop "INIT.setprop END:tweaking settings"
Advertisement
Add Comment
Please, Sign In to add comment