yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Android Development] hawkerpaul:
KernelWipe (Latest .zip: 20/07/2014)

NOTE:

I have made a separate KernelWipe thread

This will become the main thread as far as any KernelWipe updates are concerned.

This zip is to be run before you flash your new kernel. It prepares your for your new kernel by removing 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. KernelWipe 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.

Installation

1. Reboot into Recovery

2. If you have not previously done so, download and install the core zip HawkerCoreV???.zip. This will create a folder called /sdcard/HawkerCore

3. A nandroid backup is recommended beforehand

4. Install zip from SD card>Run /sdcard/HawkerCore/Scripts/KernelWipe

5. Install zip from SD card>Flash your new kernel

6. Reboot

KernelWipe Run Steps

1. CT_KernelWipe
[Galaxy S 4 i9505 Android Development] hawkerpaul:
MediaWipe (Latest .zip: 20/07/2014)

This zip will remove all known media cache files/thumbnails etc so they will get rebuilt when you next reboot your device.

Installation

1. Reboot into Recovery

2. If you have not previously done so, download and install the core zip HawkerCoreV???.zip. This will create a folder called /sdcard/HawkerCore

3. A nandroid backup is recommended beforehand

4. Install zip from SD card>Run /sdcard/HawkerCore/Scripts/MediaWipe

5. Reboot

If you are experiencing any of the following problems then this script my resolve the issues you're having:

1. A stuck Media scanner. Giving the Media Scanner a clean base to work from can aid the scanning process and possibly resolve any related wakelocks

2. Your Gallery shows blank entries instead of pictures/videos

3. Your Gallery is showing duplicate entries

The script will not definitely cure these problems, but quite often the cause can be a corruption in media cache files and/or thumbnails, in which case the script will help.

The script definitely does not remove any media files (music/pictures/videos etc)

MediaWipe Run Steps

1. CT_MediaWipe

2. CT_DelTemp

3. CT_DalvikWipe

4. CT_CacheWipe
[Galaxy S 4 i9505 Android Development] hawkerpaul:
ROMNuke (Latest .zip: 20/07/2014)

This zip will wipe your device ready for your new ROM to be flashed. It goes over and beyond a FULL WIPE/Factory reset as far as your device is concerned.

It is designed to be run IMMEDIATELY prior to flashing a new ROM.

DO NOT run this zip at any other time!!!

For more information please read the SDCARD_FULL_WIPE setting in the OP.

After executing ROMNuke, you must flash your ROM directly afterwards. If you do not, your device WILL NOT BOOT. You will get a boot loop as /system will be empty.

A factory reset (ie. a wipe of /data) on the S4 will wipe the entire internal SD card contents, as this is actually stored in /data/media/0.

If you store personal files within /sdcard, please perform full backups prior to flashing ROMNuke or ROMReset just to be on the safe side. (eg. in Windows, open your device, double-click Phone, select all, copy+paste)

For more information please read the SDCARD_FULL_WIPE setting in DataWipe function in post #2.

Installation

When you are at a stage whereby you want to flash a new CUSTOM ROM and want to do a FULL WIPE before doing so (which I would ALWAYS recommend) the steps are as follows:

1. Reboot into Recovery

2. If you have not previously done so, download and install the core zip HawkerCoreV???.zip. This will create a folder called /sdcard/HawkerCore

3. A nandroid backup is recommended beforehand

4. Install zip from SD card>Run /sdcard/HawkerCore/Scripts/ROMNuke

5. Install zip from SD card>Flash your new ROM

6. Reboot

If you are installing a new STOCK ROM and want to do a Nuke then:

1. Reboot into Recovery

2. A nandroid backup is recommended beforehand

3. Install zip from SD card>Run /sdcard/HawkerCore/Scripts/ROMNuke

4. Reboot into Download mode

5. Install your stock ROM via Odin

6. Re-root your device

ROMNuke Run Steps

1. CT_EFSBackup

2. CT_MyBackup

3. CT_KernelWipe

4. CT_ADWipe

5. CT_MediaWipe

6. CT_DelTemp

7. CT_DataWipe

8. CT_MyRestore

9. CT_SystemWipe

10. CT_CacheWipe

Running ROMNuke will give your new ROM a totally clean slate to start off from. Recommended for example when upgrading to a different Android version, or when you just can't seem to get certain applications to behave properly on your new ROM.

