[Galaxy S 4 i9505 Android Development] hawkerpaul:
All the Boring In-Depth Details

Clears old known kernel-related files, applications and application cache relating to kernel performance and behaviour.

To be flashed immediately prior to flashing your new kernel!!!

Failure to subsequently flash a new kernel will almost certainly lead to a bootloop

All supported kernels are scanned for regardless of device, unless stated otherwise below.

Supported Kernels

Abyss

Adam

AEL

Alucard

Andoriodmeda

Apolo

Ausdim

DorimanX

Googy-Max3

Hulk Kernel

Hybridmax Kernel

Imperium

Jeboo

KT

N.E.A.K.

PhilZ (GS2 only)

Siyah

Void

Run Steps

1. Removes kernel-related data for the following generic apps:

ExTweaks

NSTools

SetCPU

STweaks

Synapse

Voltage Control

2. Removes kernel-related files. This include all application (.apk)-related files and folders which includes their associated cache and dalvik-cache/ART areas.

3. Removes /data/user.log

4. Removes /data/log/*

5. Remove all kernel modules (*.ko) from /system/lib/modules

NOTE: Unlike most kernel cleaners, this script does not globally wipe the entire /cache and dalvik-cache/ART areas. These areas are not directly used by the actual kernel at all. However, dalvik-cache/ART is used by kernel-related applications (.apk files) and obviously certain applications can affect kernel parameters. Therefore only specific kernel-related application dalvik-cache/ART areas are wiped. Not removing dalvik-cache/ART on mass will therefore greatly speed up the first boot (compared to if it was completely wiped) as only a few of your application's dalvik-cache/ART areas will need to get regenerated.

Test Mode

You can call HawkernelWipe.sh (which is in the tmp folder of the zip file) through a script manager type of app, through a terminal emulator, or adb shell. Test Mode goes through all the motions as per a standard Recovery run, but it does not remove any files/folders in any way, and merely shows the commands it would have done. If you want to do this, then simply extract HawkernelWipe.sh from the zip onto your device, and run it from there.

Sample Run

HawkernelWipe Ver. 1.03

-----------------------

Handset: GS4 (GT-I9505G)

Android: 5.0.1

Int. SD: /data/media/0

Ext. SD: /storage/extSdCard

Busybox: /system/xbin/busybox

ROM: LRX22C

===============================================================================

Clean your device for a new kernel flash

===============================================================================

This can only be run through Recovery!

Test Mode: *** ON ***

<<< Kernel Wipe (Test Mode) >>>

-------------------------------

Started: 16/06/2015 20:33

>>> Deleting generic kernel app files...

--STweaks...

rm -fr /data/data/com.gokhanmoral.stweaks.app

Deleted com.gokhanmoral.stweaks.app (24.0Kb)

rm -fr /data/user/0/com.gokhanmoral.stweaks.app

Deleted /data/user/0/com.gokhanmoral.stweaks.app (24.0Kb)

>>> Deleting kernel-specific files...

--Alucard...

rm -fr /system/wget

Deleted /system/wget (480.0Kb)

--Hulk...

rm -f /system/app/Hulk-Kernel sTweaks.apk

Deleted Hulk-Kernel sTweaks.apk (88.0Kb)

rm -fr /data/.hulk

Deleted /data/.hulk (40.0Kb)

>>> Deleting user logs...

(None found)

>>> Deleting old kernel modules...

rm -f /system/lib/modules/evbug.ko

Deleted /system/lib/modules/evbug.ko (80.0Kb)

rm -f /system/lib/modules/frandom.ko

Deleted /system/lib/modules/frandom.ko (88.0Kb)

rm -f /system/lib/modules/mcdrvmodule.ko

Deleted /system/lib/modules/mcdrvmodule.ko (380.0Kb)

rm -f /system/lib/modules/mckernelapi.ko

Deleted /system/lib/modules/mckernelapi.ko (468.0Kb)

rm -f /system/lib/modules/qce40.ko

Deleted /system/lib/modules/qce40.ko (176.0Kb)

rm -f /system/lib/modules/qcedev.ko

Deleted /system/lib/modules/qcedev.ko (180.0Kb)

rm -f /system/lib/modules/qcrypto.ko

Deleted /system/lib/modules/qcrypto.ko (292.0Kb)

rm -f /system/lib/modules/spidev.ko

Deleted /system/lib/modules/spidev.ko (136.0Kb)

<<< Completed Kernel Wipe

HawkernelWipe Deletion Totals:

------------------------------

/system: 2Mb

/data : 88Kb

==========

Total: 2Mb

==========

HawkernelWipe Ended: 16/06/2015 20:34

-------------------------------------

Log File

A lot goes on during a HawkernelWipe run, so everything that happens gets logged in /sdcard/tmp/Hawker/HawkernelWipe.log for you subsequently examine if you need to.

Let me know if you have find any files or folders that specific kernels create, so I can look into it for possible inclusion in the next release.