TL;DR Quick Answer
The Truth About Android Master Codes
There is no single “master code” that unlocks any Android phone, as modern security prevents universal bypasses. Codes like *2767*3855# or *#*#7780#*#* often trigger a factory reset (wiping all data) on older devices, while newer phones require legitimate recovery methods like Google’s Find My Device, manufacturer-specific recovery, or Safe Mode to remove locking apps—not a magic code that preserves your data.
What Is the “Master Code” for Android Phones?
The term “master code” has spread widely across the internet, promising a universal solution to unlock any Android device. In reality, these are USSD (Unstructured Supplementary Service Data) codes that manufacturers embed into Android systems for specific functions—primarily diagnostics and hard resets.
These codes aren’t designed to “unlock” your screen while keeping your data intact. Instead, they’re essentially factory reset triggers that wipe your device clean and restore it to its original state. Think of it less as a “master key” and more as a “nuclear option” that erases everything to give you a fresh start.
If a true “master code” existed that could bypass any phone’s security, it would represent a massive security vulnerability. Every stolen phone could be unlocked instantly. That’s precisely why modern Android versions have disabled or restricted these codes—your security depends on them not working universally.
Known Android “Master Codes” and What They Actually Do
Here are the two most commonly referenced codes and their actual functions:
Code #1 – Full Factory Reset
*2767*3855#
This code performs a complete factory reset on compatible devices. It doesn’t just remove your screen lock—it erases absolutely everything: apps, photos, contacts, messages, and all personal data. Your phone returns to the state it was in when you first took it out of the box. On newer Android versions, this code is typically blocked entirely.
Code #2 – Factory Data Reset
*#*#7780#*#*
Similar to the first code, this triggers a factory data reset that restores all settings to defaults and removes downloaded applications. Some sources claim this preserves certain data, but in practice, you should expect to lose everything important. Again, modern devices often block this code from executing.
Master Codes Comparison: Myth vs Reality
| Code | Claimed Function | Actual Result | Data Status | Works On |
|---|---|---|---|---|
*2767*3855# | Unlock any phone | Complete factory reset | All Data Lost | Older Samsung/Android only |
*#*#7780#*#* | Universal unlock code | Factory data reset | All Data Lost | Limited older devices |
*2767*2878# | Samsung pattern unlock | Full device wipe | All Data Lost | Legacy Samsung models |
##7378423## | FRP bypass | Service menu access (if any) | Varies | Very limited devices |
| Google Find My Device | Remote unlock/locate | Remote lock, wipe, or locate | Controllable | All Android with Google |
| Safe Mode | Bypass third-party locks | Disables third-party apps | Data Preserved | Android 4.1+ |
How to Use Master Codes (If You Still Want to Try)
Before attempting these codes, understand that success is unlikely on any phone manufactured after 2018, and you will lose all your data if it does work. Here’s the process:
From your lock screen, swipe up or tap “Emergency Call” to access the phone’s dialer. This is available even when your device is locked for safety calls.
Type *#*#7780#*#* or *2767*3855# exactly as shown. Some codes auto-execute when the last character is entered; others require tapping the call button.
If the code works, you may see a confirmation dialog asking you to proceed with the reset. Confirm only if you accept permanent data loss.
The device will restart and begin the reset process. This can take several minutes. Once complete, you’ll see the initial setup screen as if the phone were new.
Even if a master code successfully resets your device, you’ll likely encounter Factory Reset Protection (FRP) on Android 5.1 and newer. FRP requires you to sign in with the Google account previously linked to the device before you can use it. Without those credentials, your phone remains effectively locked.
Pros and Cons of Using Master Codes
Master Code Comparison: What Each Code Does
Here’s a straightforward breakdown of what these codes actually do versus what people think they do:
| Code | What It Claims | What It Actually Does | Data Loss? | Works on New Phones? |
|---|---|---|---|---|
*2767*3855# | Unlocks any phone | Hard reset + firmware reinstall | Yes – Complete wipe | No |
*#*#7780#*#* | Universal unlock | Factory reset (keeps firmware) | Yes – Apps/data erased | No |
*#06# | – | Shows IMEI number | No | Yes |
*#*#4636#*#* | – | Shows phone/battery info | No | Some devices |
*#0*# | – | Samsung hardware test menu | No | Samsung only |
Legitimate Methods to Unlock Your Android Phone
Since master codes are unreliable and destructive, here are proven alternatives that actually work in 2026:
Google’s official solution lets you remotely lock your device with a new temporary password, then use that password to gain access. Requires your Google account to be linked and the device to be online.
Official
Free
If a third-party app lock is causing issues, booting into Safe Mode disables all non-system apps. You can then uninstall the problematic app or adjust settings. Hold Power Off to access Safe Mode on most devices.
Data Safe
Built-in
Access your phone’s recovery mode using hardware button combinations (typically Power + Volume Up/Down). From there, select “Wipe data/factory reset.” This works on all Android devices but erases data.
Data Loss
Universal
Samsung users with a Samsung account linked can visit findmymobile.samsung.com to remotely unlock their device without data loss. One of the few methods that preserves your data.
Data Safe
Samsung
Using Google Find My Device (Step-by-Step)
On any computer or another phone, navigate to Google Android Find and sign in with the same Google account linked to your locked device.
If you have multiple devices, select the locked one from the list. You’ll see its location on a map if location services are enabled.
Click this option to remotely set a new temporary password. This will replace your forgotten PIN, pattern, or password with a new one you create now.
Return to your phone and enter the temporary password you just created. Once unlocked, go to Settings > Security to set a new permanent lock you’ll remember.
Booting Into Safe Mode
Safe Mode is particularly useful when a third-party lock screen app is preventing access. Here’s how to access it on most Android devices:
Most Android Phones: Press and hold the Power button, then tap and hold “Power Off” until you see “Reboot to Safe Mode” and tap OK.
Samsung Devices: Power off completely, then press and hold Power button. When the Samsung logo appears, press and hold Volume Down until Safe Mode appears in the corner.
In Safe Mode: Navigate to Settings > Apps, find and uninstall any third-party lock screen apps, then restart normally.
Common Android Diagnostic Codes (Safe to Use)
While these won’t unlock your phone, they’re helpful for checking device information:
| Code | Function | Brand Compatibility |
|---|---|---|
*#06# | Display IMEI number | Universal (all Android) |
*#*#4636#*#* | Phone info, battery stats, usage data | Most Android devices |
*#0*# | Hardware diagnostic test menu | Samsung only |
*#1234# | Firmware version info | Samsung only |
*#*#34971539#*#* | Camera information | Select Android devices |
Why Modern Phones Block Master Codes
If you’re wondering why these codes don’t work on your relatively new phone, it’s by design. Android’s security has evolved significantly:
Factory Reset Protection (FRP): Requires Google account verification after any reset
Encrypted Storage: Data remains encrypted and inaccessible without proper authentication
USSD Code Restrictions: Potentially dangerous codes are blocked or require confirmation
Secure Boot: Prevents unauthorized modifications to the operating system
Biometric Security: Fingerprint and face recognition add layers that codes can’t bypass
Manufacturer-Specific Unlock Options
| Brand | Official Unlock Method | Recovery Mode Keys | Data Preserved? |
|---|---|---|---|
| Samsung | Find My Mobile (findmymobile.samsung.com) | Power + Volume Up + Bixby | Yes (via Find My Mobile) |
| Google Pixel | Google Find My Device | Power + Volume Down | No (reset required) |
| OnePlus | Google Find My Device | Power + Volume Down | No (reset required) |
| Xiaomi | Mi Account (i.mi.com) | Power + Volume Up | Limited |
| Motorola | Google Find My Device | Power + Volume Down | No (reset required) |
| Huawei | Huawei Cloud (cloud.huawei.com) | Power + Volume Up | Limited |
⚖️Legal & Ethical Disclaimer
The information provided in this guide is intended for legitimate use cases only—specifically, recovering access to your own device. Attempting to unlock a phone that doesn’t belong to you, bypassing security on stolen devices, or assisting others in doing so may violate local laws and can result in criminal charges. Always ensure you have rightful ownership or explicit permission before attempting any unlock procedure. We are not responsible for any misuse of this information.
No, there is no universal master code that works on all Android phones. The codes commonly shared online (like *2767*3855# or *#*#7780#*#*) only work on certain older devices and will perform a factory reset that erases all your data. Modern Android phones have security measures that block these codes entirely. Each manufacturer uses different codes, and most have been disabled for security reasons.
Yes, absolutely. If a master code works on your device, it will perform a factory reset that completely erases all data including photos, apps, contacts, messages, and settings. These codes are essentially hard reset commands, not unlock commands. There is no master code that preserves your data while removing the screen lock.
Samsung devices historically used codes like *2767*3855# or *2767*2878#, but these trigger a complete factory reset and don’t work on most Samsung phones made after 2016. For Samsung devices, the best option is Samsung’s Find My Mobile service (findmymobile.samsung.com), which can remotely unlock your device without data loss if you have a Samsung account linked.
No, the IMEI number cannot be used to remove a screen lock (PIN, pattern, or password). The 15-digit IMEI is your phone’s unique identifier and is primarily used for carrier/network unlocking—which is a completely different process that allows your phone to work with different carriers. It has no relation to your screen lock security.
The best options to unlock without data loss are: (1) Google Find My Device to set a temporary password, (2) Samsung Find My Mobile for Samsung devices, (3) Safe Mode if a third-party app is causing the lock, or (4) using Smart Lock if you previously set up trusted places or devices. If none of these options work and you haven’t backed up your data, unfortunately a factory reset may be your only option.
Modern Android versions (5.0 Lollipop and newer) have disabled or restricted USSD codes that could be used to reset devices without authentication. This is a security feature to protect against theft and unauthorized access. Additionally, individual manufacturers have removed these codes from their firmware. If you have a phone from the past 7-8 years, master codes almost certainly won’t work.
After a factory reset on Android 5.1 or newer, you’ll encounter Factory Reset Protection (FRP). This requires you to sign in with the Google account that was previously linked to the device. If you don’t know the Google account credentials, you won’t be able to set up or use the phone. This is designed to make stolen phones useless to thieves.
Many third-party unlock tools advertised online are scams or contain malware. Some legitimate software does exist from reputable companies, but they typically still require a factory reset and may not bypass FRP. Always research thoroughly, read reviews from trusted sources, and be extremely cautious about downloading software or paying for unlock services that seem too good to be true.
The search for a master code to unlock any phone usually ends in frustration. Modern Android security is simply too robust for simple codes to bypass. Your best bet for regaining access is through legitimate channels: Google Find My Device, Samsung SmartThings Find, recovery mode, or contacting your carrier/manufacturer. These methods won’t save your data, but they’ll get you back into your phone legally and safely.


