How to Delete Your Android Security PIN

This guide will walk you through deleting your security PIN via several methods. This guide is for those who have forgotten your security PIN and cannot do a Google reset for some reason. Have restored your phone from an old backup that had a different PIN than your current PIN, and now the Android system is completely confused which PIN to use and isn’t accepting any of them.

You should have a custom recovery installed on your phone, or ADB installed on your computer, but that is beyond the scope of this guide as custom recovery installation methods varies by device. Check Appuals for how to install TWRP on your specific device, or how to install ADB on Windows.

There are two situations you may encounter after restoring from a backup that contained a different PIN than the one you are most recently using.

Device Uses Two Different PINs

This will happen when you have a recent boot PIN, and your backup contains an old screen-lock PIN. So now the device will have two different PINs, which may in fact add to overall device security, but be a headache when you need to remember both PINs.

To resolve this you simply need to reset your PIN in the Android settings. Just go to Settings > Security > Screen Lock, and enter a new PIN. It will overwrite the boot PIN and default back to using just one PIN.

The Device Won’t Accept Any PIN

This is where things get frustrating. In certain cases, your phone may accept the boot PIN, but not a screen unlock PIN. For this, we are going to completely delete the files that store your PIN (yes, your PIN is stored in system files that can be deleted – shocking?).

Delete your Android PIN – TWRP Method

  1. Boot your phone into TWRP recovery.
  2. Go to Advanced > File Manager and navigate to /data/system.
  3. Find the files that end in the .key extension and any files that have “locksettings” in the filename. They will typically be (but vary by manufacturer):


  1. After you’ve deleted those files, reboot your phone. You will be greeted by a lock screen, but it will not prompt you for any password or PIN. If it does, you did not delete all the necessary files.
  2. Set a new PIN in your security settings!

Delete your Android PIN – ADB Method

Note: This requires a rooted phone and USB debugging enabled. If USB debugging is not enabled and you are locked out of your phone, you need to try and flash a custom recovery such as TWRP, which can also grant an ADB sideloader.

  1. Connect your phone to your computer via USB and launch an ADB terminal.
  2. Type the following commands into the command prompt:

adb devices
adb shell
cd /data/system
rm *.key
rm *.key
adb reboot

Delete your Android PIN – ADB/SQL Method

Note: This is an alternative ADB method for those who have SQLite3 alongside their ADB installation.

  1. Type the following commands into your ADB/SQL terminal:
    adb shell
    cd /data/data/
    sqlite3 settings.db
    update system set value=0 where name=’lock_pattern_autolock’;
    update system set value=0 where name=’lockscreen.lockedoutpermanently’;

Delete your Android PIN – Flashable Pattern Password Disable .Zip Method

Note: This is for those who have a custom recovery (it doesn’t matter which) installed and want to flash a .zip that will do the work for you.

  1. Download the Pattern Password Disable .zip from here and transfer it to your phone’s SD card.
  2. Reboot into your custom recovery of choice.
  3. Flash the zip and reboot your phone.
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Delete Your Android Security PIN

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested