To prevent unwanted access to your phone, it is always wise to take certain security measures. Android devices are standard equipped with very handy safety features, which you can set to protect your device against prying eyes. Two of the most commonly used security measures are the cartridge lock and the personal identification number (pin). Unfortunately, you can also be locked out of your own Android device due to a forgotten password or pattern. Not being able to get into your own Android device anymore is frustrating, but only a minor setback because you can easily bypass these security measures and break into your Android device so you can use it again.
Steps
Method 1 of 6: Use Android Device Manager

Step 1. Using another device or computer, go to the Android Device Manager website or app
Send your browser to google.com/android/devicemanager or download Android Device Manager on another Android device. This method should work for almost all Android devices purchased in recent years, as long as you have it signed in with your Google account.

Step 2. Log in with your Google account
You will be asked to enter your Google account login information. Make sure (if you have multiple Google accounts) that you enter the information that your phone is also logged in with.
If you forgot your Google password, see How to create a new password in Gmail to see how to get it back

Step 3. Click on 'Lock' under your device
If you have multiple Android devices, they are all listed. In the options on the left side of the screen, under the name of your device, you will see three options: 'Call', 'Lock' and 'Erase'. If you click 'Lock' you can, although it seems contradictory, enter a temporary password for your device that is stronger than any existing pattern lock or pin.

Step 4. Enter a new password that you want to use to unlock your Android device
Make sure you remember this password by writing it down somewhere.
You will also need to confirm the password

Step 5. Click on 'Lock' to apply the new password
After you have entered the correct information, click the 'Lock' button at the bottom right of the pop-up screen. You should see a notification under the options 'Call, 'Lock' and 'Clear'.

Step 6. Enter the new password in your device
On the lock screen, enter the password you just created. You should now be able to access your locked device. It may take a few minutes for your new password to take effect.
Method 2 of 6: Bypassing the pattern lock (Android 4.4 and below)

Step 1. Do five wrong logins
To get to the lock screen with reset options, you must first log in five times in vain. Make sure you go through at least four points for every incorrect login. This only works if a cartridge lock is used.

Step #2. Tap on ‘Forgot Pattern?
' at the bottom of the screen. This opens the bypass screen.

Step 3. Enter your backup pin
If you remember the backup pin you created when you set up the pattern, you'll need to enter it here to unlock the device. If you can't remember the pin, you can still unlock via your Google account.

Step 4. Enter your Google account information to unlock the device
You can sign in with your Google account to bypass the lock, as long as it's the same account your device is connected to.
Method 3 of 6: Use Samsung's Find My Mobile Tool (Samsung Phones)

Step 1. Go to Samsung's 'Find My Mobile' website if you have a Samsung phone
Go to findmymobile.samsung.com/. If you have a Samsung phone, such as a Galaxy S4, you have access to a tool called Find My Mobile. This tool, in addition to an additional method of unlocking your phone, gives you more control over your phone without using your phone itself.
- Note that this method will only work if you have already registered your phone with this tool and are connected to the internet via a Wi-Fi or mobile network.
- If it's a Samsung phone, there's probably Samsung somewhere on the housing.

Step 2. Log in with your Samsung account
Enter the details of the Samsung account you created earlier and log in.
See if you can recover the login details, if you don't remember them

Step #3. Unlock your phone
On the left side of the screen, you will see your registered phone along with a list of options below it. Find and click the "Unlock my screen" option under the "Protect my device" heading.

Step #4. Get on your phone
After a short while, your screen should be unlocked and you should have full access to your phone again.
It is recommended that you set a new screen lock in your system's settings immediately after you regain access to your phone
Method 4 of 6: Disabling the lock screen with the Android SDK

Step 1. Download the Android SDK
Visit this link: http://developer.android.com/sdk/index.html#Other to download, install and extract the appropriate Android SDK.
Please note that this method will only work if you have previously enabled USB debugging in the Developer menu on your Android device. You must also have previously connected your Android device to a computer via ADB. This method only works if you've done these things before you were locked out

Step 2. Connect your phone to your computer
Connect your phone to your computer via USB.

Step 3. Open the ADB installation folder
This is the folder where ADB is installed. This is usually the 'Tools' folder in the SDK installation folder. Use Windows Explorer to navigate to this folder.

Step 4. Hold ⇧ Shift and right click in the ADB folder
Choose here for 'Open command screen'. This activates the command prompt.

Step 5. Give the command to unlock the screen
Type adb shell rm /data/system/gesture.key at the command prompt and press ↵ Enter.

Step 6. Disconnect and reboot your phone
After typing command, disconnect your phone, reboot and hopefully you won't see a pattern lock on your phone anymore. You should have full access.
Make sure to set a new lock right after you regain access. Your old password will be restored when the phone reboots unless you set a new one
Method 5 of 6: Reset the device to factory settings

Step #1. Do this as a last resort
A factory reset will lose all data on your phone and the factory settings will take effect (as they were when you bought it).
- This will erase all data on the phone; so this should only be used as a very last resort if you can't get around the lock screen.
- If you're trying to bypass someone else's lock screen, you're out of luck if the phone is running on Android 5.1 or later. In Android 5.1, 'Device Protection' was introduced, making it necessary to sign in with the original Google account after the phone has been wiped. This is to prevent a thief from using the phone after a theft.

Step 2. Turn off your device
Press the power button and choose 'Disable' from the menu that appears.
You can also press and hold the power button for five seconds until your device turns off

Step 3. Simultaneously press and hold the power button and the 'Volume Up' button
If your device has a Home button, such as a Samsung Galaxy device, press and hold the Volume Up button, the Home button, and the Power button at the same time. Keep holding the buttons until you see the Android Recovery logo.

Step 4. Use the 'Volume Down' button to select the 'Recovery Mode'
Press the power button to choose, which will make your device reboot into recovery mode.

Step 5. Press the 'Volume Down' button to select 'Wipe data/factory reset'
Press the power button to choose the option.

Step 6. Use the volume buttons to select 'Yes' and press the power button
This confirms that you want to erase all data on the device and perform a reset. It takes about 20-30 minutes for the factory settings to take effect.

Step 7. Reset your device
Once the restore is complete, you will be guided through the entire setup process. You can sign back in with your Google account to restore most of your settings.
If the device is running on Android 5.1 or later, you need to sign in with the original Google account and password to unlock the device. This is to prevent theft
Method 6 of 6: Overload the password screen (5.0 - 5.1.1)

Step 1. Use this method to bypass password lock on some Android devices
Android versions 5.0 - 5.1.1 contained a vulnerability that could be used to bypass a password lock. This only works with password locks (no pin, no pattern) and may not work on all devices running these Android versions.

Step #2. Tap on the 'Emergency Call' option on the password lock screen
This opens the phone's dial pad screen.

Step #3. Enter ten asterisks with the number picker

Step #4. Double tap the asterisks to select them
A new menu opens at the top of the screen.

Step 5. Tap on 'Copy' to copy the ten asterisks

Step 6. Tap on the end of the asterisks and choose 'Paste'
This will paste the ten asterisks to the end and double the amount.

Step 7. Copy and paste the asterisks until it fails
This may take a while.

Step 8. Go back to the lock screen and open the camera link
You can do this by swiping up from the bottom.

Step 9. Open the notification shade and tap on the 'Settings' button
You will be asked for a password.

Step 10. Press and hold in the password field and choose 'Paste'
This inserts a row of asterisks into the field.

Step 11. Repeat this process until the lock screen crashes
If you paste enough characters, the lock screen will crash, allowing you to access your device again.