If you're looking for the official open-source alternatives for newer devices, check out the Sony Open Devices project Happy Flashing! If you'd like, I can help you refine the tone
Whether you are resurrecting a bricked Xperia Z3, debranding an old Xperia Z Ultra, or simply reliving the glory days of 2014 Android customization, Flashtool 0.9.18.6 will never let you down. Sony Flashtool 0.9.18.6
Install official stock ROMs (.FTF format) to upgrade, downgrade, or unbrick your device. If you're looking for the official open-source alternatives
Configure udev rules so Flashtool can recognize your Sony device. Create a file named 51-sony.rules with the following content: debranding an old Xperia Z Ultra
Now that Flashtool is installed, here is the complete process for flashing an .FTF firmware file onto your Xperia device.