Someone holding a locked Android phone header image.
i_am_zews/Shutterstock.com
Smart Lock may allow you to access your Android phone's data without its PIN, pattern, or password. Samsung's Find My Mobile tool may also work, and other Android manufacturers may offer similar functionality. If all else fails, you can regain access to your phone by performing a factory reset, which will wipe the data stored locally on your phone.

Android normally secures your device by demanding a PIN, pattern, or full password. Your phone isn’t useless if you forget the unlock code — you can bypass it and get back in.

As Google tightens security, this has become more difficult on modern versions of Android. But there’s always a way to make your phone usable again, as long as you remember your Google account’s username and its password.

Modern Versions of Android (5.0 and Up)

Android used to have a way to bypass your PIN or password, but that feature was removed in Android 5.0.

Unfortunately, this means there’s no built-in way to simply reset your pattern, PIN, or password and gain access to your phone or tablet. This does help provide additional protection to your data, however — attackers have no way of bypassing the passcode unless they actually know it.

Update, 9/23/22: Android 13 was released in August 2022. Android 13 does not contain any features that are comparable to the recovery methods present in older versions of Android from before Android 5.0, either.

RELATED: Use Smart Lock in Android 5.0 and Never Unlock Your Phone at Home Again

Android’s Smart Lock feature may be able to save you. For example, let’s say you’ve set up Smart Lock on your Android phone and have it automatically log in when it’s on your home Wi-Fi. You can take your phone to that home Wi-FI network and it will automatically unlock for you, even if you can’t remember the normal unlock code.

You’re left using a few other tricks that might work. For example, on Samsung devices, if you’ve logged into the device with a Samsung account, you can go to the Samsung Find My Mobile website, log in with the same Samsung account, and use the “Unlock my screen” option to remotely remove your device’s lock screen. Other manufacturers might offer similar features if they have a device-tracking website you’ve signed up for.

If you’ve already unlocked your bootloader and installed a custom recovery, you may be able to use that environment to remove the code. However, it probably won’t be possible to install a custom recovery without factory resetting your device if you haven’t already done so.

An Android 12 prompt warning about too many failed PIN entries.

Android 4.4 and Below

RELATED: How to Bypass and Reset the Password on Every Operating System

Older versions of Android — Android 4.4 KitKat and older — have an integrated way to bypass your pattern, PIN, or other password if you forget it. To find this feature, first enter an incorrect pattern or PIN five times at the lock screen. You’ll see a “Forgot pattern,” “forgot PIN,” or “forgot password” button appear. Tap it. You’ll be prompted to enter the username and password of the Google account associated with your Android device.

android bypass patern
Best and Worst Ever Photo Blog

When All Else Fails: Factory Reset Your Device

Assuming you don’t have the easy option to reset the device using one of the tricks above, you should probably give up on the data stored on your device. You can get your device into a usable state again, but that will involve performing a factory reset, wiping the device’s storage, and setting it up again from scratch.

This isn’t as bad as it sounds, as most data on a modern Android device should just sync online. Sign in with the same Google account and you’ll have access to your emails, contacts, apps, and practically everything else. You’ll then be able to set up a new unlock code.

If your device has a removable SD card, you’ll probably want to remove the SD card before performing the factory reset, just to ensure any files stored on there won’t be overwritten. It’s probably best to shut down your Android device, remove the SD card, and then continue.

RELATED: How to Find Your Lost or Stolen Android Phone

You can visit the Find My Device website and log in with the same Google account you use on that Android device. Select the device you’re locked out of and select “Erase” to remotely erase it. You’ll be able to set it up from scratch afterwards — the lock code will be removed, but the device will also be wiped.

If you’ve enabled another remote phone or tablet-tracking service, you can probably use its website to remotely wipe your device, too.

The "Find My Device" page can also be used to erase your device.

If you can’t reach your phone via the Find My Device page to perform a reset, don’t worry — you have other options. You can factory-reset your phone or tablet even if you can’t unlock it.

The exact way you’ll do this is different on different phones and tablets. You’ll need to boot into your device’s system recovery menu and wipe it from there. To do this, you’ll need to turn the device off and turn it on while holding the correct buttons. For example, on the Pixel 6, you have to press and hold the Volume Down and Power buttons at the same time, then, when you see “No Command,” quickly hold the Volume Up button and the Power button. Use the recovery menu to wipe the device.

Google offers a list of ways to access recovery mode on Pixel devices. You may have to perform a web search or check your device manufacturer’s support pages to find out how to reset it.

On devices running Android 5.1, you may have to enter the username and password of the Google account that was previously associated with the device after doing this. This prevents someone else from resetting and using your device. However, you won’t need the old unlock code to regain use of your hardware.


Modern Android devices work a lot more like Apple’s iPhones and iPads. If you forget the code, you’ll need to reset it to its factory default settings to regain access. This begins to make sense when you consider Google’s desire to automatically encrypt all Android devices out-of-the-box. The PIN or password is used as part of the key to decrypt the data stored on an encrypted Android device.

Profile Photo for Chris Hoffman Chris Hoffman
Chris Hoffman is Editor-in-Chief of How-To Geek. He's written about technology for over a decade and was a PCWorld columnist for two years. Chris has written for The New York Times and Reader's Digest, been interviewed as a technology expert on TV stations like Miami's NBC 6, and had his work covered by news outlets like the BBC. Since 2011, Chris has written over 2,000 articles that have been read more than one billion times---and that's just here at How-To Geek.
Read Full Bio »
Profile Photo for Nick Lewis Nick Lewis
Nick Lewis is a staff writer for How-To Geek. He has been using computers for 20 years --- tinkering with everything from the UI to the Windows registry to device firmware. Before How-To Geek, he used Python and C++ as a freelance programmer. In college, Nick made extensive use of Fortran while pursuing a physics degree.
Read Full Bio »