[Redmi Note 2 General] jajk:
STAGE 2:

Full install:

I recommend you install my TWRP 3.02-2 version from here:

https://drive.google.com/open?id=0BwdRTuyj12_yWWp0SUpGV1pzT1k

Before installing your chosen ROM:

Check that the updater script found: \META-INF\com\google\android\updater-script is not going to install Preloader, Uboot (lk), Recovery or logo partitions. If so, edit the updater-script to prevent this happening. This is to reduce the risk of a soft-brick or being locked out of your phone.

Do a factory reset in TWRP (wipe Data, Dalvik, Cache) before installing any ROM.

Install your chosen ROM. Trying to slim down the ROM before install is an arduous affair which tends to end in bootloops so we leave the original ROM alone in this respect..

Do the install without connecting to mobile or WiFi networks and just skip at screens prompting for network connectivity and creating accounts.

Reboot into TWRP once finished with the initial Setup to avoid Recovery from being deleted on first boot.

Install an updated SuperSU zip package from TWRP recovery - V2.46 to 2.71 work equally well.

Do not install a root package other than SuperSU - most online ones are malware!

Update the outdated and incomplete Busybox installation. I have created a TWRP flashable zip to upgrade to the latest version 1.25.0. This is the second edition which has better binaries and no longer creates symlinks to busybox commands.

https://drive.google.com/open?id=0BwdRTuyj12_yd0s1QmNLRzdveFk

Now install a root capable filemanager (Root Explorer or Total Commander recommended). Open it and gain root permissions. Open /etc/perfservscntbl.txt in a text editor and edit as follows:

CMD_SET_CPU_FREQ, SCN_APP_TOUCH, 403000
CMD_SET_CPU_CORE, SCN_APP_TOUCH, 1

This will lower the number of cores used and the frequency at which it runs when a screen touch is detected (referred to as Touch Boost) Changes are activated on reboot.

Now create a file named 01_tweaks in the /etc/init.d folder. Change the permission of the file to 0755

Tips on creating scripts:

The EOL(end-of-line) characters must be in Unix format - not Windows. Make sure you are using a text editor that saves in Unix format.

Note also that many script files need a blank line at the end to work correctly. Get in the habit of always doing this whether needed or not.

Any line starting with a # character and anything after a # character on a line is not processed and is referred to as "commented out"

Script files must start with the header #!/system/bin/sh as the first line.

Init.d scripts are processed in alpha-numeric filename order hence the common usage of 01_xxx, 02_xxx format for names.

Copy these lines into the 01_tweaks file: Note: Different values for 2.2GHz cpu and freq limited operation.

#!/system/bin/sh

### Tweak Interactive CPU Governor
echo 806000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 85 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo "90 403000:80 806000:85 1326000:90 1625000:95 1950000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 32000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 15000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack

### Tweak IO Scheduler
echo deadline > /sys/block/mmcblk0/queue/scheduler ### choose between cfq, bfq or deadline
### Enable this line if using cfq or bfq scheduler only
# echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle
echo 256 > /sys/block/mmcblk0/queue/read_ahead_kb

### Enable zram swap
# echo 1073741824 > /sys/block/zram0/disksize ### 536870912 = 512MB 1073741824 = 1GB
# /system/bin/tiny_mkswap /dev/block/zram0
# /system/bin/tiny_swapon /dev/block/zram0

### Tweak Entropy to avoid regular depletion of available pool
echo 512 > /proc/sys/kernel/random/read_wakeup_threshold
echo 1024 > /proc/sys/kernel/random/write_wakeup_threshold

#Tweak for wifi router connection issues
#echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

### FSTRIM: Enable once after installation is finalized and then monthly ##### needs an updated busybox installation to work
# busybox fstrim /data
# busybox fstrim /cache
# busybox fstrim /system

Options: Add / replace lines to do the following:

1. freq limit a 2GHz cpu to 1781MHz (recommended setting)

echo "90 403000:80 806000:85 1326000:90 1625000:95 1781000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads

echo 1781000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo 1781000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user

2. Full speed 2.2GHz cpu

echo "90 403000:80 806000:85 1326000:90 1664000:95 2158000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads

3. freq limit a 2.2GHz cpu to 1885MHz (recommended setting)

echo "90 403000:80 806000:85 1326000:90 1664000:95 1885000:99" > /sys/devices/system/cpu/cpufreq/interactive/target_loads

echo 1885000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo 1885000 > /proc/cpufreq/cpufreq_limited_max_freq_by_user

4. Add a limit to the maximum number of cpu cores allowed to come online (for possible battery saving maybe...)

#Limit max cpu cores available (range 2 - 8)

echo 4 > /proc/hps/num_limit_low_batt

echo 4 > /proc/hps/num_limit_power_serv

echo 4 > /proc/hps/num_limit_thermal

echo 4 > /proc/hps/num_limit_ultra_power_saving

Edit /system/build.prop. Change the line: ro.sf.lcd_density from the default 480 to a value between 400 (everything smaller, more on screen) to 520 (everything larger, less on screen) to suit your taste and eyesight. You can test this out first by issuing the wm density command in a terminal app. e.g wm density 440 will immediately change the density to 440dpi, wm density reset will put it back to whatever the build.prop setting is. Adjust the text size in Settings in conjunction with this to get the best result.

At this point you have a functional set of tweaks that are all tested and proven to provide a battery and performance improvement. There are a lot of detrimental or placebo tweaks out there so be a little bit discerning in what else you add to these tweaks - sometimes less is more. Now is not the time to load up those tweaks!

Do a TWRP backup of System, Data, Boot and NVram partition now to save your efforts up to this point.