A Windows or Mac computer, a USB cable, and the Xperia Companion application. Step-by-Step: Install and open Xperia Companion on your PC. Select "Software Repair" on the main screen.
For devices that aren't connected to Wi-Fi or for users who have forgotten their Google credentials, Sony’s official PC software provides a feature. This will factory reset the phone and erase all internal data.
Open the application and select Software repair from the main menu.