ThisCalculator

Everyday

Sony Xperia XZ Pattern Lock Forgotten: Fixes

Updated · Standard formula, shown below

If you’ve forgotten your Sony Xperia XZ pattern lock, the solution is to use Google’s “Forgot pattern” option after five failed attempts, or perform a factory reset via the hardware keys if that fails. This article walks through both methods, what to do if they don’t work, and how to avoid losing your data.

Background: Why Pattern Locks Get Forgotten

Pattern locks on Android devices are a quick, visual way to secure your phone, but they’re easy to forget. Unlike a PIN or password, a pattern is a sequence of dots you trace with your finger—muscle memory can fail, especially if you haven’t used the phone in a while or you recently changed the pattern. Sony Xperia XZ models run Android 6.0 (Marshmallow) and later, and the lock screen behavior is standard Android, so the same recovery options apply across most versions.

Method 1: Use Google’s “Forgot Pattern”

The first official solution is built into Android. After five incorrect pattern attempts, the screen will display a “Forgot pattern?” option. Tap it, then enter the Google account credentials (email and password) that are synced to the phone. If you remember those, you can set a new pattern immediately.

This method only works if:

  • The phone is connected to the internet (Wi‑Fi or mobile data).
  • You know the Google account password associated with the device.
  • The phone hasn’t been factory reset or set up without a Google account.

If you’ve used two-factor authentication or the account password has changed, this may not work—but it’s the fastest route when it does.

Method 2: Factory Reset via Hardware Keys

When the Google option isn’t available, a factory reset is the fallback. This erases all data on the phone, returning it to its out-of-box state. On the Xperia XZ, the key combination is:

  1. Power off the phone completely.
  2. Press and hold the Volume Up button and the Power button simultaneously.
  3. When the phone vibrates, release only the Power button but keep holding Volume Up until the recovery menu appears.
  4. Use the Volume keys to navigate to “Wipe data/factory reset” and select it with the Power button.
  5. Confirm the reset, then choose “Reboot system now.”

After the reset, the phone will boot to the initial setup screen. You’ll need to sign in with the Google account that was previously on the device to bypass Factory Reset Protection (FRP). If you can’t provide that account, the phone will be locked to that account—so this method isn’t a bypass for theft.

Data Recovery Before a Reset

If you haven’t backed up recently, a factory reset will wipe everything: photos, contacts, messages, and app data. Before you reset, check if you’ve enabled Sony’s backup or Google’s automatic backup. On the Xperia XZ, you can also try connecting the phone to a computer via USB—if USB debugging was enabled, you might be able to use ADB commands to pull files, but this is technical and not guaranteed.

In most cases, if the phone is locked, you can’t access the file system without unlocking it. The only reliable protection is regular cloud backup. After the reset, you can restore from the backup during setup.

Common Problems and Misconceptions

Many people assume that a hard reset will bypass the Google account lock, but on modern Android (5.1 and later), Factory Reset Protection (FRP) prevents the phone from being used unless the previous Google account is entered. This is a security feature, not a bug. If you bought a used Xperia XZ and the seller didn’t remove their account, you’ll need to contact them for the credentials.

Another misconception is that the “Forgot pattern” option appears after a specific number of attempts—it’s always five. Also, if you’ve set up a fingerprint or Smart Lock, those may unlock the phone without the pattern, but they don’t help if the phone has been rebooted (Android requires the pattern once after a restart).

Alternatives to a Factory Reset

If you have critical data and the Google method fails, consider these options before wiping:

  • Try your PIN or password—if you set up multiple lock types, the pattern might not be the only one.
  • Use Android Device Manager (Find My Device)—if the phone is online, you can remotely lock it or erase it, but erasing still requires the Google account.
  • Contact Sony support—they may have additional tools, but they’ll likely require proof of purchase and still recommend a reset.

None of these can recover data from a locked phone without the pattern, so weigh the importance of the data against the time spent.

Preventing This in the Future

After you regain access, set up a more memorable lock or enable backup:

  • Use a PIN instead of a pattern—it’s easier to recall.
  • Enable Smart Lock (trusted places/devices) to avoid constant unlocking.
  • Turn on Google backup in Settings > Backup & reset.
  • Write down your pattern in a secure place, like a password manager.

These steps won’t prevent forgetting, but they make recovery less painful.

Frequently Asked Questions

Will a factory reset remove the pattern lock?

Yes, it removes the pattern, but it also erases all data. After the reset, you’ll need to enter the Google account that was previously on the phone to get past the FRP screen. If you don’t have that, the phone is unusable.

How many attempts before the “Forgot pattern” appears?

It appears after five failed attempts. After that, you have a limited number of additional tries before the phone forces a 30-second wait (or longer) between attempts.

Can I unlock my Xperia XZ without losing data?

Only if you can use the Google account method or if you have a backup. There’s no official way to bypass the pattern without a reset if the Google method fails. Some third-party tools claim to do it, but they’re unreliable and often require USB debugging to be enabled beforehand.

What if I never set up a Google account on the phone?

Then the “Forgot pattern” option won’t work. You’ll have to do a factory reset, and since there’s no Google account, FRP won’t be an obstacle—but you’ll lose all data.

Does Sony have a specific unlock code for Xperia devices?

No. Sony does not provide unlock codes for forgotten patterns. The only official methods are the ones described above. Third-party services might claim to have codes, but they’re not endorsed and often don’t work.

Can I use my fingerprint to unlock after a reboot?

No. Android requires the pattern, PIN, or password after a reboot to ensure security. Fingerprint or face unlock only works after the first unlock of the session.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.