For those of you who need to fix “firmware encountered” error or you simply want to re-install stock firmware on your Galaxy S5, you can easily do so using ODIN and stock firmware tar.md5 file.
This will get your Galaxy S5 completely back to 100% stock and unrooted. This can also be very useful if you are returning your Galaxy S5 to the store for warranty purposes or you want to unroot your phone completely.
Before we begin, please MAKE A BACKUP of everything on your Galaxy S5 by copying your personal files to your hard disk (or microSD). You can even make a backup copy of your backup ROM if you intend to restore your ROM on another phone.
Step 1. Power off your Galaxy S5 then hold down Volume Down, Center Home, and Power buttons together for about 3-5 seconds until you see a warning screen.
Step 2. Hit Volume Up key next to put your Galaxy S5 into ODIN MODE.
Step 3. Connect a micro-USB 2.0 cable from your Galaxy S5 to your computer.
Step 4. Go to this page and download the stock firmware for your Galaxy S5.
Step 5. Unzip the stock firmware you have downloaded, you should get a file ending in tar.md5.