FORUMS

[CWM/TWRP UTIL] Recovery Scripts (GS4 and GS2)

3,294 posts
Thanks Meter: 6,334
 
By hawkerpaul, Senior Member on 14th August 2013, 11:59 AM
Thread Closed Email Thread
FINAL Version: 1.28 (25/03/2015)
(For a full changelog, see the end of Post #2 )

NOTE:
V1.28 is the final version for this suite of scripts.
I have however started a separate KernelWipe thread.
This will become the main thread as far as any KernelWipe updates are concerned.

Following on from my GS2 wipe scripts (see here) I have now also developed these for the (GT-i9505 specifically). They may possibly work for other variants, but I cannot say for certain at this point, as I can only try them out on my own device.

The scripts comprise of a core shell (HawkerCore.sh) which all the bundled preset zips call. Therefore if you update HawkerCore.sh individually, you will, in effect, have updated all the preset zips which call it.
Initial Installation Instructions
1. Copy HawkerCoreV???.zip onto your device
2. Reboot into Recovery
3. Install zip from SD card>Run HawkerCoreV???.zip
You can then run any of the bundled zips by performing point (2.) below.

Script Execution
To flash any of the bundled zips:
1. Reboot into Recovery
2. Install zip>Run /sdcard/HawkerCore/Scripts/[script].zip
3. Reboot

Update Instructions
After the core has been successfully installed, you will then be in a position whereby you can run any of the preset zips. When updates are subsequently released you can of course download and install the entire updated HawkerCoreV??? file again, which updates the core, and re-flashes all the preset zips. This is the safest and most reliable method to update.
Alternatively, if the HawkerCore.sh core shell script is available for download, then you should be able to download just this, and copy it to /sdcard/HawkerCore/Scripts This will then serve all the the zips that were bundled in your initial/previous installation.
If the core shell is not available individually at the root of the download area, then this indicates a full download is required for the current version.

Removal
If you want to remove all traces of my scripts, flash /sdcard/HawkerCore/Scripts/HawkerCoreDel.zip. This will remove all files and folders made by both the installation and execution of any of these scripts from your internal and external sd cards.
Please note that doing so will also remove any backups that the scripts may have previously made.
Downoad Here

Download Here

HawkerCore
HawkerCore.sh is the central core shell script used by all the bundled preset zips below:
Summary of all Preset CWM/TWRP .zips
I have supplied the following preset zips, which are run through recovery. These get installed into /sdcard/HawkerCore/Scripts. These scripts are not linked to each other in any way, so you can remove any you do not wish to use. Just remember that installing an update to the suite will re-install all the preset zips. You can also of course remove the zip files you do not want before installing using 7Zip.
Click on the zip name to go directly to its associated detailed post.

AlbumArtWipe
Clears known non-embedded album art image files

BloatWipe
Wipes your pre-defined Bloat removal list, defined in /sdcard/HawkerCore/Options/BloatWipe.txt

CacheWipe
Wipes cache, dalvik-cache and fixes permissions in /system areas

DelTemp
Clears known temporary and theme-corrupted files

EFSBackup/EFSRestore
Backup/restore your EFS partition

KernelWipe
Clears old kernel-related files and application cache relating to kernel performance, prior to installing a new kernel.

MediaWipe
Clears media-related databases, libraries, cache and thumbnails

MyBackup/MyRestore
Back up/Restore a list of files/folders contained in /sdcard/HawkerCore/Options/MyKeepFiles.txt

ROMNuke
Performs a deep factory reset and wipe on your device prior to flashing a new ROM. Also clears known android and application related data areas from internal/external SD cards. As this performs a factory reset (wiping your data partition) you will then be required to go through the initial setup process again on first boot.

ROMReset
Performs a deep clean on your device, keeping your current ROM.
ROMReset is identical to ROMNuke, but does not perform a CT_KernelWipe and does not wipe your current ROM (CT_SystemWipe)

SDClean
This clears ROM-related areas from both internal and external SD Cards.
SDClean is handy for when you want to deep-clean your current ROM without having to re-run the initial setup wizard. This will clean application-related areas off your internal+external SD Cards and run media cleaning functions.
SDClean is identical to ROMReset, but does not perform a factory reset. (CT_DataWipe)
Currently Supported Devices
1. GS4
  • GT-I9505
  • GT-I9595G
  • SGH-M919
  • SGH-I337
  • jflte
  • jfltexx
2. GS2
  • GT-I9100
NOTE: The handset id is taken from /system/build.prop ro.build.model If this fails it will attempt to read ro.build.product

Other Devices
All development of these scripts has been on my own S4, which is a GT-I9505. If you have an S4 variant that is not in the supported list above, or even a device other than an S4 or S2 and would like to use these scripts then do the following, and I will see if I can incorporate it into the core. I would of course have to be informed of any areas specific to your device/device's kernels/roms etc that would require incorporating into the scripts.

1. Report 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.
2. Type the following at a terminal emulator/adb shell # prompt, and post up your result, noting the following important device names:
GS4
ls -al /dev/block/platform/msm_sdcc.1/by-name
  • lrwxrwxrwx root root 2014-03-20 07:46 cache -> /dev/block/mmcblk0p18
  • lrwxrwxrwx root root 2014-03-20 07:46 efs -> /dev/block/mmcblk0p10
  • lrwxrwxrwx root root 2014-03-20 07:46 system -> /dev/block/mmcblk0p16
  • lrwxrwxrwx root root 2014-03-20 07:46 userdata -> /dev/block/mmcblk0p29
GS2
ls -al /dev/block/platform/dw_mmc/by-name
  • lrwxrwxrwx root root 2014-03-20 07:46 cache -> /dev/block/mmcblk0p7
  • lrwxrwxrwx root root 2014-03-20 07:46 efs -> /dev/block/mmcblk0p1
  • lrwxrwxrwx root root 2014-03-20 07:46 system -> /dev/block/mmcblk0p9
  • lrwxrwxrwx root root 2014-03-20 07:46 userdata -> /dev/block/mmcblk0p10
(Note: Since v14, the file systems are now mounted by name, which will hopefully broaden the script's compatibility across devices.)
Summary
..............cache..dalvik..system..data..intSD..FixPerm..int/extSD
BloatWipe..Y........Y..........y*........y*......y*.......y es......N
CacheWipe.Y........Y.........N.........N.......N.......yes. ......N
DelTemp.....Y........Y.........N.........N.......N....... yes.......y
KernelWipe..N........N........N.........N.......N.......yes. ......y
MediaWipe..Y........Y........N.........N.......N.......yes. ......y
ROMNuke...Y........Y........Y.........Y.......Y*.......N. ........y
ROMReset..Y........Y........N.........Y.......Y*.......N.. .......y
SDClean.....Y........Y........N.........N.......N.......y es.......y

Y=Fully wipe
Y*=Internal SD card (/sdcard) is fully wiped when SDCARD_FULL_WIPE=1. When 0, it is retained.
y=Selective areas only wiped. (See specific post for more details)
y*=Selective areas wiped (if supplied in your pre-defined removal file)

Please Note
I use these scripts myself between many flashes of different ROMS, and are provided here, as-is, out of my passion for development. Although every effort has been made to ensure everything works correctly on my handset I cannot be held responsible if things get messed up, or if you put something in your user-definable files that you shouldn't have included. As with everything else on here, you flash anything at your own risk. I always recommend performing the appropriate full backups before attempting to flash anything onto your device.


Credits:
Thank you to AntaresOne for finding out some extra EFS-related partitions.
The Following 78 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 11:59 AM |#2  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
HawkerCore
FINAL Version: 1.28 (25/03/2015)
HawkerCoreV???.zip installs /sdcard/HawkerCore/Scripts/HawkerCore.sh along with all of the above mentioned preset script zip files.
This is the central core of all my scripts. If you update the central core, this will have an affect on all of the preset zips that use it.

Installation
1. Copy the latest version of HawkerCore.zip onto your
2. Reboot into Recovery
3. Install zip from SD card>Run HawkerCoreV???.zip

You do not need to flash the core each time prior to running any of the preset zips.
After the initial installation, the only time you will need to re-flash HawkerCore is if you have fully wiped your internal storage (/sdcard), or if you have downloaded a full core update.


Core Tasks
These core tasks are contained in HawkerCore.sh, and combine to form the the preset zips (ROMNuke, ROMReset etc.)
Any of these core tasks can be called directly by a zip file updater-script if required.
Eg. run_program("/sdcard/HawkerCore/Scripts/HawkerCore.sh","CT_DataWipe")

CT_ADWipe
CT_AlbumArtWipe
CT_BloatWipe
CT_CacheWipe
CT_DalvikWipe
CT_DataWipe
CT_DelTemp
CT_EFSBackup
CT_EFSRestore
CT_FixPerm
CT_KernelWipe
CT_MediaWipe
CT_MyBackup
CT_MyRestore
CT_SystemWipe

Files/Folders Created/Used

Folders
The following folders are created to hold options, logs and backups:
/sdcard/HawkerCore/Scripts (holds the core HawkerCore.sh)
/sdcard/HawkerCore/Jobs User-defined jobs
/sdcard/HawkerCore/Options
/sdcard/HawkerCore/Logs
/sdcard/HawkerCore/Backups or /external_sd/HawkerCore/Backups, depending on the specified backup location.

Files
1. /sdcard/HawkerCore/Scripts/HawkerCore.sh. This is the Core script.
2. /sdcard/HawkerCore/Options/HawkerCore.prop. Options file for all my scripts.
3. /sdcard/HawkerCore/Options/MyADDelete.txt Extra files/folders to delete in the CT_ADWipe operation (see Extra user-defined files/folders for removal above)
4. /sdcard/HawkerCore/Options/MyKeepFiles.txt. List of files that you want to keep that would otherwise get removed by the following preset zips:(see My Files/Folders to Keep) Whether or not the backup/restore is performed is dependant on the if the operation is performing a full wipe (SDCARD_FULL_WIPE=1) See Summary of Options File below for more details.
5. /sdcard/HawkerCore/Options/BloatWipe.txt The default bloatware removal list of files/folders that are removed by a CT_BloatWipe operation. You must manually create and maintain this list of files.
6. /sdcard/HawkerCore/Logs/[script-name].log Shows activity log of what the corresponding script has done. This gets overwritten the next time you run the script.

File/Folder Paths Format
The files above hold paths to files/folders to keep/delete etc. These must contain the full path to the file/folder, one file per line, with forward "/" NOT backward "" slashes. Use either the standard text editor on your handset to amend these files, or if you want to edit via your PC then use NotePad++ and ensure you EOL setting is for UNIX

The Options File
/sdcard/HawkerCore/Options/HawkerCore.prop
This options file controls the way all my scripts are run. Currently the following options are allowed:

BKP_LOCATION (default="ext")
Set to int/ext for internal SD Card/external SD Card
BKP_LOCATION=int (backs up to INTERNAL SD Card, ie. /sdcard/HawkerCore/Backups)
BKP_LOCATION=ext (backs up to EXTERNAL SD Card, ie. /external_sd/HawkerCore/Backups)
NOTE: If no external SD card is detected, any backups will be attempted to the internal SD card instead.
See the Changing the backup location section below for more details.

EFS_BKP (default=1)
Set if a backup of efs partition is required (EFS_BKP) automatically
when performing the more severe operations (ROMNuke, ROMReset and SDClean)
To perform in isolation (ignoring setting) use EFSBackup
EFS_BKP=1 to perform automatic backup to BKP_LOCATION/HawkerCore/Backups/efs,
EFS_BKP=0 for no automatic backup

SDCARD_FULL_WIPE (default=0)
Set if a FULL WIPE of the internal SD Card is required in the CT_DataWipe operation.
SDCARD_FULL_WIPE=1 performs a full wipe of internal SD Card (/sdcard). When this is set, any files defined in /sdcard/HawkerCore/Options/MyKeepFiles.txt will get backed up first and subsequently restored after the full wipe.
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.

SDCARD_FULL_WIPE=0 keeps the internal SD Card contents (/sdcard, ie. /data/media/0)
See the CT_DataWipe post for more details.

Changing the Backup Location
By default, backups are made to the external SD (if one is found) in /external_sd/HawkerCore/Backups. You can change the backup location to the internal SD card if required. This can be done by editing /sdcard/HawkerCore/Options/HawkerCore.prop. Within this file there is a line that tells the script where the backups are to be stored. Edit the following line as required:
BKP_LOCATION=int (backs up to INTERNAL SD Card, ie. /sdcard/HawkerCore/Backups)
BKP_LOCATION=ext (backs up to EXTERNAL SD Card, ie. /external_sd/HawkerCore/Backups)

Please note, that if you change the location between int/ext in HawkerCore.prop, your backups will not get automatically moved to the new location. You would have to manually move the current backup over to the new location if you do not want to potentially have two copies of the backups.

User-Defined Jobs
You can create your own jobs that call any of the above Core Tasks.
You must create a flashable zip for your job, and an associated job task list.
You can use the bundled /sdcard/HawkerCore/Scripts/MyJob.zip as your template.
Job task lists are stored in /sdcard/HawkerCore/Jobs

For example, suppose we want to create a job called ResetMedia that performs the following tasks:
CT_AlbumArtWipe
CT_DelTemp
CT_MediaWipe
CT_CacheWipe
CT_DalvikWipe

1. In /sdcard/HawkerCore/Jobs create a file called ResetMedia and insert the above tasks, one task per line. If you want to create this file on your PC, use NotePad++.
2. Save and exit, and if edited on your PC, copy the job file into /sdcard/HawkerCore/Jobs.
3. In /sdcard/HawkerCore/Scripts, copy MyJob.zip to ResetMedia.zip
4. Open ResetMedia.zip in 7Zip and navigate to the META-INF/com/google/android/updater-script
5. Copy the updater-script file to your desktop and open in NotePad++
6. Change all references to MyJob to ResetMedia
7. Save updater-script
8. Drag the amended updater-script back into ResetMedia.zip
9. Close ResetMedia.zip (will automatically save) and copy it to /sdcard/HawkerCore/Scripts
10. Reboot into recovery and run ResetMedia.zip as normal

Note: Any user-defined jobs you create must be named differently to any of the preset zips or core tasks.

Calling HawkerCore.sh
HawkerCore.sh can be called with any of the preset zips or core task identifiers as its parameter, either in Test Mode, or in the updater-script of a flashable .zip.
eg. run_program("/sdcard/HawkerCore/Scripts/HawkerCore.sh","ROMNuke")
run_program("/sdcard/HawkerCore/Scripts/HawkerCore.sh","CT_DataWipe")

Calling User-Defined Jobs:
[parameter] with a matching /sdcard/HawkerCore/Jobs/[parameter] job file. For example:
run_program("/sdcard/HawkerCore/Scripts/HawkerCore.sh","MyWipe")
(See User-Defined Jobs above for details)

Note: Any user-defined jobs you create must be named differently to any of the preset zips or core tasks.

Test Mode
You can call /sdcard/HawkerCore/Scripts/HawkerCore.sh through a script manager type of app, through a terminal emulator, or adb shell. You just need to supply it with any of the valid preset zip/user-defined job file names or core task.

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. The exceptions to this being the MyBackup preset zip, and the CT_DelTemp, CT_EFSBackup, and CT_MyBackup core tasks, where you will be given the opportunity to perform a genuine run if the Test Mode prompt is declined.

Changelog
Work in Progress (V1.29)
Identify more areas for wiping

V1.28 (FINAL) (25/03/2015)
1. Deeper detection of apk-related files for removal
2. Include extra partitions in the CT_EFSBACKUP and CT_EFSRESTORE core tasks
3. /sdcard/HawkerCore/Options/MyKeepFiles.txt was being reset on each run
4. Clear Cyanogenmod Eleven music player areas in CT_MediaWipe
5. Android and data folders are now always wiped on internal and external SD Cards in the CT_ADWipe operation, regardless of the SDCARD_FULL_WIPE setting (previously these folders would only get wiped when SDCARD_FULL_WIPE=1)
6. Clean Hulk Kernel in CT-KernelWipe Core Task
7. Clean Hybridmax Kernel in CT-KernelWipe Core Task

V1.27 (07/01/2015)
1. Deeper device id detection. Should now pick up S4 devices on S5-emulating ROMs
2. Clean Imperium Kernel in CT-KernelWipe Core Task
3. Suppress SKIPPED display for "." and ".." folders when wiping

V1.26 (07/10/2014)
1. Compatibility with latest Philz Recovery
2. Wipe AEL kernel in CT_KernelWipe core task
3. Display tweaks

V1.25 (15/08/2014)
1. Internal SD card contents were being stored in a "0" subfolder by a ROMNuke operation
2. Improved application removal function
3 /cache/dalvik-cache included in CT_DalvikWipe
4. Display tweaks

V1.24 (08/08/2014)
1. Find files method improved
2. Display tweaks

V1.23 (07/08/2014)
1. Improve detection of internal and external sd cards
2. Extended searches to remove .write_test file/folder
3. All kernel modules are now removed from /system/lib/modules in CT_KernelWipe

V1.22 (29/07/2014)
1. Resolved issues on GS2 when using later versions of CWM. This has meant a larger core zip (approx 10Mb) as busybox has had to be bundled in with the individual zips again. The problem seemed to be that later CWM versions are unable to execute programs directly off the internal SD card, and must be copied to an alternative temporary location (ie. /tmp) and run from there. Core-shell-only updates (HawkerCore.sh) will become available in subsequent versions if you don't want to download the suite of zips again. My thanks to @Ganjax again for his testing.

V1.21 (27/07/2014)
1. Streamlined zips. Busybox now gets installed into /sdcard/HawkerCore instead of having to bundle busybox in each of the zips separately. This has reduced the size of the core zip by 10Mb.
2. Remount of /system in script, as later versions of PhilZ seem not be able to mount initially.
3. Further attempts to resolve GS2 issues regarding internal/external sd card access. Many thanks to @Ganjax for his help and patience in testing for me for this. The conclusion so far is that for GS2 users, the scripts can only be run on TWRP, or on a version older than CWM 6.0.4.7.

V1.20 (26/07/2014)
1. Attempt to resolve GS2 issues regarding internal/external sd card access
2. Display tweaks

V1.19 (20/07/2014)
NOTE: I am simplifying the options file. This has lead to the removal of certain options, but the functionality is still present, and are all controlled by the setting of SDCARD_FULL_WIPE. This update will therefore reset the /sdcard/HawkerCore/Options/HawkerCore.prop options file back to default settings.
1. Attempt to resolve GS2 issues regarding internal/external sd card access. As i'm working blind on the S2, I've had to make guesses as to what the issue is here, but hopefully this version will resolve it. I recommend S2 users manually remove any folder called HawkerCore on both internal and external sd cards before flashing V1.19
2. CT_ADWipe always wipes nonessential areas of both internal and external SD cards, but now, /Android and /data within these cards are now only wiped depending on if SDCARD_FULL_WIPE=1 (default=0)
3. When MyBackup/MyRestore is called as part of a factory reset job, the backup/restore procedure only occurs when SDCARD_FULL_WIPE=1. This has lead to the PROCESS_KEEP_FILES option to be scrapped.
4. ANDROID_DATA_BKP scrapped. Now a backup of /sdcard/Android and /sdcard/data will always be attempted before being removed in a full wipe operation.

V1.18 (18/07/2014)
1. Issue sync commands prior to unmounting filesystems
2. Common filesystems were not being unmounted on exit
3. Display tweaks
4. Routine that returns getprop values made more robust

V1.16 (superseded by V1.17) (17/07/2014)
1. If the user has specified BKP_LOCATION=int in /sdcard/HawkerCore/Options/HawkerCore.prop the script no longer attempts to see if an external sd card is present. It is assumed the user has specifically set this value because the device has no external SD card fitted.
2. For GS2 only, /sdcard for some reason is mounted to external sdcard, so unmount it and re-mount to internal sd.

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 GS4 and GS2.
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

V1.14 (11/06/2014)
1. CT_MyBackup now performed in AlbumArtWipe, BloatWipe and MediaWipe
2. CT_MyRestore no longer performed in CT_KernelWipe
3. Obtaining build.prop details made more robust.
4. Include Googy-Max3 Kernel in CT_KernelWipe
5. Filesystems mounted by name, and not by specific device.

V1.13 (05/06/2014)
1. Allow for jflte and jfltexx product id recognition (for CM ROMS)
2. Find files speeded up in CT_AlbumArtWipe and CT_DelTemp core tasks.
3. CT_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)

V1.12 (06/05/2014)
1. com.android.providers.media no longer removed in CT_MediaWipe as this includes album art. This area will now get removed only in the CT_AlbumArtWipe core task.
2. New parameter in /sdcard/HawkerCore/Options/HawkerCore.prop PROCESS_KEEP_FILES. Default 1. When set, this will process the files/folders you have configured into /sdcard/HawkerCore/Options/MyKeepFiles.txt within the KernelWipe, ROMNuke and ROMReset/SDClean 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 CT_KernelWipe
4. CT_KernelWipe now wipes /data/log/*
5. Added MyRestore preset zip
6. Added CT_MyRestore core task

V1.11 (11/04/2014)
1. Removed beta tag from build
2. Identified more areas to wipe in the CT_AlbumArtWipe operation
3. Core was not calling CT_MyBackup as a direct passed parameter
4. CT_MyBackup called in KernelWipe, ROMNuke and ROMReset/SDClean in case any files that are wiped in these operations are included in the user's list of files to keep (/sdcard/HawkerCore/Options/MyKeepFiles.txt)
5. Wipe of .android_secure no longer performed in SDClean

V1 Beta10 (25/03/2014)
1. Added CT_AlbumArtWipe core task
2. Added MyBackup preset zip
3. Added CT_MyBackup core task
4. CT_KernelWipe remove KTmonitor files
5. CT_KernelWipe Added Alucard Kernel
6. Added support for SGH-I337
7. Display tweaks

V1 Beta9 (06/03/2014)
1. CT_MediaWipe not removing internal/external sdcard areas
2. Display tweaks
3. More information output to log file

V1 Beta8 (05/03/2014)
1. Core was not installing correctly on the very first installation

V1 Beta7 (14/02/2014)
1. SGH-M919 now supported

V1 Beta6 (14/01/2014)
1. Display tweaks
2. Not restoring HawkerCore folder and files defined in MyKeepFiles after a full wipe
3. Identified more files to wipe in the CT_KernelWipe operation for KT and Ausdim kernels.
4. GT-I9505G now supported.

V1 Beta5 (21/11/2013)
1. Display tweaks
2. Added .mmsyscache to the Android Data Wipe Folders
3. CT_KernelWipe Added Abyss Kernel
4. CT_KernelWipe Added KT Kernel
5. Device names for /system, /data, /cache and /efs are now detected

V1 Beta4 (12/11/2013)
1. Added the CT_BloatWipe core function

V1 Beta3 (08/11/2013)
1. Take all wipe operations out of individual .zip updater-scripts and into the Core.
2. User-defined jobs in /sdcard/HawkerCore/Jobs/[Job-Name]
3. Display tweaks

V1 Beta2 (05/11/2013)
1. Properties file (/sdcard/HawkerCore/Options/HawkerCore.prop) was being recreated on each run

V1 Beta1 (03/11/2013)
First release

The Following 22 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:00 PM |#3  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
CacheWipe (Latest .zip 20/07/2014)

This zip fixes permissions in /system/framework and /system/app. then wipes Dalvik-cache and /cache.

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/CacheWipe
5. Reboot


CacheWipe Run Steps
1. CT_FixPerm
2. CT_DalvikWipe
3. CT_CacheWipe
The Following 17 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:00 PM |#4  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
DelTemp (Latest .zip 20/07/2014)

This will remove the following known temporary and corrupt files and folders.

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/DelTemp
5. Reboot

DelTemp Run Steps
1. CT_DelTemp
2. CT_DalvikWipe
3. CT_CacheWipe
The Following 16 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:00 PM |#5  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
EFSBackup (Latest .zip 20/07/2014)
EFSRestore (Latest .zip 20/07/2014)

These zips backup/restore all partitions relating to your device's EFS.
Thank you to AntaresOne for finding out some extra EFS-related partitions.

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/EFSBackup or EFSRestore
5. Reboot


For more details, click on the respective core task below.

EFSBackup Run Steps
1. CT_EFSBackup


EFSRestore Run Steps
1. CT_EFSRestore


Credits:
Thank you to AntaresOne for finding out some extra EFS-related partitions.
The Following 15 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:01 PM |#6  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
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
The Following 19 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:01 PM |#7  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
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
The Following 16 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:02 PM |#8  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
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.
The Following 10 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:02 PM |#9  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
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.
The Following 6 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 12:02 PM |#10  
hawkerpaul's Avatar
OP Senior Member
Flag UK
Thanks Meter: 6,334
 
Donate to Me
More
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
The Following 5 Users Say Thank You to hawkerpaul For This Useful Post: [ View ] Gift hawkerpaul Ad-Free
14th August 2013, 06:01 PM |#11  
MVKA's Avatar
Senior Member
Flag Rock City
Thanks Meter: 887
 
More
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
The Following User Says Thank You to MVKA For This Useful Post: [ View ] Gift MVKA Ad-Free
Thread Closed Subscribe to Thread

Tags
hawker's threads
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes