I have a Sony Xperia Z2 upgraded to Lollipop 5.0 and I forgot my pattern lock. There is no "forgot password" or anything. How can I remove the code or fix it? If there is no solution to my problem, then how do I factory reset the phone.
Once you solve that, I recommend you install an app like Cerberus and add it as administrator. Yesterday I forgot my phone at home, but was able to send it a command to unlock the phone and other things. When I got home, my phone still was unlocked.