Password and pattern code are the highly used security features to unlock smartphones. Smartphones use these different techniques to secure unauthorised access to the device. However, it may happen sometime that you get logged out of the device because you forgot the correct pattern or the password of the device.

If you have forgotten their phone password, PIN or pattern and cannot unlock it, then there is no need to worry. You can unlock such a device yourself staying at home and without paying visit to any service centre.
There are different methods to unlock device depending on the operating system used in it.
For Android Devices
Unlock phone with your Google account
1. While setting up an Android smartphone, we login with the help of Google account. This account can be used to unlock the device if you forget the password or pattern.
2. After entering the wrong password or PIN several times, it will appear on the screen that you can try next after some time and, along with it, ‘Forgot Pattern/Password’ button will appear.
3. After tapping on it, you will be asked to login to the Google account which is registered with the phone.
{{/usCountry}}3. After tapping on it, you will be asked to login to the Google account which is registered with the phone.
{{/usCountry}}4. After this process, the phone will be unlocked and you will be able to set a new password or pattern.
5. Internet connection is a must for this method to work.
This is one of the best methods because the data of the device is not deleted in it.
Factory reset your device
Follow these steps to reset the Android device if the previous method is not working
1. First of all, switch off the phone.
2. For a while, press and hold the Power button along with the Volume Up or Down (depending on the phone) buttons for a while.
3. Now the phone will go into recovery mode and you will have to enter ‘Clean/Erase Data’ and ‘Wipe Cache’ after selecting the factory reset option.
4. When you turn on the phone after waiting for about a minute, it will not ask for any password or pattern and will get the option to set up the phone from the beginning.
For the iPhone users
If you have forgotten the passcode of iPhone, follow these steps:
1. If you have forgotten your iPhone’s passcode, the first thing to do is to switch it off. You can do this by pressing the power button.
2. To put your phone in recovery mode, press and hold the power button on iPhone and later devices after connecting it to your Macbook or PC. You need press the volume down button on iPhone 7 series and the home button in older iPhones.
3. You must have iTunes installed on your PC or Mac, after which you will see the recovery mode screen of the device and you will be able to control it with iTunes software.
4. By clicking on the Restore option found in iTunes on PC or Mac, all the data on the iPhone will be deleted and the passcode will also be removed.
5. You can restore apps and settings from backup after setting a new passcode, or set up the iPhone as a new device.