Nowadays while testing root and so many things sometimes we may face an issue called as "brick" now whats brick it's absolutely nothing then a paper wet. Well on this thread I am going to help you out to get out of this.
Well before you proceed there's something you will need to keep in your mind that is this process is fully based on the official way so unlocked bootloader devices are not allowed. Also, data will be wiped please make sure to backup data from above tool.
1. Install all the things from the download section.
2. Open Xperia Companion and run software repair
3. Select Xperia Device from list
4. Then choose the option my device cannot be connected or started
5. It will download Sony Mobile Update Engine (90mb)
6. Once displayed on screen follow the instructions to connect device.
Now here it is tricky some devices won't get connected on-screen instructions try installing adb drivers search on google how to install ADB drivers. Try holding the power key and volume down simantenously hit the reset switch. Try 15-20 times it will give the error failed... Because device keeps disconnecting