Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/system/bin/sh
- # imoseyon mods
- # disable logger - performance boost & save memory (hopefully)
- rm /dev/log/main
- # file system speedups
- busybox mount -o remount,noatime,barrier=0,nobh /system
- busybox mount -o remount,noatime,barrier=0,nobh /data
- busybox mount -o remount,noatime,barrier=0,nobh /cache
- # aggressive memory management
- echo "3000,4000,10000,10000,20000,20000" > /sys/module/lowmemorykiller/parameters/minfree
- # overclock (example)
- #sh /data/imoseyon/oc.sh
- 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
- # sysctl tweaks
- sysctl -p /data/imoseyon/sysctl.conf
- # zipalign system if necessary (example)
- # sh /data/imoseyon/zipalign_system.sh
- # enable crond
- # crond calls getpwnam (user database search)
- mount -o remount,rw `grep /system /proc/mounts | cut -d' ' -f1` /system
- echo "root:x:0:0::/data/cron:/system/bin/sh" > /etc/passwd
- mount -o remount,ro `grep /system /proc/mounts | cut -d' ' -f1` /system
- # crond has "/bin/sh" hardcoded
- mount -o remount,rw rootfs /
- ln -s /system/bin/ /bin
- if [ ! -d /tmp ]; then
- mkdir /tmp
- mount -t tmpfs tmpfs /tmp
- fi
- mount -o remount,ro rootfs /
- /system/xbin/startcron.sh
- # clean-up - needed for some ROMs
- pkill /system/bin/telnetd
- mount -o remount,rw -t yaffs2 `grep /system /proc/mounts | cut -d' ' -f1` /system
- rm /system/bin/pgrep
- rm /system/bin/telnetd
- rm /system/bin/crond
- mount -o remount,ro -t yaffs2 `grep /system /proc/mounts | cut -d' ' -f1` /system
- # sleep a while and then start killing annoying processes registered to zygote
- # sleep 10
- #sh /data/imoseyon/killapps.sh
- # if swapfile exists, enable swap and adjust other settings
- if [ -f /data/swap ]; then
- swapon /data/swap
- echo "100,200,20000,20000,20000,25000" > /sys/module/lowmemorykiller/parameters/minfree
- sysctl -w vm.swappiness=40
- fi
- # sd card speed boost
- if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]; then
- echo 1024 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
- fi
Add Comment
Please, Sign In to add comment