1. Download Samsung galaxy usb driver
2. Download ODIN
3. Download firmware Galaxy S5 Lollipop for SM-G900F
for other models of samsung go to this website
4. Extract (unzip) the firmware file
5. Extract Odin ZIP file
6. Open Odin
7. Reboot Phone in Download Mode (press and hold Home + Power + Volume Down
Now that the device is in Download Mode, connect it to your computer using a USB cable. You will now see a blue light in ODIN, signifying that the phone is correctly connected.
8. Connect phone and wait until you get a blue sign in Odin
9. Add the firmware file to AP / PDA
10. Make sure re-partition is NOT ticked
11. Click the start button, sit back and wait few minutes let ODIN flash the Lollipop firmware to the phone.
Once the firmware is flashed, you should see a message on ODIN telling you that the process has completed. If your phone does not auto-reboot, go ahead and reboot it.