Install the "Flashmode" drivers. The most reliable way is to install the Sony Xperia Companion.
It can fix soft-brick issues, boot loops, and "hang on logo" errors by reinstalling a clean stock ROM. download newflasher v20
Extract the Newflasher tool files into that same firmware directory. Install the "Flashmode" drivers
Newflasher serves several critical purposes for Xperia enthusiasts: download newflasher v20