The situation when you forgot the pattern key, PIN code or password for your smartphone is one of the most stressful in the world of mobile technology. The main problem is that most standard instructions suggest performing a full reset (Hard Reset), which inevitably leads to the deletion of all photos, contacts and correspondence. However, modern versions Android and services from Google provide the user with several loopholes that allow you to regain access to the device.

In this article we will examine in detail legal and safe methods of bypassing the screen lock. We will not consider hacking utilities that require root access, since their use may violate the warranty or turn the phone into a โ€œbrickโ€. Instead, we will focus on the built-in system tools and cloud services that work on most current models from Samsung to Xiaomi.

Before taking active steps, you need to understand what type of blocking is installed. If it is biometrics (fingerprint or face), the problem is often solved by a simple reboot, after which the system will require a digital code. If you have forgotten this particular code, the algorithm of actions will depend on the version of the operating system and the availability of an Internet connection on the locked gadget.

Using the "Find Device" function from Google

The most reliable way to unlock a phone if it is connected to the Internet is to use the service Google Find My Device. This feature was originally created for finding lost smartphones, but has a useful lock and unlock option. For the method to work, it is necessary that your device is logged into your Google account, geolocation is turned on, and mobile data or Wi-Fi is active.

Log in from any other device (computer or second phone) to the official page of the service and log in under the same account as on the locked smartphone. The system will detect the location of your gadget and offer three actions: call, block or clear data. We are interested in the blocking function, which allows you to set a new temporary passwordoverriding an old forgotten code.

After installing a new code via the web interface, wait a few minutes for the signal to reach the device. Then enter this new code on your smartphone's lock screen. In most cases, this will allow access to the system without deleting files. It is important to note that on some versions of Android this function can only lock the device with a new password, but not remove the old protection completely, but you will still have access to the data.

โš ๏ธ Attention: If the Internet is turned off on the phone or GPS is turned off, the service will not be able to send a command to the device. In this case, try connecting your phone to a known Wi-Fi network through the emergency call menu, if the blocking interface allows it.

๐Ÿ’ก

If the "Lock" function does not work, try selecting the "Wipe device" option only as a last resort, as this will delete all data. Before doing this, make sure that you have a fresh backup copy in the cloud.

Unlocking through a Samsung account (for Galaxy owners)

Owners of brand smartphones Samsung are in a more advantageous position thanks to the service Find My Mobile. Unlike Google's standard solution, Samsung's service allows you to completely remove a pattern or PIN code remotely, while saving all the data on the internal storage. This works even if the smartphone screen is turned off or broken, the main thing is the presence of a network.

The procedure is as follows: you need to go to the portal Find My Mobile and log in to your Samsung Account. After selecting a device from the list, the โ€œUnlockโ€ option will appear in the menu on the right. The system will ask you to confirm your Samsung account password, after which it will remove all types of screen lock: fingerprints, PIN, password and pattern.

This method is one of the few that works on modern versions of Android (10, 11, 12 and later) without the need to reset to factory settings. The success of the operation depends on whether you have previously created a Samsung account and activated the remote control function in the phone settings before blocking.

  • ๐Ÿ“ฑ Make sure that the "Remote Unlock" function was enabled in the security settings before blocking.
  • ๐ŸŒ The phone must be connected to a network (mobile or Wi-Fi) to receive the command.
  • ๐Ÿ” You will need to know the password for Samsung Account, not Google.
๐Ÿ“Š What brand of smartphone is yours?
Samsung
Xiaomi
Google Pixel
Huawei/Honor
Other

Reset password via Smart Lock

Function Smart Lock was introduced into Android for ease of use, allowing you to keep your device unlocked in certain secure situations. If you've set up this feature before, it could be a lifesaver. Smart Lock allows you to ignore the password prompt if the phone is in a trusted location, connected to a trusted device, or in the owner's pocket.

Try taking the phone to a location that you have designated as "Trusted" (for example, home or work). Within the range of this geo-point, the screen can be unlocked with a simple swipe without entering a code. Also check for trusted Bluetooth devices nearby: smartwatches, headphones, or car stereos that you previously paired with your phone.

Once your phone is unlocked thanks to Smart Lock, immediately go to your security settings and disable or change your current screen lock method. You should not rely on this function constantly, as it reduces the overall level of security of the device, but in a critical situation of restoring access, it is irreplaceable.

Settings โ†’ Security โ†’ Smart Lock โ†’ Trusted devices

โš ๏ธ Attention: The Smart Lock function will not work if you restarted the phone. After a reboot, the system always requires entering the main PIN code or password at least once to confirm the owner's identity.

USB debugging method and ADB utility

For advanced users who have previously enabled it on their device USB debugging (USB Debugging), there is a powerful command line tool - Android Debug Bridge (ADB). This method allows you to delete a file that stores information about a pattern or password directly through your computer. However, it only works if the phone has already been previously connected to this computer and authorized.

Connect the locked smartphone to the PC using a USB cable. Open a command prompt (Terminal on Mac/Linux or CMD/PowerShell on Windows) in the folder where you installed ADB Platform Tools. Enter the command to delete the key file. The path to this file may differ depending on the version of Android, but most often the standard path is used.

adb shell rm /data/system/gesture.key

adb shell rm /data/system/password.key

adb shell rm /data/system/locksettings.db

After executing the commands, reboot your device. On the lock screen, you can enter any random code or draw any graphic pattern - the system will let you in. Immediately after logging in, set a new, strong password. It is worth remembering that on devices with data encryption (starting from Android 6.0 and higher), this method may not work without unlocking the bootloader, which will already lead to data loss.

What to do if the computer does not see the phone?

If the phone is not detected in ADB when connected, it is possible that the debugging mode was not activated before the lock. In this case, try holding down the power and volume buttons to bring up the menu, but without resetting the data, you will not be able to access ADB.

Specific methods for different versions of Android

The Android ecosystem is extremely fragmented, and unlocking methods may differ depending on the firmware version and manufacturer. On older devices (Android 5.0 Lollipop and below), it was possible to reset the password through your Google account after five unsuccessful attempts to enter it. In modern versions this button "Forgot your password?" often hidden or deleted for security reasons.

Manufacturers like Xiaomi, Meizu i Huawei have their own cloud services, similar to Samsung. For example, Xiaomi owners can use the service Find Device from Mi Account to remove the screen lock. The conditions are the same: the phone must be online, and the account must be linked in advance. The interface of these services allows you not only to erase data, but also to unlock the screen.

The following is a table of compatibility of unlocking methods without data loss, depending on the conditions:

Method Necessary conditions Risk of data loss Complexity
Google Find My Device Internet, Google account No (when changing password) Low
Samsung Find My Mobile Samsung account, internet No Low
Smart Lock Configured trusted zones/devices No Low
ADB Command USB debugging enabled Medium (depends on encryption) High
๐Ÿ’ก

There is no universal method for all phones. Success depends on pre-configuring security services before blocking.

What to do if nothing helps

If none of the above methods worked, this means that the device is securely protected from unauthorized access, which is essentially good news for your privacy. Unfortunately, in such cases, saving data becomes a secondary task compared to restoring the phone's functionality.

The only remaining option is to perform Hard Reset (reset to factory settings) through Recovery mode. This will delete all user data, including photos, contacts and apps, but will bring the phone back to life. After turning it on, you will be able to restore some of the data from a Google Drive backup, if it was created automatically.

To enter Recovery mode, you usually need to turn off the phone and then hold down a combination of buttons (often it is Volume Up + Power or Volume Down + Power). In the menu that appears, use the volume buttons to select the item Wipe data/factory reset and confirm the action with the power button.

โš ๏ธ Attention: After resetting the settings, FRP (Factory) protection will work on modern phones Reset Protection). You will definitely need to enter the username and password for the Google account that was synchronized on the phone before the reset. Without this data, it will be impossible to turn on the phone.

โ˜‘๏ธ Preparing for a full reset

Done: 0 / 5

Prevention of blocking in the future

To never again face the problem of losing access data, you should approach security settings responsibly. Regularly check that device search services are active and that backups have been created. Using password managers will help you store complex combinations of characters that are difficult to remember but easy to recover using a master password.

Set up automatic synchronization of contacts and photos with cloud storage. Even if you have to reset your phone, you will only lose settings and application cache, but all important information will remain safe on Google, Yandex or iCloud servers. It is also recommended to write down PIN codes and pattern keys in a safe place, inaccessible to strangers.

Remember that smartphone security is a balance between convenience and protection. Passwords that are too simple are easy to guess, and passwords that are too complex are easy to forget. Find your sweet spot and use biometrics as a quick way to log in, remembering to periodically enter the master password to update the encryption keys.

Is it possible to unlock a phone through the Google service if it does not have Internet?

No, the command to unlock or change the password must be delivered to the device via the network. If there is no Internet, the service will not be able to contact the phone. The only chance is to connect it to Wi-Fi through the emergency call menu, if such a vulnerability exists in your version of Android.

Will the Find My Device function delete my photos?

The Lock function in the Google Find My Device service does not delete the data, it only sets a new password over the old one. However, the Erase function completely erases all data, including photos and contacts.

Does unlocking via ADB work on Android 12 and 13?

On modern versions of Android with disk encryption enabled, deleting key files via ADB often does not work without unlocking the bootloader. Unlocking the bootloader, in turn, automatically starts the data reset procedure (Wipe Data) for security purposes.

What is FRP and why does it ask for a password after a reset?

FRP (Factory Reset Protection) is an anti-theft system. If the phone was reset not through the settings menu (but through the Recovery buttons), the system considers this a suspicious action and requires confirmation of the ownerโ€™s identity by entering data from the main Google account.

Are there apps that are guaranteed to remove the password without losing data?

Most apps that promise to โ€œhackโ€ any Android without losing data are fraudulent. Really working tools (like Odin for Samsung or Mi Flash for Xiaomi) require specific conditions and often still lead to data reset on modern models due to hardware encryption.