diff --git a/README.md b/README.md index b08bfd9..aab0bf4 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ If supporting a recovery that forces zip signature verification (like Cyanogen R http://forum.xda-developers.com/android/software-hacking/dev-complete-shell-script-flashable-zip-t2934449 -Not required, but any tweaks you can't hardcode into the source should be added with a bootscript.sh like is done in the example provided. +Not required, but any tweaks you can't hardcode into the source (best practice) should be added with an additional init.tweaks.rc or bootscript.sh to minimize the necessary ramdisk changes. Have fun! diff --git a/ramdisk/placeholder b/ramdisk/placeholder new file mode 100644 index 0000000..e69de29 diff --git a/ramdisk/sbin/bb/busybox b/ramdisk/sbin/bb/busybox deleted file mode 100755 index b319cfc..0000000 Binary files a/ramdisk/sbin/bb/busybox and /dev/null differ diff --git a/ramdisk/sbin/dvbootscript.sh b/ramdisk/sbin/dvbootscript.sh deleted file mode 100755 index d4853be..0000000 --- a/ramdisk/sbin/dvbootscript.sh +++ /dev/null @@ -1,146 +0,0 @@ -#!/system/bin/sh -# portions from franciscofranco, ak, boype & osm0sis + Franco's Dev Team - -# custom busybox installation shortcut -bb=/sbin/bb/busybox; - -# disable sysctl.conf to prevent ROM interference with tunables -$bb mount -o rw,remount /system; -$bb [ -e /system/etc/sysctl.conf ] && $bb mv -f /system/etc/sysctl.conf /system/etc/sysctl.conf.dvbak; - -# disable the PowerHAL since there is now a kernel-side touch boost implemented -$bb [ -e /system/lib/hw/power.tuna.so.dvbak ] || $bb cp /system/lib/hw/power.tuna.so /system/lib/hw/power.tuna.so.dvbak; -$bb [ -e /system/lib/hw/power.tuna.so ] && $bb rm -f /system/lib/hw/power.tuna.so; - -# backup and replace Host AP Daemon for working Wi-Fi tether on 3.4 kernel Wi-Fi drivers -$bb [ -e /system/bin/hostapd.dvbak ] || $bb cp /system/bin/hostapd /system/bin/hostapd.dvbak; -$bb cp -f /sbin/hostapd /system/bin/; -$bb chown root.shell /system/bin/hostapd; -$bb chmod 755 /system/bin/hostapd; - -# backup and replace Media Codec Profiles if on SR builds, restore if not, and push init.d script for other kernels -case `uname -r` in - *DirtyV-SR|*SmittyV) - $bb [ -e /system/etc/media_profiles.xml.dvbak ] || $bb cp /system/etc/media_profiles.xml /system/etc/media_profiles.xml.dvbak; - $bb cp -f /sbin/media_profiles.xml /system/etc/; - $bb chmod 644 /system/etc/media_profiles.xml;; - *) - $bb [ -e /system/etc/media_profiles.xml.dvbak ] && $bb mv -f /system/etc/media_profiles.xml.dvbak /system/etc/media_profiles.xml; - $bb chmod 644 /system/etc/media_profiles.xml;; -esac; -$bb cp -f /sbin/dvmediarevert /system/etc/init.d/; -$bb chmod 755 /system/etc/init.d/dvmediarevert; - -# create and set permissions for /system/etc/init.d if it doesn't already exist -if [ ! -e /system/etc/init.d ]; then - $bb mkdir /system/etc/init.d; - $bb chown -R root.root /system/etc/init.d; - $bb chmod -R 755 /system/etc/init.d; -fi; -$bb mount -o ro,remount /system; - -# fix permissions for any included governors (and older underlying ramdisks) -governor=reset; -while sleep 1; do - current=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor`; - if [ $governor != $current ]; then - governor=$current; - for i in /sys/devices/system/cpu/cpufreq/*; do - $bb chown system:system $i/*; - $bb chmod 664 $i/*; - done; - fi; -done& - -# disable debugging -echo 0 > /sys/module/wakelock/parameters/debug_mask; -echo 0 > /sys/module/userwakelock/parameters/debug_mask; -echo 0 > /sys/module/earlysuspend/parameters/debug_mask; -echo 0 > /sys/module/alarm/parameters/debug_mask; -echo 0 > /sys/module/alarm_dev/parameters/debug_mask; -echo 0 > /sys/module/binder/parameters/debug_mask; - -# suitable configuration to help reduce network latency -echo 2 > /proc/sys/net/ipv4/tcp_ecn; -echo 1 > /proc/sys/net/ipv4/tcp_sack; -echo 1 > /proc/sys/net/ipv4/tcp_dsack; -echo 1 > /proc/sys/net/ipv4/tcp_low_latency; -echo 1 > /proc/sys/net/ipv4/tcp_timestamps; - -# reduce txqueuelen to 0 to switch from a packet queue to a byte one -for i in /sys/class/net/*; do - echo 0 > $i/tx_queue_len; -done; - -# initialize timer slack -echo 100000000 > /dev/cpuctl/apps/bg_non_interactive/timer_slack.min_slack_ns; - -# decrease fs lease time -echo 10 > /proc/sys/fs/lease-break-time; - -# tweak for slightly larger kernel entropy pool -echo 128 > /proc/sys/kernel/random/read_wakeup_threshold; -echo 256 > /proc/sys/kernel/random/write_wakeup_threshold; - -# disable ASLR -echo 0 > /proc/sys/kernel/randomize_va_space; - -# double the default minfree kb -echo 2884 > /proc/sys/vm/min_free_kbytes; - -# general queue tweaks -for i in /sys/block/*/queue; do - echo 512 > $i/nr_requests; - echo 512 > $i/read_ahead_kb; - echo 2 > $i/rq_affinity; - echo 0 > $i/nomerges; - echo 0 > $i/add_random; - echo 0 > $i/rotational; -done; - -# remount sysfs+sdcard with noatime,nodiratime since that's all they accept -$bb mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /; -$bb mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /proc; -$bb mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /sys; -$bb mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /sys/kernel/debug; -$bb mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /mnt/shell/emulated; -for i in /storage/emulated/*; do - $bb mount -o remount,nosuid,nodev,noatime,nodiratime -t auto $i; - $bb mount -o remount,nosuid,nodev,noatime,nodiratime -t auto $i/Android/obb; -done; - -# lmk tweaks for fewer empty background processes -minfree=6144,8192,12288,16384,24576,40960; -lmk=/sys/module/lowmemorykiller/parameters/minfree; -minboot=`cat $lmk`; -while sleep 1; do - if [ `cat $lmk` != $minboot ]; then - [ `cat $lmk` != $minfree ] && echo $minfree > $lmk || exit; - fi; -done& - -# wait for systemui and increase its priority -while sleep 1; do - if [ `$bb pidof com.android.systemui` ]; then - systemui=`$bb pidof com.android.systemui`; - $bb renice -18 $systemui; - $bb echo -17 > /proc/$systemui/oom_adj; - $bb chmod 100 /proc/$systemui/oom_adj; - exit; - fi; -done& - -# lmk whitelist for common launchers and increase launcher priority -list="com.android.launcher com.google.android.googlequicksearchbox org.adw.launcher org.adwfreak.launcher net.alamoapps.launcher com.anddoes.launcher com.android.lmt com.chrislacy.actionlauncher.pro com.cyanogenmod.trebuchet com.gau.go.launcherex com.gtp.nextlauncher com.miui.mihome2 com.mobint.hololauncher com.mobint.hololauncher.hd com.qihoo360.launcher com.teslacoilsw.launcher com.tsf.shell org.zeam"; -while sleep 60; do - for class in $list; do - if [ `$bb pgrep $class | head -n 1` ]; then - launcher=`$bb pgrep $class`; - $bb echo -17 > /proc/$launcher/oom_adj; - $bb chmod 100 /proc/$launcher/oom_adj; - $bb renice -18 $launcher; - fi; - done; - exit; -done& - diff --git a/ramdisk/sbin/dvmediarevert b/ramdisk/sbin/dvmediarevert deleted file mode 100755 index 2c7d4c3..0000000 --- a/ramdisk/sbin/dvmediarevert +++ /dev/null @@ -1,17 +0,0 @@ -#!/system/bin/sh -# chmod -R 755 /system/etc/init.d -# osm0sis @ xda-developers - -# restore media_profiles.xml, power.tuna.so and hostapd if switching to another kernel from DirtyV -busybox mount -o rw,remount /system; -case `uname -r` in - *DirtyV*|*SmittyV) ;; - *) [ -e /system/etc/media_profiles.xml.dvbak ] && mv /system/etc/media_profiles.xml.dvbak /system/etc/media_profiles.xml; - [ -e /system/lib/hw/power.tuna.so.dvbak ] && mv /system/lib/hw/power.tuna.so.dvbak /system/lib/hw/power.tuna.so; - [ -e /system/bin/hostapd.dvbak ] && mv /system/bin/hostapd.dvbak /system/bin/hostapd; - [ -e /system/etc/media_profiles.xml.dvbak -o -e /system/lib/hw/power.tuna.so.dvbak -o -e /system/bin/hostapd.dvbak ] || rm -f /system/etc/init.d/dvmediarevert; - chmod 644 /system/etc/media_profiles.xml /system/lib/hw/power.tuna.so; - chmod 755 /system/bin/hostapd;; -esac; -busybox mount -o ro,remount /system; - diff --git a/ramdisk/sbin/hostapd b/ramdisk/sbin/hostapd deleted file mode 100755 index e7499b6..0000000 Binary files a/ramdisk/sbin/hostapd and /dev/null differ diff --git a/ramdisk/sbin/media_profiles.xml b/ramdisk/sbin/media_profiles.xml deleted file mode 100644 index 1bc4e35..0000000 --- a/ramdisk/sbin/media_profiles.xml +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -