The situation when the owner of a smartphone cannot access his data due to forgotten lock passwordis one of the most common problems in the Android ecosystem. Modern versions of the operating system use powerful data encryption, which is tied directly to the user's access code. This means that without knowing the combination, the files on the internal drive remain unreadable by the system and the computer.
Often users look for ways to โdecryptโ the device, meaning by this restoring access to the interface without losing information. Unfortunately, the security architecture of Android, starting with version 6.0 Marshmallow and especially Android 10 and later, is designed in such a way that resetting your password inevitably entails deleting your encryption keys. The only working solution in most cases is a complete reset or Hard Resetwhich erases all user data.
In this article we will examine in detail legal methods for restoring the device's functionality. We will look at standard tools from Google, recovery mode Recovery Mode, as well as debugging capabilities via ADB. It is important to understand that any manipulation of the screen lock requires physical access to the device and the rights of the owner.
Reasons for blocking and types of encryption
Before taking active steps, you need to understand the nature of the problem that has arisen. Screen locking can be caused not only by the owner's forgetfulness. Sometimes the system is blocked due to repeated input of incorrect data, parental control functions or a remote command through the service Find My Device. In such cases, the device enters a state that requires you to enter your Google account credentials.
Modern smartphones use file-based encryption (FBE) or full disk encryption (FDE). The decryption key is stored in a secure area of โโthe processor and becomes available only after successful user authentication. If you enter the wrong PIN code pattern too many times, the phone may temporarily block entry attempts or offer a factory reset.
โ ๏ธ Attention: Brute-force attempts to guess a password are practically useless on modern devices. The system increases the delay between entry attempts, and after a certain number of errors may require a mandatory data reset.
It is also worth considering that some manufacturers, such as Samsung or Xiaomimay have their own cloud services for unlocking, which work differently than standard Google tools. However, you should only rely on them if you have previously activated the corresponding functions in the deviceโs security settings.
Using the Find My Device service
The most civilized and safest way to regain control of your device is to use the official Google service. If the Internet is active on a locked smartphone (Wi-Fi or mobile network) and geolocation is enabled, you can control it remotely. To do this, you will need access to the same Google accountthat is authorized on the phone.
Go to the website google.com/android/find from a computer or another smartphone. After logging in, you will see a map with the device's location and a control panel. There are three main functions available here: playing sound, locking the device and clearing data. We are interested in the cleaning function, since it allows you to remove a forgotten password.
Select the option Wipe device (Erase Device). The system will warn you that all data will be permanently deleted. Confirm the action. After executing the command, the smartphone will reboot and return to its factory state, as if you had just taken it out of the box. The encryption will be reset and you can set up your phone again.
If the phone is offline, the reset command will be executed automatically as soon as the device connects to the Internet the next time.
It is important to note that after such a reset, FRP (Factory Reset) protection will work Protection). When setting up for the first time, the phone will require you to enter the login and password for the Google account that was synchronized with the device before the reset. This is a security measure against theft that cannot be bypassed without the owner's data.
Reset via the Recovery Mode menu
If remote access is not possible, you will have to use the physical buttons of the device. Mode Recovery is a special recovery environment built into the firmware of every Android smartphone. It allows you to perform system operations regardless of the state of the main operating system.
To enter this mode, you must completely turn off the phone. Then you need to hold down a certain key combination. It differs from manufacturer to manufacturer: most often it is the power button along with the volume up button. On some models Sony or Moto you may need to connect to the computer via USB at startup.
When the manufacturer's logo or the recovery menu appears, release the buttons. Navigation in this menu is usually done using the volume buttons (up/down), and selecting an item is done using the power button. You need to find the section Wipe data/factory reset. Be extremely careful when choosing items so as not to delete unnecessary items.
โ๏ธ Algorithm of actions in Recovery
After selecting the reset item, the system will ask for confirmation, usually this is item Yes or Factory data reset. The process of formatting the data partition will take from a few seconds to a couple of minutes. When finished, select option Reboot system now. The phone will reboot and the password protection will be removed along with all files.
โ ๏ธ Attention: On devices with Android 11 and higher, entering Recovery Mode may be blocked if the phone has not been unlocked at least once after turning it on. In this case, you will need to connect to a PC and use ADB tools.
Unlocking via USB debugging (ADB)
This method is only suitable for advanced users and only works if USB debugging (USB Debugging) and the computer has already been authorized as a trusted device. If these conditions are not met, this method will not work.
You will need to install the package Android SDK Platform-Tools on your computer. Connect the locked smartphone to the PC via the original cable. Open a command prompt or terminal in your installed tools folder. We will use the utility adb to send commands directly to the system.
Enter the following command to delete the file that stores the pattern or password:
adb shell rm /data/system/gesture.key
Or, depending on the Android version, you may need to delete the file locksettings.db:
adb shell rm /data/system/locksettings.db*
After executing the command, reboot your device. In some cases, this allows you to log in without entering a password, after which you need to immediately install new protection. However, on modern versions of Android with active encryption, this method is often ineffective, since access to the partition /data is closed until unlocked.
Why does ADB not always work?
On modern devices, the /data partition is mounted only after successful decryption. If the phone is locked, the file system is not writable even through ADB, so the command to remove the key may return a โRead-only file systemโ error.
Specifics of unlocking Samsung devices
Devices of the South Korean giant have a unique feature - service Samsung Find My Mobile. Unlike Google's standard solution, this service allows you to remove screen lock no data loss, but only under strict conditions. This feature is one of the main advantages of the Samsung ecosystem.
For this method to work, you must be logged into your Samsung account (not just Google), data transfer enabled, and the "Remote Unlock" option activated in the security settings. If all these parameters have been configured in advance, you can go to findmymobile.samsung.com.
In your personal account, select your device from the list and click the Unlock (Unlock) button. The system will ask you to enter your Samsung account password to confirm your identity. After this, the screen lock (PIN, password, fingerprint) will be removed, and all files will remain in place.
| Method | Saving data | Requirements | Difficulty |
|---|---|---|---|
| Find My Device (Google) | No (full reset) | Internet, Google account | Low |
| Recovery Mode | No (full reset) | Physical access, buttons | Medium |
| Samsung Find My Mobile | Yes | Samsung account, setup in advance | Low |
| ADB (file deletion) | Yes (theoretically) | USB debugging enabled | High |
Only a way to save photos and contacts when unlocking is to use the manufacturer's proprietary cloud services (for example, Samsung Cloud) or pre-configured remote unlocking.
Data recovery after a reset
After you have managed to decrypt the phone by resetting the settings, you will be faced with the task of recovering information. If you've been making regular backups, this process will go as smoothly as possible. Android will automatically offer to restore data from the Google Drive cloud the first time you set it up.
Check for backups in your Google account. Contacts, call history, SMS and a list of installed applications can be stored there. Photos and videos are usually synchronized with the service Google Photos. Log in to this service from your computer to make sure that your photos are saved.
If you used a memory card microSD, the data on it should be saved, since resetting the settings usually affects only the internal memory. However, if the card was formatted as part of the internal storage (Adoptable Storage), it will also be encrypted and inaccessible without the old key.
โ ๏ธ Attention: Recovery menu interfaces and security settings may differ depending on the firmware version and the manufacturer's shell (MIUI, OneUI, ColorOS). Always check the names of the items with the official documentation for your specific model.
To restore messages from instant messengers, such as WhatsApp or Telegram, you will need to have a local or cloud copy of chats. When installing the application, it will automatically offer to restore your chat history if it detects a corresponding backup file in memory or the cloud.
Use the Smart Switch application (for Samsung) or similar utilities from other manufacturers to quickly transfer data from an old device to a new one or after a reset, if you have a fresh local copy on your PC.
FAQ: Frequently asked questions questions
Is it possible to unlock the phone without losing data?
In a standard situation, when the password is forgotten and USB debugging or manufacturer-specific services (like Samsung) are not enabled, unlock the phone without losing data impossible. This is due to the principles of Android encryption: the decryption key is tied to the password, and without it, the data is a set of unreadable bits.
What is FRP and how to bypass it?
FRP (Factory Reset Protection) is protection against resetting to factory settings. After a forced reset, the phone will require you to enter the Google account that was previously on it. There is no official way for outsiders to bypass this protection; this is done to protect against theft. Only entering the correct owner data will help.
Will calling the phone help to unlock it?
On very old versions of Android (before 5.0), there were vulnerabilities that allowed access to settings through the call menu. On modern smartphones this method does not work. The call will simply appear on the lock screen, but will not give access to the system.
Will the phone reset if the battery runs out?
No, draining the battery will not reset the settings or delete the password. The phone will simply turn off. The next time you charge and turn it on, it will again require you to enter the unlock code. Data encryption persists until an intentional reset is performed.
Can an SD card be decrypted on another phone?
If the card was set up as "internal storage", it is encrypted with the device-specific key. You won't be able to insert it into another phone - the system will offer to format the card, which will delete all data. If the card was โportableโ, it should be readable on any device.