[No Data Loss] Secret Code to Unlock Android Phone Without Password

by Aria Ford

Updated on 2025-03-21

5min read

Locked out of your Android phone due to a forgotten password or wrong pattern entries? Don’t worry—there’s a solution! “Secret Codes” are internal Android dialer codes that can help you bypass Android security settings. However, not all codes are safe; some may erase your data. In this article, we’ll reveal the secret code to unlock your Android phone without losing any data. Read on to learn how!

Part 1. What Are Secret Codes?

Secret codes, commonly known as Android dialer codes, are unique combinations of digits and symbols. They can be input into a smartphone’s dialer to unlock concealed features, settings, and diagnostic tools. These codes fulfill different functions, such as enabling certain features, restoring settings, and diagnosing hardware parts.

restoring settings | secret code to unlock android phone password

Purpose of Secret Codes

  • Unlocking Features: Certain codes allow you to turn specific features on or off on your device. For instance, inputting a certain code can enable or disable a specific service or setting.
  • Resetting Settings: Some codes enable users to revert specific settings or configurations on their devices, bringing them back to their original defaults.
  • Accessing Test Modes: Numerous codes provide entry to diagnostic modes where users can evaluate different hardware elements like the display, camera, battery, and sensors. This is especially beneficial for diagnosing issues and guaranteeing peak device performance.

Part 2. Secret Codes That Can Unlock Your Android Phone

Android devices contain secret codes that enable unlocking various functions, such as resetting passwords, executing factory resets, etc. These codes can be a real help if you’re locked out of your device or need to resolve problems. Here are a few helpful secret codes –

Full Data Wipe & Unlock Codes (These will erase all data)

If you’re unable to access your device and require a reset, these codes can restore your phone –

  • *2767*3855# → Carries out a full factory reset, reinstating the original firmware and deleting all information, such as passwords.
  • *#*#7780#*#* → Restores the device to its original settings without the need to reinstall the firmware. This can eliminate screen locks and reset default settings.

Other Possible Unlock Codes (May work on older devices or specific brands)

These codes might grant entry to specific configurations or assist in resetting passwords on various devices –

  • *#27663368378# → Accesses the test mode menu, in which certain devices provide a choice to reset passwords.

Brand-Specific Secret Codes

Various Android device makers possess unique hidden codes intended for diagnostic and reset functions –

  • Samsung: *#0*# – Accesses the hardware diagnostic menu to evaluate elements such as the screen, sensors, and camera.
  • Xiaomi: *#*#64663#*#* – Accesses the hardware testing mode to verify different functions and elements.
  • Huawei: *#*#2846579#*#* – Provides access to the project menu, which includes network information and software update choices.

Part 3. How to Use Secret Codes to Unlock Your Phone

Unlocking your Android device with secret codes is a technique that wipes all data from the device, including the screen lock password, PIN, or pattern. This procedure returns the device to its initial factory settings. It’s essential to create a backup of your data beforehand, since this approach will lead to data loss.

Step 1: Turn on your Android device. On the lock screen, tap “Emergency Call” to open the dialer.

Emergency Call | secret code to unlock android phone password

Step 2: In the dialer, enter the following code: *2767*3855#

This will initiate a full factory reset, erasing all data and reinstalling the firmware.

erasing all data | secret code to unlock android phone password

Step 3: Press the Call button. The device will immediately start the reset process automatically.

Step 4: Once the reset is complete, your phone will restart and display the initial setup screen. Follow the on-screen instructions to configure your device and set a new screen lock.

restart | secret code to unlock android phone password

Note: If your device cannot use Secret Codes or you prefer to unlock it without data loss, think about trying the alternative methods provided below.

Some articles you may be interested in:

Ultimate Guide to Unlock Home Screen Layout on Android [All Brands]

[6 Software] How to Unlock Android without Hard Reset

Part 4. Alternative Unlock Methods If Secret Codes Don’t Work