Let me know if you have any other ideas as to files/folders that could also be removed (such as folders specific to various ROMs) so I can look into it for possible inclusion in the next release.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
ROMReset (Latest .zip: 20/07/2014)

SDClean (Latest .zip: 20/07/2014)

ROMReset performs a additional tasks on top of a standard factory reset for your current ROM. This is designed to return your current ROM to its factory defaults. You will not have to re-install your ROM after running this. Just reboot and you will enter the Android installation wizard as normal on the first run. Application-related areas and media cache will be wiped from your internal and external sd cards.

ROMReset is identical to ROMNuke but it does do a kernel wipe, and keeps your ROM's /system files.

SDClean is identical to ROMReset, in that it wipes internal/external SD Card areas that applications in your current ROM use, but it does not perform a factory reset (CT_DataWipe), so the /data partition is retained. You will not need to go through the initial setup process again on first boot.

A factory reset (ie. a wipe of /data) on the S4 will wipe the entire internal SD card contents, as this is actually stored in /data/media/0.

If you store personal files within /sdcard, please perform full backups prior to flashing ROMNuke or ROMReset just to be on the safe side. (eg. in Windows, open your device, double-click Phone, select all, copy+paste)

For more information please read the SDCARD_FULL_WIPE setting for the CT_DataWipe function in post #2.

Installation

1. Reboot into Recovery

2. If you have not previously done so, download and install the core zip HawkerCoreV???.zip. This will create a folder called /sdcard/HawkerCore

3. A nandroid backup is recommended beforehand

4. Install zip from SD card>Run /sdcard/HawkerCore/Scripts/ROMRest or SDClean

5. Reboot

ROMReset Run Steps

1. CT_EFSBackup

2. CT_MyBackup

3. CT_ADWipe

4. CT_MediaWipe

5. CT_DelTemp

6. CT_DataWipe

7. CT_MyRestore

8. CT_FixPerm

9. CT_CacheWipe

SDClean Run Steps

1. CT_MyBackup

2. CT_ADWipe

3. CT_DelTemp

4. CT_MyRestore

5. CT_FixPerm

6. CT_DalvikWipe

7. CT_CacheWipe

Let me know if you have any other ideas as to files/folders that could also be removed (such as folders specific to various ROMs) so I can look into it for possible inclusion in the next release.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
BloatWipe (Latest .zip: 20/07/2014)

This zip will remove your own pre-defined BloatWare.

Installation

1. Reboot into Recovery

2. If you have not previously done so, download and install the core zip HawkerCoreV???.zip. This will create a folder called /sdcard/HawkerCore

3. A nandroid backup is recommended beforehand

4. Install zip from SD card>Run /sdcard/HawkerCore/Scripts/BloatWipe

5. Reboot

The zip uses /sdcard/HawkerCore/Options/BloatWipe.txt as its default list of files/folders to remove.

BloatWipe Run Steps

1. CT_BloatWipe

2. CT_DalvikWipe

3. CT_CacheWipe

For a list of possible Bloat removal, look at This Thread by fAiLOfax

You can also look here
[Galaxy S 4 i9505 Android Development] MVKA:
Hello

Nice to see your scripts here. Thank you very much mate :)

-MVKA

Omega Devices

Samsung Galaxy S2 GT-9100

Samsung Galaxy S4 GT-9505
[Galaxy S 4 i9505 Android Development] symondo12:
Great to see you working on the S4! Your S2 scripts were epic. I'll try it out and let you know!
[Galaxy S 4 i9505 Android Development] diddly3000:
Oh my god. FINALLY. no more tedious wiping thanks hawker your s2 scripts are so handy really missed them when I upgraded to s4 :D

---------- Post added at 10:23 PM ---------- Previous post was at 09:38 PM ----------

Used rom wipe script. On s2 it was all i used to flash roms because it left downloads folder alone and also my photos etc. BUT now on s4 it wipes entire internal storage downloads photos EVERYTHING lol.

Whats best to use to jst wipe data factory reset

Wipe cach

Wipe dalvic

And format system for rom install and leave my downloads etc in tact :)

I know its beta so thanks
[Galaxy S 4 i9505 Android Development] kantjer:
Thank so much, like the others mentioned I was so used to these on the S2. I'm happy to be able to use the scripts again.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
What exactly are you saying it removed?

The only thing remotely download related is a folder called .downloadTemp which gets removed by GS4ROMClean

