Back up important files before any big step such as a reset or restore. Don't download 'repair' programs suggested online; use only official tools from Microsoft, Apple, Google or your device maker. On work or school devices, ask your IT admin first.
Likely causes
- The PIN, pattern or password was forgotten
- Someone else changed the screen lock
Steps you can try
Did that fix it?
Great! If the code comes back, repeat the same steps from the start.
If the steps didn't help, don't push further. See the help section below.
When to get help
If you do not know the Mi Account or Google account passwords, recover them first (id.mi.com, google.com); otherwise the phone will stay locked after erasing. If that fails, a Xiaomi service centre can help only with proof of purchase.
Differences between versions
Every option erases all data on the phone, including photos and apps, and anything not backed up is lost. Remote erase works only if the phone is on, online and had Find Device (or Find Hub) turned on. Never use unofficial unlock tools.
Sources
This page is based on official sources from Microsoft, Apple, Google and other makers, written in our own words. Code meanings can differ between versions.