Forgot your pattern key or PIN code on your smartphone with Android 5.0 Lollipop? This problem is familiar to many owners of devices based on an outdated, but still current version of the operating system. Unlike new versions of Android, where the unlocking process often requires linking to a Google account, on Android 5.0-5.1.1 there are several alternative ways to bypass the protection - both with saving data and with a complete reset.

In this article we will examine 5 proven methodsincluding official and technical workarounds. It is important to note that some methods may not work on custom firmware or devices with a modified security system (for example, on smartphones Samsung Knox or Xiaomi with MIUI). Also remember: on devices with data encryption (File-Based Encryption), unlocking without a reset is almost impossible - a factory reset will be required.

Before you begin, check if your phone is connected to the Internet via Wi-Fi or a mobile network. Some methods require an active connection to sync with Google servers. If the screen is completely locked, try connecting to a known Wi-Fi network through the quick settings panel (if available when locked).

1. Unblocking via Google account (official method)

The most legal and safest method is using a linked account Google. It works on most stock firmware Android 5.0/5.1if you previously added an account in the device settings. Algorithm of actions:

  1. On the lock screen, enter the wrong password or key 5 times in a row.
  2. After the fifth attempt, a button will appear Forgot your pattern key? or Forgot your password? - click on it.
  3. Enter your login and password for your Google accountthat was linked to the device.
  4. Follow the system instructions to create a new pattern or PIN code.

โš ๏ธ Attention: If the device was previously reset via Recovery or firmware via Fastboot, the link to your Google account may have been reset. In this case, the method will not work. Also, some manufacturers (for example, Huawei or Meizu) block this functionality in their shells.

๐Ÿ“Š Which unlocking method have you tried before?
Account Google
Hard Reset
ADB commands
Special apps
I havenโ€™t tried anything

If the button Forgot pattern key? does not appear even after multiple unsuccessful attempts, it means:

  • ๐Ÿ“ฑ Synchronization with Google is disabled on the device (check in the account settings on another device).
  • ๐Ÿ”’ Custom firmware with a modified security system is installed.
  • ๐Ÿ› ๏ธ The manufacturer has blocked this function (currently for Samsung, LG, Sony on some models).

2. Resetting a pattern key via ADB (without data loss)

The method is suitable for users who have access to a computer with installed drivers on their device USB debugging is enabled (USB Debugging) and have access to a computer with installed drivers ADB. This is one of the few ways to bypass the lock without deleting data, but it requires preliminary preparation.

If USB debugging was enabled before the lock, follow these steps:

  1. Connect smartphone to PC via USB cable.
  2. Open the command line (cmd on Windows or Terminal on macOS/Linux).
  3. Enter the command to check the connection:
    adb devices

    If the device is detected, go further.

  4. Delete the file with the pattern:
    adb shell rm /data/system/gesture.key
  5. Reboot the device:
    adb reboot

After the reboot, the lock screen should disappear, but all data will remain in place. If a PIN or password was set instead of a pattern, use similar commands, but with deleting files password.key or locksettings.db.

Install ADB drivers on the PC|Enable USB debugging on the phone (before blocking)|Download the Android SDK Tools platform|Connect the phone to the original PC cable-->

