[Galaxy S I9000 Android Development] lippol94:
​

BE CAREFUL! READ BELOW!

If your running a Samsung based rom (Like AOSP Essence, Darky's, Juwe's Smart and so on) use the Samsung one

If you're running MIUI or CyanogenMod pick the MIUI / CM7 one

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.

MIUI/CM7 script has been updated to avoid flashing problems from Glitch to fugumod kernel. PLEASE USE IT BEFORE COMPLAINING WITH DEVELOPERS!

The Ultimate Cleaning Script has become famous in a few days thanks to its simple usage and semplicity!

HOW TO:

- Place the zip file in your internal SDCARD

- Flash it as a normal package from ClockworkMOD recovery

- Flash any kernel

- Reboot

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

DOWNLOAD:

CM7 / MIUI only!

http://www.multiupload.com/SIC5IZ4CPM

-- mirror --

Samsung Based ROMS only

http://www.multiupload.com/5IHS1FNMLG

Enjoy :) 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:

CM7 / MIUI Version

ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" *********************************************** ");
ui_print(" * WELCOME TO THE NEW AMAZING 4.0 VERSION * ");
ui_print(" * THANKS FOR CHOOSING MY SCRIPT :) * ");
ui_print(" *********************************************** ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
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(" ");
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/data");
run_program("/sbin/mount", "/cache");
show_progress(0.100000, 0);
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("Formatting Cache Partition...");
delete_recursive("/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/91logger");
delete("/system/etc/init.d/logcat_module");
delete("/system/etc/init.d/S_volt_scheduler");
delete("/system/etc/init.d/89system_tweak");
delete("/system/etc/init.d/S89system_tweak");
delete("/system/etc/init.d/S98system_tweak");
delete("/system/etc/init.d/S90screenstate_scaling");
delete("/system/etc/init.d/90screenstate_scaling");
delete("/system/etc/init.d/98screenstate_scaling");
delete("/system/etc/init.d/S98screenstate_scaling");
delete("/system/etc/init.d/04modules");
delete("/system/etc/init.d/70zipalign");
delete("/system/etc/init.d/S70zipalign");
delete("/system/etc/init.d/S97ramscript");
delete("/system/etc/init.d/S98SD");
delete("/system/etc/init.d/07defaulttheme");
delete("/system/etc/init.d/00banner");
delete("/system/etc/init.d/02firstboot");
delete("/system/etc/init.d/S90scheduler");
delete("/system/etc/init.d/S99finish");
delete("/system/lib/hw/lights.default.ko");
delete("/system/lib/hw/sensors.default.ko");
delete("/system/bin/logcat-on");
delete("/system/bin/logcat-off");
show_progress(0.100000, 60);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Cleaning up old modules");
package_extract_dir("script", "/tmp/script");
set_perm(0, 0, 755, "/tmp/script/cleaningmodules");
run_program("/tmp/script/cleaningmodules");
show_progress(0.100000, 70);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Formatting Cache for security purpose...");
delete_recursive("/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(" ");

Samsung based ROMs Version:

ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" *********************************************** ");
ui_print(" * WELCOME TO THE NEW AMAZING 2.0 VERSION * ");
ui_print(" * FOR SAMSUNG BASED ROMS * ");
ui_print(" * THANKS FOR CHOOSING MY SCRIPT :) * ");
ui_print(" *********************************************** ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
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(" ");
run_program("/sbin/mount", "/dev/block/stl11", "/cache");
run_program("/sbin/mount", "/dev/block/mmcblk0p2", "/data");
show_progress(0.100000, 0);
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print(" ");
ui_print("Formatting Cache Partition...");
delete_recursive("/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/S70zipalign");
delete("/system/etc/init.d/S90scheduler");
delete("/system/etc/init.d/S99finish");
delete("/system/etc/init.d/89system_tweak");
delete("/system/etc/init.d/98system_tweak");
delete("/system/etc/init.d/S89system_tweak");
delete("/system/etc/init.d/S98system_tweak");
delete("/system/etc/init.d/S90screenstate_scaling");
delete("/system/etc/init.d/90screenstate_scaling");
delete("/system/etc/init.d/98screenstate_scaling");
delete("/system/etc/init.d/S98screenstate_scaling");
show_progress(0.100000, 60);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Cleaning up old modules");
package_extract_dir("script", "/tmp/script");
set_perm(0, 0, 755, "/tmp/script/cleaningmodules");
run_program("/tmp/script/cleaningmodules");
show_progress(0.100000, 70);
ui_print(" ");
ui_print("DONE! ");
ui_print(" ");
ui_print("Formatting Cache for security purpose...");
delete_recursive("/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 SAMSUNG BASED ROM * ");
ui_print(" * by LIPPOL94 * ");
ui_print(" *********************************************** ");
ui_print(" ");