1. | We start by downloading the tool from it's official website located here:
You now want to install it with the downloaded installer and also install the required drivers if you don't have them(located in C:/Flashtool/Drivers).
2.| After the install we open the flash tool and click on the xperifirm button to download the firmware for our selected model.
3.| We download the firmware that rmatches our model and download it.
4.| You should now close xperifirm and click yes when it asks you to add a flash script and if you want to add the firmware to the bundle.
5.| We connect our device in flash mode by holding down the volume - and plugging the cable to pc and phone.
6. | In The flashtool, we click on the flash button, select flashmode, select your phone and model and firmware you download and configure the options on the right. After click flash and wait till the procedure completes.
Here is a video if you prefer that form of a guide:
https://www.youtube.com/watch?v=4T6DkdpAdH4 (Let me know if this isn't ok with xda policies)