[SuperR Kitchen] edzamber:
You need to flash your Rom first, then flash MM Bootloader. Or add directly MM Bootloader into your Rom zip and flash it at same time.

For S6 its something like that :

ifelse(is_mounted("/system") == "/system", unmount("/system"));

ifelse(is_mounted("/cache") == "/cache", unmount("/cache"));

ifelse(is_mounted("/data") == "/data", unmount("/data"));

format("ext4", "EMMC", "/dev/block/platform/15570000.ufs/by-name/SYSTEM", "0", "/system");

run_program("/sbin/sleep", "2");

format("ext4", "EMMC", "/dev/block/platform/15570000.ufs/by-name/CACHE", "0", "/cache");

run_program("/sbin/sleep", "2");

ui_print("Montage de la partition System");

run_program("/sbin/mount", "/dev/block/platform/15570000.ufs/by-name/SYSTEM", "/system");

ui_print("Montage de la partition Data");

run_program("/sbin/mount", "-t", "auto", "/data");

ui_print("Montage de la partition cache");

run_program("/sbin/mount", "/dev/block/platform/15570000.ufs/by-name/CACHE", "/cache");

ui_print("Flash du system");

delete_recursive("/system");

delete_recursive("/cache");

package_extract_dir("system", "/dev/block/platform/15570000.ufs/by-name/SYSTEM");

package_extract_dir("data", "/data");

ui_print("Extraction du kernel");

run_program("/sbin/mount", "/dev/block/platform/15570000.ufs/by-name/BOOT", "/boot");

package_extract_file("boot.img", "/dev/block/platform/15570000.ufs/by-name/BOOT");

ui_print("Extraction Bootloader");

run_program("/sbin/mount", "/dev/block/platform/15570000.ufs/by-name/BOTA0", "/bota0");

package_extract_file("sboot.bin", "/dev/block/platform/dw_mmc.0/by-name/BOTA0");

ui_print("Suppression Knox");

delete_recursive("/system/app/Bridge");

delete_recursive("/system/app/ContainerAgent");

delete_recursive("/system/app/ContainerEventsRelayManager");

delete_recursive("/system/app/KNOXAgent");

delete_recursive("/system/app/KnoxAttestationAgent");

delete_recursive("/system/app/KnoxMigrationAgent");

delete_recursive("/system/app/KnoxSetupWizardClient");

delete_recursive("/system/app/KnoxSetupWizardStub");

delete_recursive("/system/app/KNOXStore");

delete_recursive("/system/app/KNOXStub");

delete_recursive("/system/app/RCPComponents");

delete_recursive("/system/app/UniversalMDMClient");

delete_recursive("/system/priv-app/Bridge");

delete_recursive("/system/priv-app/ContainerAgent");

delete_recursive("/system/priv-app/ContainerEventsRelayManager");

delete_recursive("/system/priv-app/KLMSAgent");

delete_recursive("/system/priv-app/KnoxAttestationAgent");

delete_recursive("/system/priv-app/KnoxMigrationAgent");

delete_recursive("/system/priv-app/KnoxSetupWizardClient");

delete_recursive("/system/priv-app/KnoxSetupWizardStub");

delete_recursive("/system/priv-app/KNOXStore");

delete_recursive("/system/priv-app/KNOXStub");

delete_recursive("/system/priv-app/RCPComponents");

delete_recursive("/system/priv-app/UniversalMDMClient");

delete("/system/lib/libknoxdrawglfunction.so");

delete("/system/tima_measurement_info");

delete_recursive("/system/container");

delete_recursive("/system/containers");

delete_recursive("/system/etc/secure_storage/com.sec.knox.store");

delete_recursive("/system/preloadedkiosk");

delete_recursive("/system/preloadedsso");

delete_recursive("/data/data/com.sec.knox.seandroid");

delete_recursive("/data/data/com.sec.knox.store");

delete_recursive("/data/data/com.sec.knox.containeragent");

delete_recursive("/data/data/com.sec.enterprise.knox.attestation");

delete_recursive("/data/data/com.sec.knox.app.container");

delete_recursive("/data/data/com.sec.knox.eventsmanager");

delete_recursive("/data/data/com.samsung.knox.rcp.components");

delete_recursive("/data/data/com.sec.enterprise.knox.cloudmdm.smdms");

delete_recursive("/data/data/com.sec.knox.bridge");

delete_recursive("/data/data/com.sec.knox.knoxsetupwizardclient");

delete_recursive("/data/data/com.sec.knox.setupwizardstub");

delete_recursive("/data/data/com.samsung.klmsagent");

delete_recursive("/data/data/com.samsung.android.walletmanager");

delete_recursive("/data/system/knoxvpn");

delete_recursive("/data/clipboard/knox");

run_program("/sbin/sh", "-c", "rm -fR /system/app/Bridge");

run_program("/sbin/sh", "-c", "rm -fR /system/app/BBCAgent");

run_program("/sbin/sh", "-c", "rm -fR /system/container");

run_program("/sbin/sh", "-c", "rm -fR /system/app/ELMAgent");

run_program("/sbin/sh", "-c", "rm -fR /system/app/KnoxAttestationAgent");

run_program("/sbin/sh", "-c", "rm -fR /system/app/KnoxFolderContainer");

run_program("/sbin/sh", "-c", "rm -fR /system/app/KnoxSetupWizardClient");

run_program("/sbin/sh", "-c", "rm -fR /system/app/MyKNOXSetupWizard");

run_program("/sbin/sh", "-c", "rm -fR /system/app/SwitchKnoxI");

run_program("/sbin/sh", "-c", "rm -fR /system/app/SwitchKnoxII");

run_program("/sbin/sh", "-c", "rm -fR /system/app/RCPComponents");

run_program("/sbin/sh", "-c", "rm -fR /system/app/SecurityLogAgent");

run_program("/sbin/sh", "-c", "rm -fR /system/app/SPDClient");

run_program("/sbin/sh", "-c", "rm -fR /system/app/TuiService");

run_program("/sbin/sh", "-c", "rm -fR /system/app/UniversalMDMClient");

run_program("/sbin/sh", "-c", "rm -fR /system/priv-app/KLMSAgent");

run_program("/sbin/sh", "-c", "rm -fR /system/priv-app/SPDClient");

run_program("/sbin/sh", "-c", "rm -fR /system/etc/secure_storage/com.sec.knox.seandroid");

run_program("/sbin/sh", "-c", "rm -fR /system/etc/secure_storage/com.samsung.android.securitylogagent");

run_program("/sbin/sh", "-c", "rm -fR /data/knox");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.seandroid");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.store");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.containeragent");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.enterprise.knox.attestation");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.app.container");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.eventsmanager");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.samsung.knox.rcp.components");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.enterprise.knox.cloudmdm.smdms");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.bridge");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.knoxsetupwizardclient");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.sec.knox.setupwizardstub");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.samsung.klmsagent");

run_program("/sbin/sh", "-c", "rm -fR /data/data/com.samsung.android.walletmanager");

run_program("/sbin/sh", "-c", "rm -fR /data/clipboard/knox");

run_program("/sbin/sh", "-c", "rm -fR /data/system/knoxvpn");

run_program("/sbin/sh", "-c", "rm -fR /system/bin/containersetup");

run_program("/sbin/sh", "-c", "rm -fR /system/app/DiagMonAgent");

set_progress(0.40);

ui_print("");

ui_print("Installation Complete !! ");

unmount("/system");

unmount("/cache");

unmount("/data");