Here i will show you how to flash stock rom on samsung android phone using Odin.
Step 1 : Download your samsung usb drivers from here
Step 2 : Download your phone’s Stock tar.md5 file and unzip it. it will looks like
Step 3 : Enable usb debugging on your phone by
Settings>Developer options >Usb Debugging > Tick
If it is not available , you can make it available by pressing Built Number 5 times
Settings>About Phone > Built Number
Step 4 : Power Off your Device
Step 5 : Now boot into download mode by holding power + vol down + home key. when phone vibrates remove hand from power key.. keep on holding vol down and home till download mode appears.
Step 6 : Now press Vol Up button
Step 7 : Download and extract Odin from here . You will see the following files.
Run Odin 3 v 3.07. and connect the phone using usb
Step 8 : Odin will detect you phone and you will get a similar window
Step 9 : Now Click PDA and select the tar.md5 file that we downloaded first
Step 10 : Now Click Start
Step 11 : Wait untill you get a PASS. Unplug the phone and restart it.
Step 12 : Your phone will now stuck in boot loop. You need to clear the data. For that power off. Hold vol up+power+home buttons… release power button after vibration and release other buttons after you boot into recovery mode.
Step 13 : On recovery Wipe/Factory Reset… On finish Reboot System Now
Step 14 : Now your phone will boot normally. Please wait for the first time boot. It will take time.
Best Of Luck !!!