[Galaxy S 4 General] MidnightHarvester:
Always keep the original archive and odex file on your SD card somewhere until you're sure the deodexed apk/jar is working. If the device doesn't boot, boot into TWRP and mount system, then open the file manager tool and copy the apk/jar and odex back over.

Sometimes it's trial and error. For example, LGSystemUI only works if I flash the deodexed apk in recovery. If I try to copy it over using a file manager it borks my system (same happened with my OG Droid yet on my Galaxy Nexus I could just copy SystemUI over using Root Explorer. It could be associated with whatever ROM your using.

I have a batch deodexing script that goes along with apktool that I posted here if you're interested. You just place the odex and apk/jar into a /files-to-deodex folder and then run the batch-deodex script from a terminal emulator.

You need apktool installed and be rooted though for this to work. Right now it's really rudimentary but I'm working on the next version which packages the JRE and smali and baksmali jars and completely self contained. Since it doesn't rely on the JRE in the apktool app's data directory you'll be able to run it without root.

I'll have that version released in a day or two (I'm busy today so won't be able to work on it much) but in the meantime the original scripts are up. I don't have a link arm but searching for "batch deodex jobs using Apktool mobile" should bring up the project page.

Deodexing is the easy part though. Deodexing and getting the apks/jars working is a different matter depending on the ROM you're on.

Side story: I was working on the next release of the batch deodexing tools and almost was left with no phone to use.

I was cleaning up the script by modifying the paths when the problem occurred. In the scripts after the deodex batch is done it cleans up all files left in the working directories except for the deodex archives. Well after changing the paths I just have left off a "/" somewhere because when I was testing a batch deodex it ended up completely wiping everything in /storage/emulated/0/ (my sdcard). Lol

I was left with an unbootable system and no TWRP or other backups since my /sdcard was wiped. It wouldn't boot back up because I removed the LG set up apk from my phone since I never anticipated this happening. Thus on boot, I would get a message saying that setup could not be found and left at a black screen.

Eventually I realized I could put the notification bar down. I couldn't get into settings normally but was able to bring pressing any of the quick toggles. After playing around in settings I was starting to think I was going to have to find a computer somewhere. All my apps were still installed, I just couldn't get to a home screen to launch anything.

Eventually I got to playing around with Search settings and realized I could open Google Now by turning it on. Ah! Now I was able to open Chrome Beta by saying "Open Chrome Beta" and re-download the ROM and LG and Google Apps. I ended up fixing /system and just wiping data since I already accidently wiped /sdcard. Spent the whole day setting my phone back up.

Needless to say I didn't publish those updates to the project page. I can imagine the hate I would have gotten if I did hahaha.