How to do a factory reset on Xperia Z with broken screen? The screen on my Sony Xperia Z is cracked. I have now sold the phone so I need to delete my text messages, can anyone help?

I can only press in certain areas of the screen so I can't click on factory reset or delete messages one by one.
The simple way to factory reset for unrooted phone is to perform a factory reset via pc companion.


Download PC COMPANION and install
Open up PC companion and click on Software Repair
Optional: If your screen is locked and you can't unlock it, check the "I can't start my device"-checkbox in the lower left corner. Click "Next".
It will say could not find phone because you haven't connect it yet! so, do connect it and click on the repair phone like this picture. Follow onscreen instruction.