If secret codes do not succeed in unlocking a device, there are other methods you might attempt. These techniques can assist in bypassing the problem and restoring access.

Method 1: Unlock via Google Account (Find My Device)

If you can’t recall the password, PIN, or pattern for your Android device, you can utilize Google’s Find My Device feature to unlock it.

Step 1: Open a web browser and go to Google Find My Device.

Step 2: Sign in with the Google account linked to your locked device.

Step 3: After logging in, choose your locked device from the list of registered devices.

Step 4: You’ll see options like “Play Sound”, “Secure Device”, and “Erase Device”. Select “Erase Device”.

Step 5: Enter your Google account username and password when prompted to verify your identity.

Google account username | secret code to unlock android phone password

Step 6: A message will notify you that this action will erase all data, including files on the SD card, and restore factory settings.

Step 7: Click “Reset” to begin the factory reset. Follow any additional on-screen instructions to complete the process and regain access to your device.

factory reset | secret code to unlock android phone password

Requirements: The device must be linked to the internet and tied to your Google account.

Method 2: Remove Screen Lock Using ADB Commands (Only for Android 6 )

If your Android device runs Android 6 and USB debugging was enabled before the lock screen issue, you can use ADB (Android Debug Bridge) commands to remove the lock screen without performing a factory reset.

Step 1: Use a USB cable to connect your Android device to your computer. 

Step 2: Open Command Prompt (Windows) or Terminal (macOS/Linux), navigate to the directory where ADB is installed, and enter: 

adb devices

If your device’s serial number appears, the connection is successful. 

Step 3: Execute ADB Commands to Remove the Lock Screen

Run the following commands:

adb shell settings put secure lockscreen.disabled 1

adb shell mv /data/system/locksettings.db /data/system/locksettings.db.old

adb reboot

This disables the lock screen, renames the lock settings database, and restarts the device.

Alternatively, you can use this method:

adb shell rm /data/system/gesture.key

adb reboot

This deletes the pattern lock file, allowing you to unlock the device with any pattern after reboot.

unlock the device | secret code to unlock android phone password

Step 4: Once the device reboots, the lock screen should be removed. Go to System Security Settings and set up a new unlock method.

Important Note:

  • USB debugging must have been enabled beforehand, or ADB commands won’t work.
  • This method is intended for unlocking your own device, not for unauthorized access.
  • To enhance security, disable USB debugging when not needed to prevent unauthorized access.

Method 3: Factory Reset via Recovery Mode (If the dialer is inaccessible)

Performing a factory reset via Recovery Mode is another practical option. This technique necessitates physical access to the device and will delete all information, restoring the device to its default factory settings.

Requirements:

  • You need to possess the device directly.
  • Every piece of data, such as applications, configurations, and personal documents, will be removed.

Step 1: Turn off your device entirely. Start in Recovery Mode. The procedures differ depending on the manufacturer:

Samsung:

  • Latest models (S23, Z Flip): Press Volume Up + Side button until the Samsung logo appears.
  • Older models (S6, S7 with Home button): Press Volume Up + Home + Power together.

OnePlus: Hold Volume Down + Power until the Android Recovery screen appears.

Motorola: Hold Volume Down + Power until the device powers on, then use Volume Down to navigate to Recovery Mode.

Google Pixel: Hold Volume Down + Power, then use Volume buttons to select “Recovery Mode” and press Power to confirm.

TCL: Hold Volume Down + Power, then release Power when the logo appears but keep holding Volume Down until Recovery Mode loads.

Huawei: Hold Volume Up + Power until the Recovery Mode screen appears.

Recovery Mode | secret code to unlock android phone password

Step 2: When in Recovery Mode, utilize the Volume buttons to select “Wipe data/factory reset” and then press Power.

Step 3: Select “Yes” to verify and delete all user information.

Step 4: Allow the device to reboot. Choose “Reboot system now” to restart your device.

Method 4: Using Third-Party Tools to Unlock Android Device Easily 

