yashsingh1/xdaforums huggingface dataset:
[Galaxy S 4 i9505 Android Development] hawkerpaul:
almost but not quite. See post 8 for all the steps a nuke performs, but in the case of a full wipe stock rom odin flash, a rom nuke would also clear known areas on your external sd card.

you need the core in order to run any of the zips, as they all call the core script. After a full wipe, the core is restored back to internal sd card.

most, but not all stock flashes do a full wipe, as I've come across some that had some that do not.
[Galaxy S 4 i9505 Android Development] kewinhdorff:
Okay but then if I flash your core zip and then Romnuke it won't wipe out the end partition? And backup Are they stored in the external or internal memory? After that I am going to flash stock rom 4.2.2 Sammy do i Need to flash the delete script after? And do I need reboot after installing the core script?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
As I already stated in my previous post to you, after the nuke wipes internal storage it automatically puts the core script back onto internal sd ready for the next script run if required.

As for running the delete script after running a nuke, that's entirely up to you.

Backup locations are fully explained the op's. Defaults to external if you got one but this can be changed
[Galaxy S 4 i9505 Android Development] qxps:
Here is the partition list for the tmobile s4 sgh-m919.

Let me know if your scripts will work. I used the s2 versions a lot when I was on the s2. But now I got a tmo s4 for the unlocked bootloader and LTE and would like to use them again.

Thanks.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Yes they will, but I will have to include the device id into the script

Let me know what ro.product.model returns. Either look in /system/build.prop, or do a getprop ro.product.model in adb shell.

is it "sgh-m919"? I need to know EXACTLY (case sensitive etc)
[Galaxy S 4 i9505 Android Development] qxps:
SGH-M919

All capitalized.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
GS4HawkerCoreV1.b7 now available to download.

Added support for SGH-M919 variant
[Galaxy S 4 i9505 Android Development] qxps:
Thanks
[Galaxy S 4 i9505 Android Development] qxps:
Hey, question, is the script supposed to be installed at the root of the internal user storage (/data/media/0), or in /data/media? Mine is in /data/media and when I ran the zip to install the core it said it failed to initialize the gs4hawker options.

Is it normal?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Installs to /sdcard and creates GS4Hawker folder within there, so ordinarily this will be /data/media/0
[Galaxy S 4 i9505 Android Development] qxps:
I managed to flash it to data/media/0 by changing a setting in philz recovery (it was using data/media as internal sd).

I keep getting the options failure though and none of the folders the description says core creates are being created, except for scripts.

I found this in the update script

# If problems accessing /sdcard, try mounting /data and use /data/media/0 instead of /sdcard

#mount("ext4", "EMMC", "/dev/block/mmcblk0p29", "/data");

should I change all instances of /sdcard on the script to /data/media/0 to see if thats the problem? or is the option file and folder supposed to be created by me?
[Galaxy S 4 i9505 Android Development] hawkerpaul:
I'm limited in what I can do as I'm away on holiday and don't have access to my PC so I can't advise changing the updater script.

Installing the core should at least create the scripts, options and logs sub folders within the /sdcard/GS4Hawker folder. If it had a problem seeing /sdcard the script would complain and exit.