โš ๏ธ Attention: On some devices (for example, Samsung Galaxy S5 or HTC One M8after deletion gesture.key you may need to enter the backup PIN code that was set when setting up the pattern key. If you don't remember it, the method will not work.

3. Hard Reset via Recovery Mode (full reset)

If the previous methods did not help, a radical method remains - hard reset (Hard Reset). It will erase all data from your device, including apps, photos, and settings, but is guaranteed to unlock the screen. The instructions are universal for most smartphones for Android 5.0/5.1.1:

  1. Turn off the device (press and hold the power button for 10-15 seconds).
  2. Press the combination of buttons to enter Recovery Mode. It differs for different manufacturers:
    • ๐Ÿ“ฑ Samsung: Power + Home + Volume up
    • ๐Ÿ“ฑ LG, Nexus: Power + Volume down
    • ๐Ÿ“ฑ HTC, Sony: Power + Volume up
    • ๐Ÿ“ฑ Xiaomi: Power + Volume up + Volume down
  • In the menu Recovery use the volume buttons to select the item Wipe data/factory reset and confirm the selection with the power button.
  • After resetting, select Reboot system now.
  • Please note that on some devices (for example, Samsung s Knox) after the reset, you may need to enter data from the account Samsung or Googlethat was linked earlier. This is part of the protection system FRP (Factory Reset Protection).

    Manufacturer Combination for Recovery Presence of FRP
    Samsung Power + Home + Volume Up Yes (starting with Android 5.1)
    LG Power + Volume down Yes (on models after 2015)
    Xiaomi Power + Volume up + Volume down Yes (on MIUI 7 and newer)
    Nexus/Pixel Power + Volume down Yes (on all versions)
    HTC Power + Volume down No (on most models)
    What is FRP and how to bypass it?

    FRP (Factory Reset Protection) is an anti-reset protection system that requires you to enter your Google account information after a Hard Reset. It appeared for the first time on Android 5.1. You can bypass it using special apps (for example, FRP Bypass APK) or through custom Recovery firmware (TWRP). However, this requires an unlocked bootloader and may void your warranty.

    4. Using special apps (for PC)

    If standard methods do not work, you can use third-party unlocking utilities. The most popular:

    • ๐Ÿ–ฅ๏ธ Dr.Fone โ€” Screen Unlock: supports most devices running Android 5.0, but requires payment. Works via USB connection.
    • ๐Ÿ–ฅ๏ธ iMyFone LockWiper: removes pattern, PIN and fingerprints. The free version is available with restrictions.
    • ๐Ÿ–ฅ๏ธ Tenorshare 4uKey: specializes in bypassing FRP and screen lock. Supports Samsung, LG, Huawei.

    The operating principle of all apps is similar:

    1. Install the app on your PC and connect a locked smartphone.
    2. Select the device model from the list of supported ones.
    3. Follow the instructions to put the phone into mode Download Mode or Fastboot.
    4. Wait for the process to complete (usually takes 5-15 minutes).
    โš ๏ธ Attention: Before using third-party apps, check reviews about them on the forums (for example, XDA Developers or 4PDA). Some utilities may contain malicious code or require unlocking the bootloader, which will void the warranty.

    5. Bypassing locking via Safe Mode (for some devices)

    On certain devices (for example, Samsung Galaxy S5 or LG G3), you can try to boot into Safe Mode (safe mode), where third-party screen lock applications (for example, AppLock) will not work active. This method is suitable if the lock is not installed by the system, but by third-party software.

    How to start Safe Mode:

    1. Hold down the power button until the shutdown menu appears.
    2. Press and hold the item Turn off (or Turn off power) until the request to switch to safe mode appears.
    3. Confirm the transition. The device will reboot.
    4. In Safe Mode uninstall the application that is blocking the screen via Settings โ†’ Applications.
    5. Restart the device in normal mode.

    If the device is blocked set at the system level (standard pattern or PIN), this method will not work. Also, on some devices (for example Xiaomi), safe mode may not disable system restrictions.

    ๐Ÿ’ก

    Before resetting via Recovery, try removing the SD card (if you have one) - sometimes it stores backup copies of photos or contacts that can be saved.

    Common errors and how to avoid them

    When trying to unlock, users often encounter typical problems. Here are the most common of them and ways to solve them:

    • ๐Ÿ”Œ The device is not detected via ADB: check the drivers, try a different USB cable or port. Some devices require confirmation of a trusted computer (a request will appear on the phone screen).
    • ๐Ÿ”„ After the reset, a Google account is required: this is FRP protection. The solution is to enter data from a previously linked account or use special apps to bypass FRP.
    • ๐Ÿ“ต The โ€œForgot your pattern key?โ€ button does not work: this means that synchronization with Google is disabled on the device or custom firmware is installed. Try other methods.
    • ๐Ÿ› ๏ธ Cannot log into Recovery: button combinations may differ. Check the instructions for your model on the manufacturer's website or forums.

    Another common error is using unofficial firmware will help.. If you installed custom software (for example LineageOS or Resurrection Remix), standard unlocking methods may not work. In this case, only flashing via Fastboot or TWRP.

    ๐Ÿ’ก

    If data encryption is enabled on the device (File-Based Encryption), unlocking without a reset is impossible - a Hard Reset will be required.

    Is it possible to unlock Android 5 without losing data if USB debugging is disabled?

    Unfortunately, no. Without USB debugging enabled and without access to your Google account, the only reliable way is Hard Reset, which will delete all data. If the device has important information, try connecting it to the PC in Fastboot mode and copying the data via ADB pull, but this requires an unlocked bootloader.

    Why does it ask for the old PIN code after resetting via Recovery?

    This is a feature of some devices (for example, Samsung or LG), where after resetting you need to enter backup PIN codeset when setting up the pattern. If you donโ€™t remember it, all that remains is flashing the firmware via Odine or Fastboot with complete data clearing.

    Does the method of deleting gesture.key work on Android 5.1.1?

    Yes, but with reservations. On Android 5.1.1 this method only works if:

    • USB debugging was enabled before blocking.
    • The device is not encrypted (setting Settings โ†’ Security โ†’ Encryption disabled).
    • The manufacturer has not modified the security system (for example, on Xiaomi with MIUI this method often does not work).
    How to unlock Samsung Galaxy S5 on Android 5.0 if you forgot your Google account?

    On Samsung Galaxy S5 s Android 5.0 after Hard Reset is triggered FRP protection. You can bypass it:

    1. Through special FRP Bypass APK (you need to download to an SD card and install via Recovery).
    2. Using a app Samsung FRP Tool on a PC (requires mode Download Mode).
    3. Flashing the stock software via Odine with disabling FRP (you need a file PIT and the correct combination of files).

    Without these methods, unlocking is impossible - you will need to remember the data from your Google account.

    Is it possible to unlock the screen if the phone is discharged?

    No. For any manipulations (entering Recovery, connecting via ADB, using apps) minimum 20-30% chargeIf the device is completely discharged:

    1. Connect it to the charger and wait until the charge indicator appears (usually 5-10 minutes).
    2. If the screen does not turn on, try charging from another power supply or via the PC's USB port.
    3. On some devices (for example, Samsung) you can boot into Recovery even with a low charge, but the risk of complete shutdown remains.