If secret codes do not unlock your Android device, third-party applications provide a useful option. These tools are created to bypass different kinds of screen locks and assist in restoring access to your phone without any difficulty.

One dependable tool for this purpose is the Passixer Android Unlocker. This application offers a straightforward and effective method for unlocking Android devices. It additionally aids in bypassing FRP (Factory Reset Protection) locks, which is especially beneficial for used devices.

Features of Passixer Android Unlocker

  • Passixer can eliminate passwords, PINs, patterns, fingerprints, and facial recognition locks.
  • Seamlessly get past the Google account verification screen without requiring the original account details.
  • For older Samsung devices, Passixer unlocks while keeping your data intact, safeguarding your information.
  • It has an extremely high success rate in unlocking Android devices, even in complicated situations.

Follow these steps to unlock your Android device via Passixer Android Unlocker –

Step 1: Launch the registered Passixer Android Unlocker and select the option to Remove Screen Password.

Recovery Mode | secret code to unlock android phone password

Step 2: Choose the brand of your device from the given list.

Choose the brand of your device | secret code to unlock android phone password

Step 3: Link your Android phone to your computer with a working USB cable.

Link your Android phone | secret code to unlock android phone password

Tips: If your device isn’t recognized, select “Try Other Unlock Methods” for different choices.

Step 4: Click “Remove Now” to initiate the unlocking process.

initiate the unlocking process | secret code to unlock android phone password

Step 5: Adhere to the on-screen prompts to access Recovery Mode on your device, then press “Next” to proceed.s

access Recovery Mode | secret code to unlock android phone password

Step 6: Reset your phone’s settings and cache by adhering to the guidelines given in the software.

Passixer | secret code to unlock android phone password

Step 7: Verify that your phone has been successfully reset after accessing Recovery Mode. After confirmation, click “Confirm” to continue.

Passixer | secret code to unlock android phone password

Step 8: The application will now eliminate the screen password from your Android device. After the procedure is finished, you will notice a “Removed Successfully” notification. At this stage, you can configure your unlocked phone for unrestricted usage.

Passixer | secret code to unlock android phone password

Requirements:

  • You need a PC or laptop to install and run the software.
  • Windows 11/10/8.1/8/7
  • A processor of at least 1GHz Intel/AMD or above.
  • 1GB RAM or more.
  • 1GB of free space on your computer’s hard disk.

Method 5. Use SmartThings Find to Erase Data Without Password (Samsung Only)

You can also utilize Samsung’s SmartThings Find feature to remotely delete your device’s data without requiring a password.

Step 1: Go to the SmartThings Find webpage and log in with your Samsung account. Ensure your locked device is connected to Wi-Fi or mobile data and has remote unlock enabled.

Step 2: On the main dashboard, find and select your locked Samsung device from the list. Click “Erase Data” to start the remote wipe process.

locked Samsung device | secret code to unlock android phone password

Step 3: If two-factor authentication is enabled, a verification code will be sent to your Samsung device. Enter the code on the site and click “Verify”. If you don’t receive it, choose to receive the code via text message.

Step 4: Once verified, click “Erase Data” again to confirm that you want to proceed.

Step 5: Click “Erase” to initiate the factory reset without entering the device password.

Step 6: For security, you must enter your Samsung account password and click “Next” to confirm.

Step 7: Your Samsung phone will start a factory reset remotely, erasing all data and settings, restoring it to its original state. 

Requirements:

  • SmartThings Find needs to be configured on your device before it is locked.
  • Your device needs to be connected to your Samsung account.

Part 5. Other Brand-specific Secret Codes (Samsung, Xiaomi, Huawei, etc.)

Apart from the common Android secret codes, numerous smartphone manufacturers possess unique hidden codes that grant entry to advanced configurations, diagnostic utilities, and system details. Below are certain exclusive codes for well-known Android brands –

Samsung:

  • *#0228# – Shows battery condition, voltage, and associated metrics.
  • *#0808# – Accesses USB settings for debugging and various connection modes.