None of the scripts touch /sdcard/Downloads or /storage/extSdCard/Downloads
[Galaxy S 4 i9505 Android Development] diddly3000:
When i flashed rom wipe script it removed EVERYTHING from internel storage apart from clockwork mod folder.
[Galaxy S 4 i9505 Android Development] diddly3000:
This is my internal storage after i restored back to liquidsmooth which was on my ext sd card :P
[Galaxy S 4 i9505 Android Development] hawkerpaul:
I can't see how it did that.

Can you post up /sdcard/GS4Hawker/Logs/GS4ROMWipe.log please
[Galaxy S 4 i9505 Android Development] diddly3000:
Don't have that folder anywhere mate.

Not in sd or internal
[Galaxy S 4 i9505 Android Development] diddly3000:
Don't know if it coincidence but since I used gs4romwipe I can't download or update apps from store.

Get error 927

I have cleared market data Google services data services framework data and removed Google account.

Rebooted and added account again and tried again with no luck

Edited sorted by wipe cache and dalvic and fixed permission
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_SystemWipe

Run Steps

1. Wipes everything from the /system partition.

Running this task will mean you will no longer have a ROM resident on your device and you will have to flash a new one immediately afterwards.

Called by:

ROMNuke
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Reserved for new core task #15
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Reserved for new core task #16
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Reserved for new core task #17
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Reserved for new core task #18
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Reserved for new core task #19
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Reserved for new core task #20
[Galaxy S 4 i9505 Android Development] hawkerpaul:
I've repeated this post in case it's been missed due to all the new previous post structure that was necessary due to post #2 becoming too large for me to edit.

V1 Beta10

1. Added AlbumArtWipe core task

2. Added GS4MyBackup preset zip

3. Added MyBackup core task

4. KernelWipe remove KTmonitor files

5. KernelWipe Added Alucard Kernel

6. Added support for SGH-I337

7. Display tweaks

Unfortunately, post #2 has now reached a size limit (30K) so I've had to split the core tasks into separate disjointed posts above
[Galaxy S 4 i9505 Android Development] John_wba:
HI mate, I'm using the s5 build.prop to get s5 toggles and thus not able to use the kernel wipe as it says my device not supported, any way I can edit this?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Look towards the tail end of gs4hawkercore.sh and look for the case statement that tests for the device name, (eg search for gt-i9505) and add it to the current line amongst the other tests. You will need to put in the device name exactly as it appears in your build.prop.

ie.

device=`My_Getprop $BUILD_PROP "ro.product.model"`

case "$device" in

GT-I9505|GT-I9505G|SGH-M919|SGH-I337 ) ;; <<<<<< Insert your device name in here

* ) my_echo "$device not supported!"

Exit_Script $ERR_UNSUPPORTED_DEVICE;;

esac
[Galaxy S 4 i9505 Android Development] hawkerpaul:
GS4HawkerCoreV1.11 (11/04/2014)

1. Removed beta tag from build

2. Identified more areas to wipe in the AlbumArtWipe operation

3. Core was not calling MyBackup as a direct passed parameter

4. MyBackup now called in KernelWipe in case any files that are wiped in this operation are included in the user's list of files to keep (/sdcard/GS4Hawker/Options/MyKeepFiles.txt)

5. Wipe of .android_secure no longer performed in GS4SDClean
[Galaxy S 4 i9505 Android Development] sir adem:
thanks :good::good::good::good:
[Galaxy S 4 i9505 Android Development] hawkerpaul:
GS4HawkerCoreV1.12 (06/05/2014)

1. com.android.providers.media no longer removed in MediaWipe as this includes album art. This area will now get removed only in the AlbumArtWipe core task.

2. New parameter in /sdcard/GS4Hawker/Options/GS4Hawker.prop PROCESS_KEEP_FILES. Default 1. When set, this will process the files/folders you have configured into /sdcard/GS4Hawker/Options/MyKeepFiles.txt within the GS4KernelWipe, GS4ROMNuke and GS4ROMReset/GS4SDClean preset zips. Setting this to 1 will backup the user-defined files at the start of the script, restoring them back at the end. Set to 0 will skip this backup/restore. Skipping is handy if you want to completely wipe the affected areas.

3. Include Adam Kernel in KernelWipe

4. KernelWipe now wipes /data/log/*

5. Added GS4MyRestore preset zip

6. Added MyRestore core task
[Galaxy S 4 i9505 Android Development] busbyeie:
Hi hawker does your scripts work with TWRP or only CWM ?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Hi mate.

I've not tried it personally, but they should work
[Galaxy S 4 i9505 Android Development] busbyeie:
Ok thanks, I must be doing something wrong as I can't seem to get them to work lol, I installed the core from the External SD Card using the TWRP Install and then did the same with the scripts but when I look in the Phone SDCard I see the GS4Hawker folder along with the other folders (Jobs, Logs, Options, Scripts) and the only 2 that have anything in them is Logs & Scripts and in Scripts I only have GS4HawkerCore.sh

Do you have to run the scripts using a terminal command or something ? if so I am probably getting the commands wrong being a nooob :D

Edit :

I just tried to install the core again after removing the original using your script, when installing it I get this.

core file installed...

Initializing...

failed to initialise core options!

is this the normal response I should see when 1st installing ?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Sounds like you have some dodgy permissions.

Try manually deleting /sdcard/GS4Hawker and try again.

By the way, the folders you installed the first time were all correct. All you needed to do after that point was to copy one or more of the preset zips and run them from recovery
[Galaxy S 4 i9505 Android Development] busbyeie:
Ok thanks Hawker I will give it another go and see what happens :good:
[Galaxy S 4 i9505 Android Development] PipoXtreme:
Hi

I have the same issue with TWRP.. If I try to install the zip with TWRP there comes the failure in the middle of the process but the folders were created .. :(
[Galaxy S 4 i9505 Android Development] hawkerpaul:
V1.13 (05/06/2014)

1. Allow for jflte and jfltexx product id recognition (for CM ROMS)

2. Find files speeded up in AlbumArtWipe and DelTemp core tasks.

3. DelTemp now searches for and removes any .write_test file/folder found. The presence of these folders seem to restrict write access to external sd card for certain apps (Eg. Titanium Backup)
[Galaxy S 4 i9505 Android Development] hawkerpaul:
V1.14 (11/06/2014)

1. MyBackup now performed in GS4AlbumArtWipe, GS4BloatWipe and GS4MediaWipe

2. MyRestore no longer performed in GS4KernelWipe

3. Obtaining build.prop details made more robust.

4. Include Googy-Max3 Kernel in KernelWipe

5. Filesystems mounted by name, and not by specific device.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
V1.15 (13/07/2014)

NOTE: This build has incorporated multiple-device integration. The GS4 and GS2 are currently supported. Because of this, all the preset zips have been renamed (no GS4 prefix) and the default installation location for scripts and backups etc. has changed from GS4HawkerCore to folders called HawkerCore on the root of your internal and external SD cards. This will reset the properties file (which has been renamed to HawkerCore.prop) so if you have any non-default options set in here, then you will have to re-edit HawkerCore.prop after this version is installed.

The old GS4Hawker folders will no longer be used on this, and subsequent builds, so if you no longer need the files/folders contained within HawkerCore folders, you can remove this folder manually from both internal and external SD cards or run GS4HawkerCoreDel.zip (NOT HawkerCoreDel.zip)

1. Multi-device integration. Currently this allows for GS2 and .

2. HawkerCore.zip now contains the core, plus all the preset zips, which all get installed into /sdcard/HawkerCore/Scripts.

3. CT_DataWipe operation improved and speeded up.

4. STweaks and EXTweaks apps are now always removed in the CT_KernelWipe operation, and not just the dalvik-cache areas. If the kernel that is about to be flashed uses either app, then it will be bundled in the zip anyway.

5. CT_MyBackup and CT_MyRestore are now only performed automatically in ROMNuke and ROMReset/SDClean
[Galaxy S 4 i9505 Android Development] chrhei:
Download not possible. File size correct, approx. 13MB?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
yes 13mb

There's been a couple of downloads so far, so what do you mean not possible?
[Galaxy S 4 i9505 Android Development] chrhei:
If I follow the link from OP I end up here : d-h.st/#files

Search for your files will show me them all, but I not able to download. Maybe I'll try from my notebook instead of using my I9100.Thx anyway. >link removed<
[Galaxy S 4 i9505 Android Development] SoLoR1:
yeh get same problem however you can get new Core here: link removed

however i didnt find new KernelWipe and other scripts....
[Galaxy S 4 i9505 Android Development] chrhei:
I was able to download now from dev-host after a manual search. THX. >link removed<
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Link fixed

Can you and solor1 please remove the links in your posts

As for the other zips, please read point 2 in the v1.15 note
[Galaxy S 4 i9505 Android Development] chrhei:
done. regards
[Galaxy S 4 i9505 Android Development] SoLoR1:
Link removed and sorry for not reading whole changelog :)
[Galaxy S 4 i9505 Android Development] hawkerpaul:
No worries mate, and thanks.

Can you remove the link from the quoted text in this post too please
[Galaxy S 4 i9505 Android Development] SoLoR1:
Done :)
[Galaxy S 4 i9505 Android Development] goldencore:
I can't find the Hawker Folder on my device (I9505). I can choose it in recovery, but I don't see it in my file browser (root mode). Searching for it, starting in the root folder of the system, yields no results. What am I doing wrong?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
it installs into /sdcard/HawkerCore, and not to root (/HawkerCore)

If there was a problem the initial run of HawkerCoreV1.15.zip should have complained about something.
[Galaxy S 4 i9505 Android Development] goldencore:
Thanks!

Maybe I didn't explain my problem properly.

I can see the HawkerCore folder and its subfolders when I boot into recovery and chose "Install zip from SD card", but if the phone is just running normally the folder is nowhere to be found. It just doesn't exist on the internal memory. I checked everything under the "mnt" directory and started a file search in the root directory of the system to search through all subfolders.

It's definitely not in /sdcard

My only clue might be that I am using Link2SD app and so there is a partition on the SD card that is not visible to file browsers. Maybe something gets mounted different in recovery.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
I dont know mate.

What explorer app are you using?

In root explorer, it comes under the "Storage" tab (ie. /storage/emulated/0) to which /sdcard is linked.
[Galaxy S 4 i9505 Android Development] JavaScout:
Failed at testing v1.15. Main zip installs w/o errors, but the kernelwipe says "cannot mount /sdcard/". Wipe action terminated. How is that possible?

P.S. I'm using i9100 w/ latest official MIUI v5 rom. Trying to install jb-dorimanx, no luck, so far.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Whats the exact error messages, as the text you have described are not in my scripts
[Galaxy S 4 i9505 Android Development] JavaScout:
Before I continue, I must say, that after main zip flash, there's no HawkCore/Scripts folder in my emmc memory. So, I've added it manually by extracting the zip, and recreating the whole Scripts path, as displayed in the 1st post of this thread. Then I reboot to recovery, and trying to flash KernelWipe. Btw, I don't have external memory card.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
not sure whats going on there then

the HawkerCore.zip creates /sdcard/HawkerCore

within there, there should be Scripts sub folder from the flash, and it also creates other sub-folders in the initialization sequence

i would need the exact messages your getting to look into it further
[Galaxy S 4 i9505 Android Development] JavaScout:
HawkerCore produces no errors. Is that possible w/o "/sdcard/" mount point on-board?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
The core installation doesn't touch external sd card so i would be surprised if that would cause a problem . it just creates the areas i mentioned earlier in /sdard/HawkerCore (internal sdcard)

I've never tried it without an external sd card fitted but I'll try and test it later when I'm at my pc.
[Galaxy S 4 i9505 Android Development] JavaScout:
Thanks, m8. Do you still want me to recreate the flow that I've mentioned before?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
If you can remove any HawkerCore folders you may have and reflash the core zip i'd appreciate if you could let me know what actually gets created and if any log files were created then put them up here for me to have a look.

Cheers

Edit:

I just removed everything and re-installed without an external sd card fitted.

Apart from the script running slower at startup as it attempts to find an external sd card (which has been addressed and will be fixed in V1.16), it all seemed to work ok.
[Galaxy S 4 i9505 Android Development] JavaScout:
Did you try to run kernel wipe script w/o removable card? Anyway, I've tried yesterday to run the scripts w/ both cards on board, and it worked well. Installation is deployed at the removable card, so I'm pretty sure that having both cards on board is necessary. I took a look at your main script, and there are no checks for an alternative installation location...

OT: nevertheless, dorimanx installation has failed
[Galaxy S 4 i9505 Android Development] hawkerpaul:
It only ever installs onto /sdcard as this is the only location I can guarantee for all. This for me is the internal sd card and is the case for the S2 also

Everything works for me without my external sd card inserted.

However, on the S2. I seem to vaguely remember that for some reason the external sd card gets mounted to /sdcard in recovery only.

I will have to look into it further