Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,310 Members 45,498 Now Online
XDA Developers Android and Mobile Development Forum

[SCRIPT]Ultimate Kernel Cleaning Script - 4.0 [MIUI/CM7 and SAMSUNG] [13.11.11]

Tip us?
 
lippol94
Old
(Last edited by lippol94; 15th November 2011 at 03:16 PM.)
#1  
lippol94's Avatar
Recognized Developer - OP
Thanks Meter 2655
Posts: 2,184
Join Date: Nov 2010
Location: Cremona

 
DONATE TO ME
Default [SCRIPT]Ultimate Kernel Cleaning Script - 4.0 [MIUI/CM7 and SAMSUNG] [13.11.11]

Quote:
IF YOU LIKE ULTIMATE CLEANING SCRIPT, PLEASE CONSIDER TO BUY ME A DRINK! IT WILL MAKE ME WORKING FASTER! THANKS A LOT!


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

Code:
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:
Code:
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(" ");
“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 :)
The Following 194 Users Say Thank You to lippol94 For This Useful Post: [ Click to Expand ]
 
pramathesh
Old
#2  
Senior Member
Thanks Meter 26
Posts: 554
Join Date: Oct 2010
Location: Mumbai
Good...

Sent from my GT-I9000 using XDA Premium App
Someone please suggest something nice for a sig!
The Following User Says Thank You to pramathesh For This Useful Post: [ Click to Expand ]
 
ralphitz
Old
#3  
Junior Member
Thanks Meter 1
Posts: 20
Join Date: Aug 2010
What do you mean with: "Don't use it on Samsung ROMS" exactly? I'm a bit confused because you also say: "It's compatible with MIUI and CM7!". Guess what.. I have MIUI... on a Samsung i9000. So you could say it's the Samsung-ROM of MIUI. I guess you mean that it destroys your phone when running an original Samsung-ROM, doesn't it?
 
lippol94
Old
#4  
lippol94's Avatar
Recognized Developer - OP
Thanks Meter 2655
Posts: 2,184
Join Date: Nov 2010
Location: Cremona

 
DONATE TO ME
Quote:
Originally Posted by ralphitz View Post
What do you mean with: "Don't use it on Samsung ROMS" exactly? I'm a bit confused because you also say: "It's compatible with MIUI and CM7!". Guess what.. I have MIUI... on a Samsung i9000. So you could say it's the Samsung-ROM of MIUI. I guess you mean that it destroys your phone when running an original Samsung-ROM, doesn't it?
"Samsung ROM" means ROM made by Samsung, ones that include TouchWiz and so on.
“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 :)
The Following 3 Users Say Thank You to lippol94 For This Useful Post: [ Click to Expand ]
 
extralife
Old
#5  
extralife's Avatar
Senior Member
Thanks Meter 299
Posts: 463
Join Date: Sep 2010
Location: vienna
why you don't mount /system?

in cwm it's unmounted by default
 
lippol94
Old
#6  
lippol94's Avatar
Recognized Developer - OP
Thanks Meter 2655
Posts: 2,184
Join Date: Nov 2010
Location: Cremona

 
DONATE TO ME
Quote:
Originally Posted by extralife View Post
why you don't mount /system?

in cwm it's unmounted by default
Not needed. When launching the script, system is mounted automatically.
I've never had problems
Trust me It's the second release, so it's been tested many times
“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 :)
 
extralife
Old
#7  
extralife's Avatar
Senior Member
Thanks Meter 299
Posts: 463
Join Date: Sep 2010
Location: vienna
Quote:
Originally Posted by lippol94 View Post
system is mounted automatically.
for me it wasn't - last nightlys - so i had to mount it manually in menu cause init.d was untouched

added un-/mount to the script and all was fine

but ok - maybe something changed

will try, when neo 11final is out
 
rwells813
Old
#8  
rwells813's Avatar
Senior Member
Thanks Meter 30
Posts: 392
Join Date: Mar 2011
Location: Dania Beach
Awesome v2- anything special/different from v1 other than security wipes?

Sent from SGS Captivate CM7 or MIUI with Escapist orTKGlitch using XDA premium app.
Phone: SGS-SGH-I897
Phone: SGS-I9100
Phone: Retired
Rom: GRJ90-Cyanogenmod7- 2.3.7
Rom: MIUI-GALNET-ICS-4.0.1/11-2-1
Kernel: Vorbeth-I897 V0.3
Kernel: TKGlitch-2.6.35.13-V12-VC-1.7GH
Kernel: Zach./Escapist-2..6.35.13/-1.6GH
Modem: T959TLJL3
Modem: JK4
CPU: Hummingbird-ARMv7 rev2 (v71)
CPU: -Exynos-CortexA9/Mali400GPU


<><
 
davidmore
Old
#9  
davidmore's Avatar
Senior Member
Thanks Meter 597
Posts: 320
Join Date: Dec 2007
Location: Venice
Good job , thanks for the your utility it's very useful.

There is only a problem with Cyanogen ROM: high battery drain
** When someone--anyone--help you, give a THANK!
__________________________________________________ __________________
Phone1: Huawei G510 | ROM & KERNEL: DMORE.Rom.Kernel
Phone2: Samsung Galaxy S GT-I9000 | DMORE.I9000.Kernel | ROM: DMORE.Rom
Tablet: Nexus 7 Google-Asus | ROM: default | KERNEL: DMORE.N7.Kernel
 
lippol94
Old
#10  
lippol94's Avatar
Recognized Developer - OP
Thanks Meter 2655
Posts: 2,184
Join Date: Nov 2010
Location: Cremona

 
DONATE TO ME
Quote:
Originally Posted by rwells813 View Post
Awesome v2- anything special/different from v1 other than security wipes?

Sent from SGS Captivate CM7 or MIUI with Escapist orTKGlitch using XDA premium app.
Yeah! now the script cleans up the entire module folder that generates regressions from a release to another

Sent from my Samsung Galaxy S running Galnet MIUI
“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 :)

The Following User Says Thank You to lippol94 For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes