[Samsung Galaxy S7 Edge Guides, News, & Discussion] xIceCream:
This guide is similar to what is described in this thread, so credit for him on the guide.

If you've tried countless numbers of times to make secure folder work, but keep on getting "Failed to create Knox mode", this guide is for you.

This guide MAY work for others who wish to use different ROM, similar processs, different rom. That is all, please feel free to try and let me know

What I've found out (Regardless if it is true or not):

There are people saying security patch dated June 2017 from Samsung patched the Secure folder stuff

If your secure folder never worked before (after rooting your phone and flash new ROM), or at some point, secure folder stopped working, you need to start from official FW all over again. Which is what this guide is for.

Notes:

Not responsible for any damage or bricked devices.

If the phone is bricked, you can always start from flashing official FW via Odin.

Requirements:

Make a backup of everything you need. In case things go wrong and bricked your phone.

Any Nougat official firmware released BEFORE June 2017

TWRP, Odin and Samsung Phone drivers from here

SuperSU by Chainfire from here

The very first version of Secure Folder (1.0.01-020) from here

Batman ROM, other related fix and join the Telegram group of Batman listed inside here

Upon joining the telegram group, use the search function to search for Secure Folder fix. The file is less than 700kb.

A micro SD card.

Steps listed below are what I did and worked for me, and I hope they work for you too.

Put any flashable zips file to your SD card. Phone's internal storage will be wiped several times in the processes below.

Boot phone into download mode and flash official FW via Odin, put the files in the respective slot. AP to AP, BL to BL, CP to CP, CSC to CSC. I disregard the HOME_CSC file.

Reboot and setup. (Doesn't matter account setup etc, just skip everything and get to home screen)

Go to Settings > Enable developer options > Enable OEM unlocking inside developer options.

Power off phone, boot into download mode, flash twrp .tar file via Odin. (AP slot, untick Auto-Reboot)

After Odin shows pass/success. Unplug USB, hold [Volume Down] + [Home] + [Power] to exit download mode, when the screen goes blank, with those 3 buttons held down, immediately switch from holding Vol down to Vol up, to boot into Recovery mode, which in this case will boot into TWRP.

Any time you see a warning in TWRP about swipe to allow modification, swipe it.

Go to wipe > format data. Type yes to wipe data

Flash superSU, flash Super Stock kernel and reboot your phone.

(Not sure this step here is needed, but I did it anyway) Download My Knox, just open and exit after it is installed on your phone.

Install the Secure Folder apk downloaded. Clear Secure Folder's app data. And run it.

At this point, Secure Folder should work without any problem. If Secure Folder failed to install/set up. Please do let me know in the comments.

Boot into TWRP, flash Batman ROM.

In Aroma: Clean flash (wipe everything except SD card), tick Knox, latest modem and bootloader from ROM, and also both modded settings / UI.

Upon exiting Aroma, the phone will auto reboot itself because you ticked "update to latest bootloader" in Aroma, but not to worry. Just let it boot.

It'll take awhile to boot. After booting up, set up the phone nicely. Check for Secure Folder enabled in the setup process. It is enabled by default.

Clear Secure Folder's app data/cache.

Reboot to TWRP.

Flash the Secure Folder fix twice (I flashed it twice, don't ask me why), and other fix/mods (sticker fix etc) you want.

Reboot to system

Tap on Secure Folder, it should work now.

Do let me know in the comments how it worked out for you guys and report any missing links that I may not have listed here.

Secure folder fix will not be listed, you can find it in the telegram group.

I've not tested with any other kernel other than the Batstock that comes with Batman ROM.

Credits:

Respective owners of the files

People in the telegram for giving out suggestion and advice

The helpful guy in telegram group, Jonathan, for his time and patience for helping me out.