[ONE Themes and Apps] bloof:
I originally posted this on the G2 forum, now I am on OnePlus and I realized of course this is the same procedure with a few small differences in file locations, etc, so posting here too.

GUIDE: CREATING SMALL FLASHABLE ZIPs TO RESTORE FILES OR SETTINGS WITHOUT HAVING TO DO FULL NANDROID RESTORE

This will enable you to apply MODs without having to do a FULL NANDROID restore to recover if the MOD fails or if you don't like it

This brief guide will teach you how to create a flashable ZIP file that you can use to restore your phone to pre-MOD settings if you want to revert back or if the MOD simply does not work

WITHOUT having to do a full restore of your phone.​

It is a very good idea to create these backup flashable ZIPs and keep them safe to recover from mishaps or when creating/testing MODs/themes.​

*************************************************************************************************************************************************

As usual:

Disclaimer

: I am not responsible for any loss of data or functionality on your phone. To be 100% sure, always make a NANDROID backup if you are not 100% certain you can recover.

*************************************************************************************************************************************************​

There are many reasons you might want to do this, for example when testing a MOD for another ROM that is similar to yours but not exactly the same, or when upgrading your ROM to a new version and wanting to re-apply old MODs to test if they work.

There are many ways to get into boot loops or fail to boot, the biggest culprit being fonts installations, but include also bootanimations and others.

INSTRUCTIONS:

Part 1: general

1. Install ZIPme app from playstore

2. Find out which files are being modified by the MOD you are trying to apply, this is usually framework-res.apk, SystemUI.apk, but be aware that some MODs affect a lot of files. See part 2 for more details on how to do this.

3. If you are applying a font, don't worry, the FONTs section (see part 2) should cover all Fonts.

4. If you are applying a bootanimation, don't worry, the bootanimation section (see part 4) should cover all Bootanimations.

5. For every flashable ZIP you create you can test it straight away by booting into recovery and applying the zip file. There is no reason why it should not work.

Part 2: FONTS

1. In ZIPme select the following:

- ADD FOLDER: /system/fonts

- ADD FILE: /system/etc/system_fonts.xml

2. Create the flashable zip in an /sdcard location you can access from recovery

Part 3: MODs that affect framework-res.apk, LGSystemUI.apk or any other app

1. Find out which apks are being modified:

- You should of course read the OP (instructions for the MOD)

- The easiest way to find out modified apks is to download the MOD and open it: the zip file will contain either the apk files themselves or have directories with the names of the apks being modified.

- You can always ask the developer to make sure

2. Once you have a full list of files being affected you can create the flashable zip:

- in ZIPme, simply select "ADD -> File" for every file being affected

- If you have an ODEX ROM (.odex files are present) make sure you pick those too!

- save the flashable zip in an /sdcard location you can access from recovery

Part 4: Bootanimations

1. In ZIPme select the following:

- ADD FILE: /system/bin/bootnimation

- ADD FILE: /system/media/bootanimation.zip

2. Create the flashable zip in an /sdcard location you can access from recovery

Part 5: Other flashable files you should always keep handy

1. Always keep with you the following files for good measure: they don't take much space but can help recover from problems without having to fully restore from NANDROID backup

- original kernel from your ROM

- flashable bootloader (if you do not know what I am talking about then DON'T do it)

- flashable baseband (if you do not know what I am talking about then DON'T do it)

- flashable recovery image (TWRP, etc)

- "Xposed-Disabler-Recovery.zip": this is created by Xposed when you install it. It is located in the root folder of your sdcard. Copy it and put it somewhere safe.

- SuperSU: keep a flashable latest SuperSU with you to recover root

Any comments, suggestions, feedback are welcome :)