Is there anything in/cache/recovery/last-log directly after the install run?
[Galaxy S 4 i9505 Android Development] qxps:
Nup, the only folder being created is GS4Hawker/Scripts in /data/media/0 with GS4HawkerCore.sh :(

Its weird because it fails at the bolded line

if run_program("/tmp/busybox", "test", "-f", "/sdcard/GS4Hawker/Logs/Init1") != 0 then
# Initialize to create folders and options etc. as not done so already
if run_program("/sdcard/GS4Hawker/Scripts/GS4HawkerCore.sh","GS4Init") == 0 then
ui_print("NOTE: GS4Hawker options have been reset!");
ui_print(" Please check files within");
ui_print(" /sdcard/GS4Hawker/Options");
ui_print(" before running any of the scripts.");
else
[B]ui_print("Failed to initialise GS4Hawker options!");[/B]
endif;
endif;

run_program("/sdcard/GS4Hawker/Scripts/GS4HawkerCore.sh","GS4Init" is not returning 0.

Checking GS4init

case $PARAM1 in
gs4init)
# Called in the installation zip, GS4HawkerCore.zip
# The various files+folders will be automatically created by now
# Exit
my_echo "Initializing..."
if [ ! -e $LOG_DIR/Init1 ]
then
Touch_File $LOG_DIR/Init1
fi
Exit_Script 0;;
esac

Where are the folder creation functions or commands, or the jump to another function in GS4Init?

I have no experience with this development language so I have no idea of what many of the strings mean.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
The sub folders get created in the shell before it reaches that point.

Seems like for some reason it's having problems creating the Logs sub folder as the shell creates a file within there to let the updater script know if the initialisation succeeded. perhaps it couldn't change permissions to the GS4Hawker folder in order to gain write access.

Try creating all the sub folders manually in root explorer and try running it again, or at least check the permissions on the GS4Hawker top level folder
[Galaxy S 4 i9505 Android Development] hawkerpaul:
GS4HawkerCoreV1.b8 now available to download.

Core was not being installed correctly on very first installation
[Galaxy S 4 i9505 Android Development] qxps:
I haven't been able to follow up on this because I sent my S4 for warranty repair. Screen went nuts. Just waiting for it to return.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
This update should hopefully sort out the problem you were having mate.
[Galaxy S 4 i9505 Android Development] fabiienb:
Hey, seems your script not work with philz kernel!?

Envoyé de mon GT-I9505 en utilisant Tapatalk
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Philz kernel? He doesn't do one for s4. I assume you mean recovery. I've been using philz recovery since day one and it works fine for me.

I need a little more than "it doesn't work" I'm afraid.
[Galaxy S 4 i9505 Android Development] fabiienb:
Yes recovery sorry... :-\ he says it's not supported...

Envoyé de mon GT-I9505 en utilisant Tapatalk
[Galaxy S 4 i9505 Android Development] hawkerpaul:
What is your exact device name (case sensitive).

You can find this out either by looking in /system/build.prop for ro.product.model, or doing a getprop ro.product.model at a terminal emulator/adb shell.
[Galaxy S 4 i9505 Android Development] fabiienb:
It's basically i9505 : 1.9ghz France model, your script worked before but now no...

Mhmm maybe [MENTION=4666971]Phil3759[/MENTION] changed anything?

Envoyé de mon GT-I9505 en utilisant Tapatalk
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Build 1 Beta9 (06/03/2014)

1. MediaWipe not removing internal/external sdcard areas

2. Display tweaks

3. More information output to log file
[Galaxy S 4 i9505 Android Development] sergio114:
hawkerpaul, Please could you give support to Adam Kernel (GT-I9505)?.

Very Thanks for your scripts and support. Regards
[Galaxy S 4 i9505 Android Development] qxps:
I flashed it this time, everything got created successfully now, all folders and files. I will tinker with it a bit and see how it rolls. Thank you for fixing the issue. Oh by the way, if you want, you can also add support for the SGH-I337, it has the same partition names and order as the M919 if that's what you look for.
[Galaxy S 4 i9505 Android Development] lizcanoc:
Update i337m canadian version... :)

Enviado desde mi GT-P5210 mediante Tapatalk
[Galaxy S 4 i9505 Android Development] hawkerpaul:
I'm on a GE ROM, and as far as I can tell, Adam is only for TW.

If you can find out any files/folders this kernel leaves behind, then I shall by all means include them in the next release.

Thanks

Done in Beta10 (no ETA as yet)
[Galaxy S 4 i9505 Android Development] kennbo82:
Bloatwipe doesn't work

Hi,

i just tried your Bloatware removal script. I'm using CM11 and newest Philz, but seems any issue with the .TXT file. I created with Windows Notepad.exe and copied to /sdcard/GS4Hawker/Options. What do I wrong? Flash error:

File Parameter: BloatWipe.txt

not supported!

Core exit status:4

GS4BloatWipe: Core Script failed!