Xiaomi:

  • *#*#4636#*#* – Offers comprehensive insights into phone status, battery condition, and usage data.

Huawei:

  • *#*#6130#*#* – Shows usage statistics and information about the wireless network.
  • *#12580*369# – Gathers complete details about software and hardware.

Caution:

  • These codes might not function on every model or software version, since manufacturers or carriers may deactivate them.
  • Utilizing specific codes can change system configurations, so move forward carefully.
  • If you are uncertain about a code’s purpose, investigate it before employing it to prevent unintended alterations to the system.

To find a more comprehensive collection of hidden codes for different Android devices, you can check out AskVG’s compilation of Android secret codes.

Bonus: How to Prevent Getting Locked Out on Android Again

Being locked out of your Android device can be irritating, but taking a few easy precautions can help you avoid the trouble.

1. Enable Biometric Authentication on Android

Enabling biometric authentication on your Android device improves security and streamlines access by using fingerprint or facial recognition.

Step 1: Launch the Settings application on your device. Scroll down and select Lock screen and Security.

Step 2: Press on the Screen lock option. Choose Fingerprint or Face Recognition, based on your device’s features.

Face Recognition | secret code to unlock android phone password

Step 3: You will be asked to set up a backup PIN, pattern, or password. Adhere to the instructions displayed on the screen to configure this.

Step 4: For the Fingerprint, position your finger on the sensor and raise it multiple times as directed until the procedure is finished.

Step 5: For Face Recognition, align your face within the frame shown on the screen and remain still as the device records your facial characteristics.

Step 6: After your biometric information is recorded, press Done or Confirm to finalize the setup.

2. Use a Password Manager

To safely store and manage intricate passwords on your Android device, you can use Google’s integrated Password Manager.

Step 1: Open the Settings application on your Android device. Scroll down and select Google.

select Google | secret code to unlock android phone password

Step 2: In the Google settings, select Autofill. Then, choose Autofill with Google and make sure it’s enabled.

choose Autofill with Google | secret code to unlock android phone password

Step 3: Select Passwords to view and manage your stored credentials.

manage your stored credentials | secret code to unlock android phone password

Step 4: Click the Settings icon (gear-shaped) located in the upper-right corner. Enable Offer to save passwords to let the Password Manager ask you to save passwords whenever you log into applications or websites.

Step 5: In the same settings menu, you can enable Auto sign-in to automatically log into apps and websites with your saved credentials.

3. Set Up Trusted Devices or Locations

You can also keep your device unlocked by setting up trusted devices or locations.

Set up a trusted device:

Step 1: Make sure Bluetooth is activated on your device. Next, go to the Settings application on your device.

Step 2: Locate and select Security & Privacy (or Security & location, depending on your device).

Step 3: Check for Trusted devices in the security settings.

Step 4: Press Add Trusted Device and choose the Bluetooth device you’d like to utilize.

choose the Bluetooth device | secret code to unlock android phone password

Step 5: After pairing, your phone will stay unlocked as long as it is connected to a trusted device, like a smartwatch or car audio system.

Set up a trusted location:

Step 1: Open the Settings application on your device. Search for the “Location” choice and select it.

Step 2: In the “Location Services” section, locate and choose “Trusted Places”. You might have to provide your PIN, and password, or utilize biometrics to continue.

Location Services | secret code to unlock android phone password

Step 3: Select the option to include a trusted location. You can either: Drag the pin on the map to your preferred location. Alternatively, input an address into the search field for accuracy.

Step 4: After you have chosen the appropriate location, press “Use this place”. Verify by selecting “Add” when requested.

Conclusion

Although secret codes can help unlock Android devices, there is often a risk of losing data. For a more secure and effective method to unlock your Android device without data loss, we suggest utilizing Passixer Android Unlocker. This tool provides a smooth method for eliminating screen locks and regaining access to your device with little inconvenience.

Was this information helpful?

TrustScore 5 | 5
Previous article 5 Safe Methods to Bypass FRP Google on Android with/without PC