It’s always a good idea to secure your Android phone with a passcode, but what if you forgot it? Well, don’t panic, there are several things you can do to regain access to your phone.
1. Unlock using smart lock
Smart Lock (also called Extend Unlock on Samsung phones) is an Android feature that keeps your phone unlocked when you're near a trusted location or connected to a trusted Bluetooth device, like a fitness tracker or car.
However, this will only work if you have previously set up Smart Lock on your phone. You will find it under Settings > Security > Smart Lock On most phones or Settings > Lock screen & AOD > Extend lock On Samsung devices.
Smart Lock on Android gives you the following options to unlock your phone without a password:
- Body detection: The phone senses that you are holding it and automatically stays unlocked when it is in your hand or pocket.
- Trusted places: Your location is used to unlock your phone when you are near the address you specified.
- Trusted devices: Keeps your device unlocked when connected to a trusted Bluetooth device, such as a fitness tracker or car.
If you have set up one or more smart lock options before you forget your password, you can use them to regain access to your phone. This will allow you to back up any important data on your Android device.
It is important to note that you cannot change the Smart Lock settings without entering the current PIN. Also, this feature will not unlock the device after a reboot.
2. Use the SmartThings search feature on Samsung devices
Do you have a Samsung device? If so, you don't have to worry about forgetting your device's screen lock code, as Samsung provides a simple way to reset your lock screen PIN.
The company offers a feature called Search SmartThings For all of its phones, allowing you to remotely manage your device if it's lost. To use this feature, you must be signed in with your Samsung account on your phone and have a Wi-Fi or mobile data connection.
To reset your phone's passcode with SmartThings Find, follow these steps:
- On your computer, go to Samsung's SmartThings Find website.
- Sign in with your Samsung account.
- Select your phone and click on to open option.
- Click on to open Click the button and enter your account password to verify your identity.
Wait a few seconds, and your current PIN or password will be removed. You can then set up a new lock screen security method from scratch.
3. Use the Forgot Password prompt.
Some phone manufacturers, such as Realme, make it easy to regain access to your device if you forget your PIN. When you enter an incorrect password multiple times, some phones may display an error message. Did you forget your password? or I forgot my PIN Option on the lock screen. Tapping this option will take you through a series of steps to verify your identity and reset your lock screen passcode.
The verification process may involve entering the email address associated with your device or answering security questions you set up in your device settings. Once verified, you'll receive on-screen instructions on how to set a new passcode for your device.
4. Delete PIN file using ADB
Android creates a KEY file to store user credentials, such as fingerprints, patterns, or other passwords. This file allows the device to unlock when the correct password is entered and deny access when the wrong password is entered. Using the Android Debug Bridge (ADB) tool, you can access this file from your computer and delete it.
However, this method will only work if:
- USB debugging is enabled on your phone. If you've never accessed the Developer Options menu, it's safe to assume that you haven't enabled it.
- You have allowed your computer to connect to your phone via ADB. We have a guide on using ADB if you are not familiar with it.
- Your phone is not encrypted. With Android 6.0 Marshmallow, Google requires all Android phones to ship encrypted. Therefore, this will not work with newer devices.
This method only works with older versions of Android. If you get an error message saying ”
rm: /data/system/gesture.key: No such file or directory
This means you can't bypass the lock screen this way.
There are no guarantees that this method will work, and if you are not careful, you may damage your phone. So, make sure to follow the steps carefully.
- Connect your phone to your computer via USB cable.
- Open a command prompt or terminal window in your ADB installation directory.
- Write in adb shell rm /data/system/gesture.key And click Enters.
- Restart your phone. Once you do this, the secure lock screen should disappear.
- This is temporary, so reset your PIN or pattern lock before restarting.
5. Perform a factory reset.
If you still can’t access your Android phone, your last option is to perform a factory reset. This will erase all data on your phone and return it to its original state.
Since you're locked out, you won't be able to reset it through the Settings app. Instead, you'll need to visit Google's Find My Device website and sign in to your account. Then, select your phone and tap Reset the device to factory settings From the left sidebar.
If you can't use this method, you can try to factory reset your device via recovery mode. Here's how:
- Turn off your device.
- After the screen goes completely black, press and hold lower the volume and power Press the buttons simultaneously to enter recovery mode.
- Use the volume buttons to navigate to wipe data/factory reset Option. Click on Power button To determine it.
- Use the volume buttons to highlight. Factory data reset option, then click Power button To determine it.
Once your device restarts, you'll need to set up your Android phone again. You'll be prompted to sign back into your Google account, which will restore any backed up data.
One of the above methods should help you regain access to your Android phone, but it's best to take precautions to avoid going through this process again.
If you frequently forget your passcode, consider keeping a physical copy of it in a safe place, like a locker or password manager. Also, make sure you're signed in with your Google account (and Samsung account, if applicable) and have Smart Lock enabled to unlock your phone using Wi-Fi.