“I typed every password I can think of and my phone still will not open.” If that is where you are, the first thing to know is that your lock screen code is not the same as your Apple Account or Google Account password, and nobody can look it up for you, not even Apple, Google, or your carrier.
Your phone asks for a passcode, PIN, or pattern, and every password you try is rejected. After several wrong tries the phone makes you wait, and after enough wrong tries an iPhone shows “iPhone Unavailable” or “Security Lockout”, while an Android phone locks you out for a set time. This is not a glitch. The lock screen code is the key that encrypts everything on the phone, and the phone is designed to keep everyone out, including you, until the right code is entered or the phone is erased.
The lock screen passcode, PIN, or pattern is separate from your Apple Account password and your Google Account password. Typing an account password on the lock screen will never work. If you changed the passcode recently, muscle memory may still be typing the old one. A phone that was set up by someone else, or a secondhand phone, may have a passcode you were never told. On iPhone, iOS 17 and later keep your previous passcode working for 72 hours after a change, which can save you if the change was recent. On Android, some phones show a “Forgot pattern” or “Forgot PIN” option after several failed tries, but most current phones do not.
If you do not remember the Apple Account or Google Account password either, recover that account first on another device, through the account recovery page, because you will need it after the erase. If the phone is secondhand and still tied to the previous owner’s account, only the previous owner can remove it. An Apple Store or your carrier can walk you through the same erase steps, but they cannot bypass the lock screen for you.
Can Apple or my carrier unlock my phone without erasing it? No. Apple, Google, Samsung, and your carrier all use the same rule: a forgotten lock screen code can only be cleared by erasing the phone. Anyone who says otherwise is selling a scam.
I changed my passcode yesterday and now the new one does not work, what do I do? On iPhone, use the old passcode within 72 hours of the change. On the “iPhone Unavailable” screen, tap “Forgot Passcode?”, then “Enter Previous Passcode”. After you get in, set a new passcode right away.
I forgot my phone password and I need my photos, what do I do? If the photos were backed up to iCloud or Google Photos, they will come back after the erase when you sign in and restore. If they only lived on the phone and there is no backup, they cannot be recovered. Check iCloud or Google Photos on another device before you erase.
Will erasing my phone delete my eSIM? On iPhone, the erase screen asks whether to keep the eSIM. Choose to keep it. On Android, a factory reset usually keeps the eSIM, but if the phone asks, keep it, and never delete an eSIM to fix a lockout, because a deleted eSIM needs a new one from your carrier.