chris41g

12-runtweaks

May 19th, 2011
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.69 KB | None | 0 0
  1. #!/system/bin/sh
  2. # This program is free software; you can redistribute it and/or modify it
  3. # under the terms of the GNU Library General Public License as published
  4. # by the Free Software Foundation; either version 2, or (at your option)
  5. # any later version.
  6. #
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. #
  12. # License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>
  13. # Portions borrowed from k0nane and ACS Syndicate ROM
  14. log -p i -t init:setprop "INIT.setprop BEGIN:tweaking settings"
  15. #setting some properties on first boot
  16. if [ ! -e /data/local/animset ]
  17.     then
  18.         while [ ! -e /data/data/com.android.providers.settings/databases/settings.db ]
  19.             do
  20.                 sleep 1
  21.         done
  22.         echo "running the tweak now"
  23.         kill `pidof system_server`
  24.         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
  25.         kill `pidof system_server`
  26.         echo "yes" > /data/local/animset
  27. fi
  28. #set scheduler for stl, bml, mmc, and tfsr
  29. STL=`ls -d /sys/block/stl*`
  30. BML=`ls -d /sys/block/bml*`
  31. MMC=`ls -d /sys/block/mmc*`
  32. TFS=`ls -d /sys/block/tfsr*`
  33. for i in $STL $BML $MMC $TFS; do
  34.     echo "cfq" > $i/queue/scheduler
  35.     echo "0" > $i/queue/rotational
  36.     echo "1" > $i/queue/iosched/back_seek_penalty
  37.     echo "1" > $i/queue/iosched/low_latency
  38.     echo "3" > $i/queue/iosched/slice_idle
  39.     echo "128" > $i/queue/read_ahead_kb # default: 128; (recomended: 128)
  40.     echo 1000000000 > $i/queue/iosched/back_seek_max
  41.     echo "16" > $i/queue/iosched/quantum    # default: 4 (recomended: 16)  
  42.     echo "2048" > $i/queue/nr_requests  # default:128 (recomended: 2048)
  43. done
  44. #Minfree RamBoost
  45. if [ -e /sys/module/lowmemorykiller/parameters/minfree ]; then
  46.     echo "Modifying minfree parameters"
  47.         echo "2560,4096,6144,17408,19456,23552" > /sys/module/lowmemorykiller/parameters/minfree
  48.     else
  49.         echo "minfree not found"
  50. fi
  51. sysctl -p
  52. echo "0" > /proc/sys/vm/swappiness
  53. #echo "10" > /proc/sys/vm/dirty_ratio
  54. echo "24189" > /proc/sys/kernel/sched_features
  55. #mount -t debugfs none /sys/kernel/debug
  56. #echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
  57. log -p i -t init:setprop "INIT.setprop END:tweaking settings"
Advertisement
Add Comment
Please, Sign In to add comment