[Galaxy S II Q&A, Help & Troubleshooting] THE RED BLUR:
GS2KernelWipe Kernel Cleaning Script

Hi have found this new kernel cleaning script over my visit of andriod forums. The good thing about this is that the maker now uses Dorimanx kernel and this is what he had in mind while making latest version below.

This is to be used if someone is coming from another kernel or if they run into trouble with dorimanx kernel. It doesn't need to be used for nomal update of Dorimanx kernel as it has a built in clean anyway. All I do when flashing latest Dorimanx kernel is .

1. Flash kernel

2. Reboot into recovery again so new kernel version is reflected and I fix permissions

3. If it is required to or i just file like it I wipe kernel profile.

But for people with problems or issues use this script first as first course of action as part of debug and re flash kernel and see if issues persist.

And if they do and follow you on a previous kernel that worked before :eek: then you may have a curruption that has occurred on rom so you can use this as a last resort to fix.

http://xdaforums.com/showpost.php?p=34887912&postcount=53

I spoke with my new buddy Hawker if I could represent him on xda and share links and said fine so all credits to him .:good::) He is also the one to my surprise that made the rom nuke script as well.

I have attached the flash script to this post for ease of download but please read everything before flashing.

Link to the original thread of this script by Hawker on Andriod forums.= http://androidforums.com/galaxy-s2-...lwipe-kernel-cleaning-script.html#post3702712

Message from creator of script Hawker

I have developed a cleaning script .zip file that is run through CWM Recovery. GS2KernelWipe prepares your GSII for flashing a new kernel. It removes much of the previous rubbish that you may have sitting on your phone from all your past kernels/tweaks etc.

This left over rubbish can hinder the performance of your new kernel. GS2KernelWipe removes all old kernel files that I am so far aware of as well as removing Voltage Control and NSTools settings and certain known kernel startup scripts from the startup (/system/etc/init.d) folder. (provided you have saved these app's settings as init.d scripts) These app's settings are removed as it is better to be able to view what your new kernel's default settings are after the first flash so that you can tweak from there. Just in case, GS2KernelWipe will save all your current scripts into /sdcard/MyBackups/init.d prior to removing any of them.

GS2KernelWipe

Current Version: 1.95

GS2KernelWipe does the following:

1. Saves all current startup scripts to /sdcard/MyBackups/init.d

2. Removes Voltage Control and NSTools startup scripts (only if saved as init.d, and not as a service) along with many other kernel-specific startup scripts from /system/etc/init.d

3. Removes ExTweaks, STweaks, Voltage Control, NSTools and SetCPU dalvik-cache areas.

4. Removes old kernel-specific files (currently Void, Andoidmeda, Siyah, DorimanX, NEAK and Abyss are cleared)

5. Removes /data/user.log

cache and dalvik-cache is no longer fully wiped.

/cache and dalvik-cache areas are not directly used by kernels at all. However, dalvik-cache is used by applications (.apk files) and obviously certain applications can affect kernel parameters.

Therefore GS2KernelWipe currently removes specific dalvik-cache files for:

1. STweaks

2. ExTweaks

3. NSTools

4. SetCPU

5. Voltage Control

Not removing the entire dalvik-cache will therefore speed up the first boot as all your application's dalvik areas will not need to be regenerated, particularly on ICS handsets.

Restoring Scripts

You can restore any of your old init.d startup scripts manually by copying the files from the backup folder GS2KernelWipe creates, /sdcard/MyBackups/init.d. This can be done through Root Explorer or similar. All init.d scripts are saved into here before clearing. You will have to ensure the permissions are rwx r-x r-x (755) or rwx rwx rwx (777) after you have copied them back into /system/etc/init.d.

Therefore if for any reason you want to retain your current Voltage Control or NSTools settings (save as init.d option only) for your new kernel, then you can copy /sdcard/MyBackups/init.d/S91voltctrl and/or /sdcard/MyBackups/init.d/99nstools back into /system/etc/init.d after flashing your new kernel. Make sure it has rwx permission throughout. You will need Root Explorer or similar to do this.