My BloatWipe.txt:

/system/app/Apollo.apk

/system/app/CMFileManager.apk

/system/app/DeskClock.apk

/system/app/Development.apk

/system/app/Email.apk

/system/app/Exchange2.apk

/system/app/LockClock.apk

/system/app/Term.apk

/system/app/Themechooser.apk

/system/priv-app/Trebuchet.apk
[Galaxy S 4 i9505 Android Development] hawkerpaul:
For some reason the script has not been able to locate your build.prop, or extract the information from the ro.product.model line

Also, unrelated to your problem, as stated in the OP, you need to use NotePad++ to create any files the scripts use.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
AlbumArtWipe (Latest .zip: 20/07/2014)

This zip will remove all known non-embedded album art images from your device. Any album art contained in your mp3's TAGS will not be touched. This script is handy just for a general clean up, or could possibly rectify image corruptions in your media player.

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/AlbumArtWipe

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. Inconsistent album art images in your media player.

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)

AlbumArtWipe Run Steps

1. CT_AlbumArtWipe

2. CT_DalvikWipe

3. CT_CacheWipe

Let me know if you are aware of any other locations that your media player/art grabber app uses to store non-embedded album art images, and I will look into including them in future updates.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
MyBackup (Latest .zip: 20/07/2014)

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

This zip will backup/restore your own pre-defined list of files.

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. Install zip from SD card>Run /sdcard/HawkerCore/Script/MyBackup or MyRestore

4. Reboot

These zips use /sdcard/HawkerCore/Options/MyKeepFiles.txt as its default list of files/folders to back up.

MyBackup Run Steps:

1. CT_MyBackup

MyRestore Run Steps:

1. CT_MyRestore

For full details, please read the CT_MyBackup/MyRestore core functions.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
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 am going to have to split the core tasks into separate disjointed posts below:
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task:CT_ADWipe (Android Data Wipe)

This removes Android and data folders (contain user application's data) from both internal and external sd cards in order to give the next ROM a fresh start. These areas will normally get regenerated when firing up the new ROM.

Trivial files are always removed from both cards in this operation. However /Android and /data folders are only wiped if SDCARD_FULL_WIPE=1 as these areas may contain user's application backups (eg. of settings etc).

All files/folders that get removed in this operation will get backup up to HawkerCore/Backups. To change this location to the external SD card, see Changing the Backup Location.

Run Steps

1. Deletes Non-essential folders from both internal and external sd cards.

.data

.face

.KRSDK

.mmsyscache

.news24

.SPenSDK30

.thumbnails

Application
​

2. Clears pre-defined files/folders of your own choosing (see Extra user-defined files/folders for removal below)

3. Deletes ROM-specific data areas (GS2 only)

4. Clears the following folders (ROMNuke and ROMReset only)

.android_secure​

5. The following folders are cleared from both internal and external SD cards:

Android

data​

Backups made by a CT_ADWipe operation

For a totally fresh ROM, CT_ADWipe clears the above Android Data Wipe Folders. This is so your apps have a totally clean slate to work from. Android Data Wipe Folders will also get backed up if required. (See Changing the Backup Location and Summary of Options File)

However, you may want to use certain application's data saved from your previous ROM. (for example Apex Launcher's saved backup of your launcher configuration) The Android Data Wipe Folders that CT_ADWipe removes get backed up to HawkerCore/Backups. You can restore any of these backed up areas by manually by copying the required. This can be done through any file explorer type of application (eg. My Files, ES File Explorer, Root Explorer etc.) or on your PC.

Note, if there are certain areas within the Android Data Wipe Folders that you do not wish to get removed, you can include these in HawkerCore/Options/MyKeepFiles.txt. See Keep files/folders that are normally removed from within the CT_ADWipe and CT_DataWipe operations below.

Extra user-defined files/folders for removal

HawkerCore/Options/MyADDelete.txt

This file can be edited to include any extra files or folders that you want to delete in an CT_ADWipe operation. This is handy if you know of specific ROM/application folders that you have installed and you wish to have cleared.

An example of MyADDelete.txt could be:

/sdcard/.avg

/sdcard/.AllSharePlay

/storage/extSdCard/Alliance

/storage/extSdCard/.avg

(please see the note on File/Folder Paths Format)​

Called by:

ROMNuke

ROMReset

SDClean
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task:CT_AlbumArtWipe

Clears known non-embedded album art image files. Currently, the script removes album art downloaded using the following art grabber apps:

1. Cover Art Grabber​

Run Steps

1. Deep-scans both internal and external SD cards and removes any files matching the following:

albumart*.jpg

.albumart

.albumthumbs

albumart

albumthumbs
​

2. Remove the following folders from internal and external SD cards:

iTagCache​

As can be seen in point (1.) in the above removal list, any jpg file beginning with "AlbumArt" will be removed, so if you have any valid images matching this file mask do not run this script!

Called by:

AlbumArtWipe
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_BloatWipe

Run Steps

1. Remove every file/folder defined in /sdcard/HawkerCore/Options/BloatWipe.txt (or the passed file list stored in /sdcard/HawkerCore/Options folder)

This core function is used primarily to remove BloatWare from your device, but it can, in theory, be used to remove anything you want. What actually gets removed is governed totally by the contents of the file that you supply to it as a parameter. By default (with no parameter passed) it uses /sdcard/HawkerCore/Options/BloatWipe.txt as its default list of files. However, any file name can be passed as a parameter for BloatWipe, or to CT_BloatWipe directly.

The passed file must contain one fully-pathed file/folder per line. Each entry in the passed file will be removed by the CT_BloatWipe core function.

As one person's definition of Bloat can vary drastically to another's, I will not supply a default BloatWipe file list. I will leave this up to you to create yourselves.

An example of /sdcard/HawkerCore/Options/BloatWipe.txt may be:

/system/app/YahoonewsPhone2013.apk

/system/app/YahoostockPhone2013.apk

/system/app/YouTube.apk

/data/data/com.sec.knox.containeragent

/data/data/com.sec.knox.eventsmanager

/data/data/com.sec.enterprise.knox.attestation

/data/data/com.sec.knox.app.container

/data/data/com.sec.knox.seandroid

/data/data/com.sec.knox.store

/data/data/com.samsung.klmsagent

/data/data/com.sec.enterprise.knox.attestation​

As mentioned, you can supply any valid file that is in the required format as a list of files/folders to remove. This file must be stored in /sdcard/HawkerCore/Options.

For example, the updater-script in BloatWipe is as follows:

if run_program("/sdcard/HawkerCore/Scripts/HawkerCore.sh","BloatWipe") == 0 then

This will use the default flie list /sdcard/HawkerCore/Options/BloatWipe.txt
​

However, this can be amended to use any other valid file list, stored in /sdcard/HawkerCore/Options

Eg:

if run_program("/sdcard/HawkerCore/Scripts/HawkerCore.sh","BloatWipe","MyBloatList.txt") == 0 then

This will run all the steps defined in BloatWipe but will remove the folders/files listed in /sdcard/HawkerCore/Options/MyBloatList.txt
​

if run_program("/sdcard/HawkerCore/Scripts/HawkerCore.sh","CT_BloatWipe","MySamsungAppList.txt") == 0 then

This will just remove the folders/files listed in /sdcard/HawkerCore/Options/MySamsungAppList.txt
​

Please be extra careful and pay particular attention to the files/folders you enter into your removal list, as once it has been deleted by the script, its gone. The only way to get anything back that has been removed by this core function would be to restore a Nandroid backup, or reflash your ROM.

Also be extra careful if you supply any folder names, as EVERYTHING in the supplied folder will be removed.

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

Called by:

BloatWipe
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_CacheWipe

Run Steps

1. Wipes the /cache partition

2. Removes all application cache from /data/data/[app-name]/cache

Called by:

AlbumArtWipe

BloatWipe

CacheWipe

DelTemp

MediaWipe

ROMNuke

ROMReset

SDClean
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_DalvikWipe

Run Steps

1. Deletes the dalvik-cache areas from

/data

/cache
​

Called by:

AlbumArtWipe

BloatWipe

CacheWipe

DelTemp

MediaWipe

SDClean
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_DataWipe

Performs a factory reset, which wipes the /data partition (/dev/block/mmcblk0p29) and optionally, the internal SD Card.

Run Steps

1. Wipe the data partition (and therefore also dalvik-cache)

2. If the SDCARD_FULL_WIPE property is set to 1, then the Internal SD Card is also wiped (retaining the HawkerCore folder)

On the S4, the internal SD Card (/sdcard) is actually stored within the data partition in /data/media/0. So a wipe of /data will therefore wipe out your entire internal SD Card. The the default behaviour for the CT_DataWipe operation is to retain the contents of the internal SD Card (V1.15 and later). To change this behavior, you can edit the SDCARD_FULL_WIPE property setting in /sdcard/HawkerCore/Options/HawkerCore.prop

Note: Where SDCARD_FULL_WIPE=1, you may end up with a sub-directory called "0" on your internal SD card after this operation has completed, which contains the contents of your original internal sd card before the wipe (with the original internal sd card being wiped). I'm not sure as yet as to why this could happen, but this backup could prove to be handy to you. If you do not require this, you should manually delete any previous contents from the "0" sub-directory.

Called by:

ROMNuke

ROMReset
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_DelTemp

Clears known temporary and theme-corrupted files.

Run Steps

1. Attempts to remove the following files/folders from the root of the internal/external SD Cards:

LOST.DIR

log

?Theme

?rtheme

*THEME

fix_permissions.log

.downloadTemp

*MSTPVR​

2. Deep-scans internal and external sd cards and removes any of the following files:

desktop.ini

.write_test

_fuse.hidden*​

3. Clears old theme morph backup folders from the root of both internal and external sd cards:

vrtheme

vrtheme-backup

UniversalFlasher​

Any of the above files/folders will get removed, and thus free up space.

In the example of uTHEME and uMSTPVR folders, these are known corrupted folders which can make your report your SD card as being full. If you are getting such messages and have either of these folders, running this script should fix your problem.

DelTemp is totally non-destructive as far as your ROM and data is concerned, so it can be run at any time without any having to reflash anything afterwards. Your ROM/data/programs etc. will all remain totally in tact.

Called by:

DelTemp

MediaWipe

ROMNuke

ROMReset

SDClean
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_EFSRestore

This will attempt to restore the the last backup made by CT_EFSBackup

NOTE: Restoring any of the EFS-related partitions should never be taken lightly, and should be done as a last resort, ie. when you are sure that your device's EFS is corrupt.

Although I have provided this restore script, I would always recommend this to be done manually so that you can double check the [partition-name].img files beforehand for time/size etc.

To restore manually:

1. Start Terminal Emulator session (or ADB shell on PC)

2. If on a $ prompt, get to # prompt by entering su

3. cd [BKP_LOCATION]/HawkerCore/Backups/efs (where BKP_LOCATION = /sdcard or /storage/extSdCard)

4. check your [partition-name] .img file for time/size etc

5. dd if=[partition-name].img of=[partition-block-device]

So for example, for the efs partition:

dd if=efs.img of=/dev/block/mmcblk0p10 (GS4)

or

5. dd if=efs.img of=/dev/block/mmcblk0p1 (GS2)

For the full list of partition names and their associated block devices, look at the CT_EFSBackup core task.

Called by:

EFSRestore

Credits:

Thank you to AntaresOne for finding out some extra EFS-related partitions.
[Galaxy S 4 i9505 Android Development] hawkerpaul:
Core Task: CT_FixPerm

Run Steps

1. Fixes permissions in

GS4:

system/app

system/priv-app

system/framework

data/sec_data

data/app

GS2:

/preload/symlink/system/app

system/app

system/priv-app

system/framework

data/sec_data

data/app

All folders found within the above areas are set to rwx rw- rw (755)

All files found within the above areas are set to rw- r-- r-- (644)

Called by:

CacheWipe

ROMReset

SDClean