# Recover Android Forgot Password/Pattern/Face/Pin lock Without Losing Data or Factory Reset

**URL:** <https://onehack.st/t/recover-android-forgot-password-pattern-face-pin-lock-without-losing-data-or-factory-reset/54968>\
**Category:** Tutorials & Methods\
**Tags:** hacking, tips-tricks\
**Created:** [August 30, 2019, 7:54pm UTC](https://onehack.st/t/recover-android-forgot-password-pattern-face-pin-lock-without-losing-data-or-factory-reset/54968 "2019-08-30T19:54:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheJoker](https://onehack.st/user_avatar/onehack.st/thejoker/32/22660_2.png) [@TheJoker](https://onehack.st/u/TheJoker)\
**Post date:** [August 30, 2019, 7:54pm UTC](https://onehack.st/t/recover-android-forgot-password-pattern-face-pin-lock-without-losing-data-or-factory-reset/54968/1 "2019-08-30T19:54:41Z")

</div>

![android-pattern-lock](https://onehack.st/uploads/default/original/3X/9/5/955eb28c4861e8e969a3a9f4e3aec5d975219854.jpeg)

Android is one of the most popular SmartPhone Operating System. As of now, there are over a billion android users. Every android user must be familiar with Pattern/PIN lock/Face Recognition, a security feature which ensures authorized access to their devices. But sometimes the users forget the pattern or they try the wrong pattern more than the permitted number of tries allowed, getting locked out. In this guide, I have collected almost all possible methods to break/bypass a pattern/PIN/Face protected android device.

Disclaimer; Do at your risk. I am not responsible for any damages caused and hacking someone’s phone is a crime.

Follow the below given methods one by one.

## Method 1 ( Only If Custom Recovery like Cwm, TWRP, Xrec, Etc… is Installed:)

### Procedure:

1. Download this zip [**Pattern Password Disable**](http://forum.xda-developers.com/attachment.php?s=5a916e1ef7b93ed276976421b6507cae&attachmentid=2532214&d=1390399283) on to your sd card (using your PC, as you can’t get into your phone)
2. Insert the sd card into your phone
3. Reboot into recovery mode
4. Flash the zip
5. Reboot
6. Done!

Note: After Restarting if it still asks any pattern/PIN, just try some random pattern/PIN

## Method 2 (For All Devices With Custom Recovery Installed )

### Procedure (Using Aroma File Manager)

1.[**Download**](http://forum.xda-developers.com/attachment.php?s=5a916e1ef7b93ed276976421b6507cae&attachmentid=2532253&d=1390400421) and Copy [**Aroma File manager.zip**](http://forum.xda-developers.com/showthread.php?t=1646108) to your memory card.

1. Open your recovery (press volume Down + Power button or it can be different according to the phones. Generally, the phones who have pressable button on the middle they have to press all three buttons. Google for your pattern)

2. There will be an option in recovery called **“mount”**. Go in that option and then mount all the cache and everything that is there.

3. Then select “ **update** ” and select “ **apply update from SD/external** ” and select **aroma file manger.zip** file that you downloaded.

4. After Flashing or updating, the aroma file manager will open. Use volume keys for up/down and power button 2 select like you use to get into recovery.

5. In aroma File manager, Go to menu, which is located on the bottom strip and then select Settings.

6. Go to bottom n select **“mount all partition in startup ”** then exit from aroma file manager.

7. Now after exit, **re-update** that aroma file again and it will open again.

8. Go to data \>\> and then System.

Then find ‘ **gesture.key** ’ (for pattern lock) and ’ **password.key** ’ (for password lock) then long touch on gesture.key or password.key and sum option will be prompted, choose to delete and delete that file and restart.

Note: After Restarting if it still asks any pattern/PIN, Read :just try some random pattern/PIN

## Method 3 (No Custom Recoveries Installed)

### Requirements.

- PC(Linux or Windows+Cygwin Installed)
- USB Cable and
- adb(Android Debug Bridge) installed.

### How to install ADB(Linux)

Open Terminal Type the below command and hit enter.

> **sudo apt-get install android-tools-adb**

Follow the instructions until everything is installed.

### How to install ADB(Windows)

Download the .exe and run it. For download & Instrutions [**refer the guide here**](http://x.cygwin.com/docs/ug/setup-cygwin-x-installing.html)

### Procedure

- Connect the phone to the computer via USB(phone should be turned on).
- Open a terminal window(Linux) or cmd(windows).
- Type the below commands one by one, pressing enter.

> **adb devices  
> adb shell  
> cd data/system  
> su  
> rm \*.key**

- That’s all. Reboot the device.

Note: After Restarting if it still asks any pattern/PIN, just try some random pattern/PIN

## Method 4 (All Devices Via ADB - SQL Command)

- Open terminal(Linux)/cmd(Windows) and type the following commands, each at a time, followed by enter.

> **adb shell  
> cd /data/data/com.android.providers.settings/databases  
> sqlite3 settings.db  
> update system set value=0 where name=‘lock\_pattern\_autolock’;  
> update system set value=0 where name=‘lockscreen.lockedoutpermanently’;  
> .quit**

- Done. Reboot the device.

Note: After Restarting if it still asks any pattern/PIN, just try some random pattern/PIN

## Method 5 (All Devices Via ADB - File Removal )

### Procedure:

- Open terminal(Linux)/cmd(Windows) and type the following command.

> **adb shell rm /data/system/gesture.key**  
> That’s it. You should be able to use the device without password/Pattern lock now. If it asks for password?pattern at startup just give any random pattern/PIN

## Method 6 (All Devices With USB Debugging Enabled )

### Procedure: (Primary Steps)

- Download & Extract [**Bypass Security Hack**](http://forum.xda-developers.com/attachment.php?s=5a916e1ef7b93ed276976421b6507cae&attachmentid=2532216&d=1390399283) program.
- Open **SQLite Database Browser 2.0.exe** in SQLite Database Browser.
- Navigate to By-pass security Hacks folder and open Terminal/Cmd there.
- Run the file **pull settings.db.cmd** this will pull out the setting file out of your phone.
- Drag settings.db and drop to SQLite Database Browser 2.0.exe program.
- Navigate to **Browse data** tab, At table there, click to list down the selection & delete **secure**

### Instruction To Remove Pattern Lock:

- Continuing the above procedures, find the record named **lock\_pattern\_autolock** , and delete it.
- Close & save database
- Run push settings.db.cmd and reboot your phone

### Instruction To Remove PIN Lock:

- From the list, find **lockscreen.password\_type** , double-click it & change it’s value to **65536** , and apply changes. (Note: If that file is not there create it)
- Next find **lock\_pattern\_autolock,** and delete record, If doesn’t exist, Ignore
- Close & save database
- Run **push settings.db.cmd** and reboot your phone

### Instruction To Remove Password Lock:

- Find **lockscreen.password\_salt** , Delete Record
- Next find **lockscreen.password\_type** , Delete Record
- Close & save database
- Run **push settings.db.cmd** and reboot your phone

As always give any random password/PIN/Pattern if it asks in the first boot.

## Method 7 (Taking Precaution Before Lock Accident) :

As the title says, this method will act as a precaution, before you get locked up, while you still have access to the device.

- **SMS Bypass** [Root Required]- [**Download**](http://forum.xda-developers.com/attachment.php?s=5a916e1ef7b93ed276976421b6507cae&attachmentid=2532215&d=1390399283) & Install It On Your Device.
- This App Allows You To Remotely Bypass Your Phone’s Screen Lock By Sending A SMS.
- It Removes Your Gesture Pattern Or Password After Receiving A Preset Keyword Along With A Secret Code Via SMS.
- **SMS Bypass App Requires Root.**

### **Procedure:**

1.First, make sure you give permanent root access to the app.  
2.Change the secret code to your preferred choice. The default password is : **1234**  
3.To reset your screen lock, send the following message from another phone:

> **secret\_code reset**  
> **Example:**

> **1234 reset**

**Note 1** : There is a space between your secret code and reset. Also the secret code is case sensitive.  
**Note 2** : There is an option available to change the preset keyword. Default is : reset - Your phone will restart and your lock screen will be reset.

**If None Of The Above Methods Work, Do Factory Reset/Full Wipe The Device**

`Credits: XDA Forums`

---

<div class="post-metadata">

**Author:** ![Ferro\_Jean](https://onehack.st/user_avatar/onehack.st/ferro_jean/32/157976_2.png) [@Ferro\_Jean](https://onehack.st/u/Ferro_Jean)\
**Post date:** [February 14, 2026, 6:40pm UTC](https://onehack.st/t/recover-android-forgot-password-pattern-face-pin-lock-without-losing-data-or-factory-reset/54968/2 "2026-02-14T18:40:15Z")

</div>

```auto

```

Hi all, thank you for all your efforts for the community, I humbly ask for your help to resolve the problem concerning my two android.TECNO km7 SPARK 40 pro plus / INFINIX ZERO 20:::::::::::::::::::::For the tecno I have the wrong unlocking pattern several times and it is now blocked. I tried the factory reset but the phone refuses to turn off and restarts automatically even in recovery mode. here you go //////// For the INFINIX, I just want to recover my files that are there but the screen is completely black (probably ruined) and USB debugging is not activated.
