How to unlock Sony Xperia M,when I forget my PIN or password and screen pattern lock
After five attempts to enter the PIN, password or pattern lock you set on your Sony Xperia M, your device may require you to enter your Gmail address and Gmail account password to unlock your Sony Xperia M (if you have previously associated your device with a Gmail account).
If you have multiple Gmail accounts you must use the email address and password for the account linked to your Sony Xperia M: the details for any of your other Gmail accounts will not work.
If you have forgotten your Gmail address or Gmail account password please visit Gmail.com to go about getting a reminder of your Gmail address and a new password to use.
If you are unable to regain access to your Google account, or your device, then the Sony Xperia M will need a software reset from an engineer to bypass the screen lock.