[Galaxy S 4 Q&A, Help & Troubleshooting] XxLordxX:
Hi,

To flash a custom ROM you need to have a custom recovery, and installing a custom recovery means to void KNOX. If you don't mind it, then I'll recommend you searching for a compatible recovery with your device and then just flash it using Odin, the recovery thread may have very clear instructions! I'm seeing that your model is SGH-l337, so you'll have to find it here:

http://xdaforums.com/galaxy-s4-att

I'm not sure if you'll find good working recovery and such, hope you can ^^.

Hi,

No, if you see in the dual boot thread there's a guide on how to manually patch (it involves changing META-INF, patching some stuff via terminal, etc), here's it:

(My patches for the supported zips above can be found [here] if you'd like to see examples of how this is done)

Note: This has not been updated for version 3.0.0 of the patcher yet. The instructions below will still work, but auto-patching is a lot simpler.

The first thing to do is to download the dual boot helper script and place it at the base of the zip file (not in a subfolder): https://github.com/chenxiaolong/DualBootPatcher/raw/master/patches/dualboot.sh

Next edit the updater-script file: META-INF/com/google/android/updater-script and put the following lines at the top. This allows the helper script to be used.

package_extract_file("dualboot.sh", "/tmp/dualboot.sh");
set_perm(0, 0, 0777, "/tmp/dualboot.sh");

Now, in order to make the zip file install to the correct location, you'll need to change all the lines that mount /system so that they use the dual-boot location. The helper script offers a convenient way to do this.

If see lines like one of the below:

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
OR
mount("ext4", "EMMC", "/dev/mmcblk0p16", "/system");
OR
run_program("/sbin/busybox", "mount", "/system");

replace it with:

run_program("/tmp/dualboot.sh", "mount-system");

If you see any lines that format the /system partition, such as:

format("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "0", "/system");

replace it with:

run_program("/tmp/dualboot.sh", "format-system");

Finally, the unmount lines:

unmount("/system");
OR
run_program("/sbin/busybox", "umount", "/system");

should be replaced with:

run_program("/tmp/dualboot.sh", "set-multi-kernel");
run_program("/tmp/dualboot.sh", "unmount-system");

Now, if zip contains a kernel, you'll need to modify it's ramdisk. The easiest way to do this is to drag the boot.img onto useful/patch-ramdisk.bat if you're on Windows or:

./useful/patch-ramdisk.sh /path/to/boot.img

if you're on Linux or OS X.

You will see something like this. Just choose the ROM/Kernel type (AOSP, Google Edition, or TouchWiz) and press Enter.

That's it! If it seems like a lot of work, you'll get the hang of it soon. The idea is to change the mount, format, and unmount operations so that they don't affect the primary ROM. Then the ramdisk is modified so that the needed files are loaded from the new locations.

Thread: http://xdaforums.com/showthread.php?t=2447534

Hi,

As far as it seems the root is causing the problems, I'll recommend you installing a custom ROM, you have already tripped your KNOX and you can find excellent TouchWiz based ROMs over there, I believe it's a possible solution for you. I believe something in the updated TW system is causing incompatibility with your root, with custom ROM it's very unlikely to happen ;).

~Lord

"Time is too short to cry, long enough to try." - March of Time (Helloween)

Sent from my KitKat Nexus 10