BACKUP everything. (Important)
Turn ON USB Debugging mode and Unknown sources.
First ROOT your phone.
Open Playstore and Update SuperSU. Open SuperSU and it will give a message to disable KNOX. Click YES/Ok.
Then install Titanium backup root from Playstore. Open it, go to backup/restore tab.
5.Knox Notification Manager
Go to each one of it and Uninstall them.
Next restart your phone.
*VERY IMPORTANT* Now Backup your efs folder by using EFS Professional on you computer. OR any other efs backup App on phone and copy efs backup files to an External sdcard or pc.
(Link: http://d-h.st/Gfo ). Because your imei number will be changed after downgrading. You can easily restore it later.
Now install Mobile Odin Pro from Playstore on your phone. Here is the link.
*IMPORTANT* DO NOT flash firmware for downgrading with Computer Odin as it will NOT work and it will FAIL. *ONLY Mobile Odin Pro from Playstore will work.
Copy your 4.1.2 firmware to your phone. Next Open Mobile Odin Pro on your phone and let it download some necessary files from internet.
When done, click on Open file and select the firmware. After loading the firmware scroll down and UNCHECK EverRoot (because it cause problems). Then click on FLASH Firmware.
*IMPORTANT* If your phone get stuck on samsung logo. Go into recovery mode by pressing Home+Power+Volume UP keys together for 15 seconds. Click Factory wipe/data and then Wipe Cache. Then Reboot.
Now check your imei by *#06#. If imei is changed then restore it from the backup. EFS Professional.