Default Ultimate Kernel Cleaning Script - 1.0

Since many users have complained about phone instability after flashing another kernel, I decided to make a Recovery Script to clean everything may cause instability.
As we know also zach made something like this, but his script deletes only init.d config files while many problems are generated by cache and dalvik-cache waste files.

So here I am with the Ultimate Kernel Cleaning Script.

HOW TO:

- Place the zip file in your internal SDCARD
- Flash it as a normal package from ClockworkMOD recovery
- Flash any kernel (zach's, tkglitch's or bilboa's)
- Reboot

Everytime you need to change/re-flash a kernel, just apply this before

DOWNLOAD:
http://www.multiupload.com/922KMXMMVJ

It could be a good think to add this to OP Thank you so much

CODE
To be sure that the script won't touch anything you probability don't want to, here is the update-script:

Code:
Select Code
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" *********************************************** ");
ui_print(" *     STARTING KERNEL CLEANING PROCEDURE      * ");
ui_print(" *           HANG ON FOR A SECOND :)           * ");
ui_print(" *********************************************** ");
ui_print(" ");
mount("yaffs2", "MTD", "userdata", "/data");
show_progress(0.100000, 0);
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("Formatting Cache Partition...");
format("yaffs2", "MTD", "cache");
show_progress(0.100000, 20);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Wiping dalvik-cache...");
delete_recursive("/data/dalvik-cache");
show_progress(0.100000, 40);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Deleting old kernel settings files");
delete("/system/etc/init.d/S_volt_scheduler");
delete("/system/etc/init.d/S90scheduler");
delete("/system/etc/init.d/S99finish");
delete("/system/etc/init.d/89system_tweak");
delete("/system/etc/init.d/90screenstate_scaling");
show_progress(0.100000, 60);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Formatting Cache for security purpose...");
format("yaffs2", "MTD", "cache");
show_progress(0.100000, 80);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Wiping dalvik-cache for security purpose...");
delete_recursive("/data/dalvik-cache");
show_progress(0.100000, 90);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" *********************************************** ");
ui_print(" *            CLEANING PROCEDURE DONE          * ");
ui_print(" *      YOU'RE READY TO FLASH A NEW KERNEL!    * ");
ui_print(" *             PAINLESS THIS TIME ^_^          * ");
ui_print(" *                                             * ");
ui_print(" *           ENJOY YOUR CM7 / MIUI ROM         * ");
ui_print(" *                  by LIPPOL94                * ");
ui_print(" *********************************************** ");
ui_print(" ");
“The computer is incredibly fast, accurate, and stupid. Man is unbelievably slow, inaccurate, and brilliant. The marriage of the two is a force beyond calculation.”

These are my XDA Projects. Check them out!

RasBeanJelly Googleize MOD (maguro) - [link]
CyanogenMod9 Blueberry EDITION (I9000) - [link]
MIUI Mintberry EDITION (I9000) - [link]
Ultimate Kernel Cleaning Script (I9000) - [link]
Vexillum Theme Project (MIUI) - [link]
CyanogenRevamped Theme (ADW) - [link]
If you like my work
and you want to see it growing
consider a small donation :)