• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

GS2KernelWipe Script

I've developed a CWM flashable zip that is similar to the ultimate cleaning script, but instead, it also removes system/etc/init.d folder, thereby removing all previous crap that you may have sitting there from all your past kernels/tweaks etc.

This is handy, particularly now for Siyah, for the specific battery/performance tweaks, ensuring it is these tweaks, and only these tweaks that are in effect.
As it removes everything, it will therefore reset your voltage control settings.

As its bed time, I will look into changing it to keep the voltage control settings (or make a different version to do so) tomorrow.

If you're interested, then let me know, and I will post it up after more testing.

Let me know if you have any other requests to be included.


What a clever chappy. Don't go disappearing to xda now will you
 
Upvote 0
What a clever chappy. Don't go disappearing to xda now will you
I think after you run the script you will realise there is no chance of that happening butty! :)


Ok fellas, here it is.

GS2CleanV1.0.zip

I have to give the usual blurb of I cannot accept responsibility of any loss of data blah blah blah, but all it does everything the ultimate one did, but instead of removing specific files from the init.d folder, it removes the init.d folder itself, thereby clearing out any old kernel rubbish.

Like I said, as Voltage Control uses the init.d folder for its settings, you will have to re-enter its settings if you have got any.

Any suggestions appreciated for V1.1 :D
 
Upvote 0
Well most of us on CheckROM on here dont have them Syd, so I guess not overly so.

The Ultimate Kernel Cleaner deletes the following from init.d:
S_volt_scheduler
S70zipalign
S90scheduler
S99finish
89system_tweak
98system_tweak
S89system_tweak
S98system_tweak
S90screenstate_scaling
90screenstate_scaling
98screenstate_scaling
S98screenstate_scaling

Seems like this was developed to clean up a specific kernel in particular perhaps.


The CheckROM scripts are:

02modules
#!/system/bin/sh
# Load MODULES
sleep 1
insmod /system/lib/modules/cifs.ko
echo "+++ EXTRA MODULES activated +++";

This is to do with mounting samba file systems, so probably not needed by most


05module
#!/system/bin/sh
if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ];
then
echo "Modifying read_ahead_kb parameters"
echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
else
echo "read_ahead_kb not found"
fi

I've never had any keyboard issues, so probably not important.


90ram-tweaks
#!/system/bin/sh
# Copyright
 
Upvote 0
For those who would like to wipe init.d folder, but restore CheckROM init.d scripts, you can use my kernel cleaner to do the wipe, and follow this with the zip below:

CheckROM4 init scripts restore

This will restore the following into the init.d folder:
02modules
05module
90ram-tweaks
98mounts
99complete
S95zipalign
 
Upvote 0
Version 1.1 now deletes /data/user.log

This file is a log of any error messages generated on boot, and possibly during usage. This file stays resident until it is removed manually, so it is possible for old messages from a previous kernel to remain, even after a new kernel is flashed, so these messages would no longer be applicable, and could possibly cause confusion.

v1.1 now removes this file, so if you have this file present then you will know for sure that the messages have been generated since the script was last performed.

I will post this up in the next day or two, as I am still thinking of other things to include, and would be interested to hear of any suggestions to include in this version off you all.
thanks
:)
 
Upvote 0
I have done further digging, and it seems the ultimate kernel cleaner was not mounting the correct devices in order to wipe cache and dalvik cache. I always wondered why the first boot always seems to be just as quick after running the UKC script!

GS2CleanV1.1.zip now gives a true wipe of both cache and dalvik cache partitions along with wiping init.d folder and user.log.
Because of this, do not be alarmed if the first boot takes a long time. (my first boot after this true wipe now takes approx 3 minutes!) This is because a true wipe has taken place, and cache partitions are being rebuilt from new.

I would be interested to hear if this solves the problems old Syd has been having.

I will do further testing, and hopefully get this version up and running on here for you all tomorrow.
 
Upvote 0
Any suggestions appreciated for V1.1 :D

Any chance that you could name your v1.1 Kernel Cleaner something like...

XXXKernelCleanV1.1.zip

or something along those lines as your present v1.0 kernel is named GS2CleanV1.0.zip and when I'm in Recovery I have to frantically push the Volume button 20+ times to navigate to it....

... what, you expected a technical request from me! :rolleyes:


(just to hedge your bets... you could do a S99_KernelCleanV1.1.zip as well.)
 
Upvote 0
Any chance that you could name your v1.1 Kernel Cleaner something like...

XXXKernelCleanV1.1.zip

or something along those lines as your present v1.0 kernel is named GS2CleanV1.0.zip and when I'm in Recovery I have to frantically push the Volume button 20+ times to navigate to it....

That would put it down at the bottom of the list. Suppose you want to press up to it instead? I create a kernel folder, and have 2 or 3 of the good ones (siyah, neak, void) and have the scripts in there also, so there is never much key pressing required.

What about a script to remove any voltage control settings??

The script clears this anyway, but voltage control creates on install a file called vcremoveboot-CMW.zip which removes the startup script for you.



V1.1 is up. Download here

What this script does:
1. Removes /system/etc/init.d folder (this is where all the device's startup scripts are stored
2. Removes /data/user.log (shows any boot error messages. Deleting ensures the messages you see will be from your current kernel and not any previous
3. Deletes contents of cache partition
4. Deletes contents of dalvik-cache

This does a true wipe of cache and dalvik cache (unlike before, and unlike UKC) then I would do a full CWM backup first just in case, as although it works for me, I wouldnt want the finger pointed to me for buggering up your device. Once your happy it works fine of course, then just dive in next time!

Remember, V1.1 performs a proper clean, so expect at least a 3 minute first boot as cache and dalvik cache gets regenerated on this boot. UKC doesnt take long to boot first time around, as it couldnt have been wiping those areas properly.

Note, all startup scripts are wiped so any siyah specific settings (battery etc) voltage control settings, ROM-specific starup scripts. etc will get wiped and will need to be redone. Custom ROM users may have startup scripts specific to their ROM. If you want to restore these scripts, then use one below according to your ROM. So far, only 2 have been developed, but I can do more if requested.
Restore CheckROM 4 init.d scripts
Restore DelvROM3 init.d scripts

Happy wiping folks.
:)
 
Upvote 0
Chuffed as a bean old fruit! All the problems you've had with your device, its about time you had some luck butty.

In the future at some point tho mate, it may be worth considering giving your device a factory format. This will wipe EVERYTHING including contacts, messages, sd card data, the whole shebbang, but at least your phone will be in a truely out-of-factory state and gives you a blank sheet to work off (you would have to root again etc etc....). I would remove your external sd card just in case.

Factory reset: dial *2767*3855# ONLY USE AS LAST RESORT. AS SOON AS YOU PRESS THE "#" KEY, THERE'S NO GOING BACK!!!!!
 
  • Like
Reactions: Sydney99
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones