[Samsung Epic 4G Touch] tdunham:
Morph Utility with Jellybean Support

(Please note: The Mount Points in the installer script are for the E4GT and may not work with all phones)

- Modified to work with Preload partition

- As of v1.2 now creates Symlinks when flashing to Preload.

- Please backup your rom before using. I will not take responsibility for any data loss.

- Sets permissions for you.

Lots of documented information on how this utility works:

http://xdaforums.com/showthread.php?t=1474686

Brief Guide

In a nutshell, this is a a flashable zip that has other uses.

TIP: APK files can be opened with Winrar and manipulated and treated the same way as a zip file. Just be careful not to modify the folder structure. The first time you open an APK file, it may ask you what to open it 'with'. Just choose Winrar as the default program to open that filetype and it will always use it in the future.

This is how it works. This is very simplified as there are many many applications for using this.

There are two folders within the zip that we work in, XTRAS and MORPH. Do not edit any other folders or files unless you know what they are for!

XTRAS = entire apk or JAR file

MORPH = only components of apk or JAR file but is a little more complicated to implement

MORPH use:

Example: We want to replace alarm_icon.png in SystemUI.apk file.

(This is just for example, I know this file probably doesn't really exist)

In the Morph folder we create folders to the path of the file (filename is case sensitive and must be the entire filename):

MORPH/system/app/SystemUI.apk/res/drawable-hdpi

Once the folders are created, we drop the new alarm_icon.png in there and it will 'Morph' (or insert) the file into SystemUI.apk without having remove the apk, add the file and push the entire apk back to the phone.

EXTRAS use:

Example: We want to install or replace widget.apk.

Add file to folder where it is going to go like above example but this time we are using entire apk.

XTRAS/system/app

We just drop the widget.apk file in there and then flash it.

A good example of using XTRAS is for the novice to reinstall missing files that were removed from a rom by a developer by putting the file in a flashable zip so they don't have to use a root explorer app and set permissions.

How to edit Morph.template.zip:

Editing the Morph.template.zip needs to be done without extracting the zip file. Open file with WinRar or other zip utility to manipulate the folders and add files. Think of it as browsing a file folder on your computer. You can create folders, delete files, copy files etc. :cool:

The Basics:

Flash full apk/jar files:

- Files get placed in XTRAS folder.

Example: SystemUI.apk - flashing entire apk

XTRAS/system/app/SystemUI.apk

Morph existing files without flashing entire apk:

- Files get placed in MORPH folder.

Example: SystemUI.apk - replacing a png file

MORPH/system/app/SystemUI.apk/res/drawable-hdpi/quickpanel.9.png

Note: Use full filename (SystemUI.apk) with extension, then folders as in example. Many filenames are case sensitive.

Restore Backup to Revert Changes:

- Files get placed in SD/UniversalFlasher folder.

- Useful if you need to revert changes/go back to previous state.

This may not work for all filetypes and filepaths. Developers, please make sure permissions are getting set for everything that you flash. If I missed something, please let me know.

As always - enjoy. TD

[B][SIZE="3"]Morph Template v1.2 Changes[/SIZE][/B]
Now supports Preload symlinks! If files are flashed to the preload the script will create a new matching symlink.

[B][SIZE="3"]Morph Template v1.1 Changes[/SIZE][/B]
Backup enabled as default and now supports preload partition.
- Backups and logs are stored in SD/UniversalFlasher folder.
- Known issue, timestamp is offset in filename. Not sure why default timestamp isn't true time in recovery.
Updated binaries and installer scripts for both main morph and backup/restore.
Mod Version enabled
- [COLOR="Red"]Use sparingly[/COLOR]. It is useful to add tagline after build info for things like tweak versions etc.
- See mod.config file in zip to make changes to morph options:
[CODE]###############################################################
MOD_VERSION=[COLOR="Blue"]Morphed_by_TD[/COLOR]
###############################################################

[/CODE]

Credits: JRsoft & Intronauta/Villainsoft for the original Villain Morphing utility & PhAkEer for his help with Symlink Scripts.