Steps on how to flash Sony Xperia 5 with A Flash Tool:
Step 1: Make sure that the device have at least 50% battery power.
Step 2: Now you need to download and install the Flash tools here.
Step 3: Now you need to install the Sony drivers, it will be located in the flash tool folder (C:/FlashTool/Drivers) that’s the location of the drivers.
Step 4: Now run the Flashtoo-drivers.exe file and select only fastboot drivers and flashmode drivers (they are the last two options).
Step 5: Now download the ROM you need here.
Step 6: Make sure that you download the exact ROM of the device.
Step 7: After that extract the ROM to get the .ftf file (which is the flash file)
Step 8: Now move the flash file (the .ftf file) to C:/Flashtools/Firmware folder.
Step 9: If you are using the latest version of Flash tools you need to put the firmware inside “C:\Users\YourUsername\.flashTool” folder.
Step 10: Open the FlashTools and click the flash image at the top left, and now select “Flashmode” and then click ok.
Step 11: Now on the next window, select the ROM you want to flash and click “Ok”. Now Flashtools will prepare the files for flashing (this might take a long time or a while).
Step 12: Now a pop up will appear telling you to turn off the device.
Step 13: You need to turn off the device and now press and hold “back button” and connect it to PC, so that the Flashtools will detect the phone in flashmode (if using any new sony smart phone, just make sure the phone is on flash mode.
Step 14: if you are using a new device or any of the latest smartphone, you need to press and hold Volume down button.
Step 15: The flashing process will begin and a progress bar will be seen at the bottom.
Step 16: Now you need to wait for the process to finish, and this might take a while depending on the size of the ROM.
Step 17: After the process is done, remove the USB and reboot the device, and the first boot may take longer time.