How to remove a password from a gallery on Xiaomi: official and hidden methods

A forgotten gallery password on Xiaomi’s smartphone can be a serious problem, especially if the encrypted albums contain important photos or documents. MIUI You can't always reset in standard ways.System photo protection in firmware Xiaomi (from the MIUI 12 to MIUI 14) uses separate encryption linked to a Mi Account or local PIN-That means even resetting your phone to factory settings doesn't always help -- albums can stay blocked.

In this article, we will discuss 5 working methods for deleting a password from a gallery on Xiaomi, including official tools (via Mi Account and security settings), technical workarounds (using the use of the username). ADB) We will pay special attention to the nuances for different models, from the budget Redmi Note 10 to the flagship Xiaomi 13 Ultra. Importantly, some methods require preliminary preparation (for example, included debugging for the development of the new model). USB), So read carefully!

In MIUI, the gallery lock function is implemented at the system application level com.miui.gallery. Unlike third-party photo managers (for example, Google Photos), two types of protection are used here:

  • πŸ” Local. PIN/password – set in the settings of the gallery and stored in encrypted form in the folder /data/system/users/0. You can reset it only through root access or data reset.
  • 🌐 Linking to your Mi Account – if you used a Xiaomi account to lock, the password syncs to the cloud, in which case unlocking is possible via the i.mi.com web interface.

Since MIUI 13, Xiaomi has tightened its security policy: when you change your gallery password, you can request confirmation via SMS or email, which makes it difficult to bypass security, but leaves loopholes for device owners. For example, on the POCO F4 and Redmi K50 models, you can reset your password through recovery mode if you turn on the option β€œAllow unlock via Mi Account”.

⚠️ Note: If you bought a Xiaomi smartphone with your hands and the previous owner did not untie the Mi Account, it will be impossible to unlock the gallery without its data).

Before proceeding to the instructions, check:

  • πŸ“± Version MIUI β€” Path: Settings β†’ The phone. β†’ Version. MIUI. This depends on the availability of certain methods.
  • πŸ”‘ Type of lock - gallery asks PIN, pattern lock or password from your Mi Account?
  • πŸ”Œ Debugging status USB β€” If previously included settings β†’ For developers β†’ Debugging by USB, You have a chance to use it. ADB.
πŸ“Š What Xiaomi model do you use?
Redmi Note 10/11/12
POCO F3/F4/F5
Xiaomi 11/12/13
Another model

Method 1: Removing passwords through your Mi Account (official method)

If the gallery is locked through a link to a Xiaomi account, the most reliable way to unlock is to use the i.mi.com web interface.This method works on all devices with MIUI 12-14, but requires:

  • πŸ“§ Access to an email or phone number linked to your Mi Account.
  • 🌍 Internet connection on a smartphone (Wi-Fi or mobile data).
  • πŸ”„ Possibility to confirm entry through SMS/email (If two-factor authentication is enabled).

Step-by-step:

  1. Open your browser on a PC or other device and go to i.mi.com. Sign in with the same account as your smartphone.
  2. From the menu, select Devices β†’ Find Device (or Find Device in English).
  3. Click on your Xiaomi model in the list. In the window that opens, select Unlock Screen.
  4. Confirm the action via SMS or email. The system will send a command to the smartphone - wait for the notification of unlocking.
  5. Reset the phone. Once turned on, check access to the gallery - the password must be reset.

If this method does not work, there are two possible reasons:

  • 🚫 The device has disabled the function "Allow Remote Unlock" (checked in Settings). β†’ Mi Account β†’ Security of the device).
  • πŸ”„ Mi Account is not synced with the gallery (this happens after manual resetting of settings).

πŸ’‘

If you don't remember the password from your Mi Account, try to restore it via account.xiaomi.com.Use a backup email or a linked phone number.Recovery can take up to 24 hours due to a security check.

Method 2: Reset password through MIUI security settings

Some versions of MIUI (mainly MIUI 12 and below) have a hidden option to reset the gallery password through the security menu.This method does not require root rights or a computer, but does not work on all devices.

Instructions:

  1. Open the Settings. β†’ Passwords and security.
  2. Scroll down and find the Privacy (or Privacy) section.
  3. Select Application Lock (App Lock).
  4. Enter the current lock password (if installed). If not, the system can request confirmation from the fingerprint.
  5. In the list of blocked applications, find the Gallery and click on it.
  6. Select Remove Password and confirm the action.

If there is no gallery item on the list, try an alternative path:

  • Open the gallery and enter the wrong password 5 times in a row. the system can suggest resetting it through the Forgotten password?
  • Click on the link and follow the instructions, and you may need to enter your Mi Account password or answer a check question.

⚠️ Attention: On devices with MIUI 13/14 (for example, Xiaomi 13 Pro or Redmi Note 12) This method is often blocked by security policies, and if the gallery still requests a password after reset, then proceed to the following methods.

β˜‘οΈ Preparation for resetting the gallery password

Done: 0 / 5

Method 3: Using ADB to remove the blockage (for advanced ones)

If standard methods didn’t work and USB debugging was enabled before locking, you can try resetting the gallery password via ADB (Android Debug Bridge), a method that requires a computer and basic command line knowledge, but doesn’t delete data from the phone.

What you need:

  • πŸ’» Computer with Windows/Linux/macOS and installed Xiaomi drivers.
  • πŸ”Œ Cable USB (preferably original).
  • πŸ“¦ Utility. ADB Tools by Google.
  • πŸ”§ Included debugging by USB on the phone (if not, the method will not work!).

Step-by-step:

  1. Download and unpack the platform-tools on your computer.
  2. Connect the phone to the PC and allow debugging by USB (on the smartphone screen should appear a window with a request).
  3. Open the command prompt (or Terminal on macOS/Linux) and go to the platform-tools folder.
  4. Enter the command to check the connection: adb devices If the device appears in the list, continue.
  5. Run a command to reset the gallery password: adb shell pm clear com.miui.gallery This command clears the gallery app data, including lock settings.
  6. Reboot the phone. Once turned on, the gallery will be unlocked, but all albums and sorting settings will be reset.

If the pm clear command doesn’t work, try the alternative:

adb shell settings delete secure lockscreen.password_type

This command resets the type of lock screen, which sometimes affects the password of the gallery.

What if the ADB can’t see the device?
1. Check if debugging is included on USB In Settings β†’ 2. Install Xiaomi drivers from the official website (Support section). 3. Try another one. USB-cable (preferably original). 4. Restart your phone and computer. 5. If you use Windows, check the Device Manager for an exclamation mark next to the ADB Interface.

Method 4: Reset via Safe Mode (Safe Mode)

If the gallery is blocked by a third-party application (such as AppLock or Vault) rather than the MIUI system function, you can try removing the application through Safe Mode, which disables all third-party programs, allowing you to access the settings.

How to Sign In to Safe Mode on Xiaomi:

  1. Press the power button until the shutdown menu appears.
  2. Press and hold the "Stop" (or "Power off") option until a request to go to Safe Mode appears.
  3. Confirm the action. The phone will reboot, and in the lower left corner of the screen, the message "Safe Mode" will appear.

Further action:

  • Open Settings β†’ Applications β†’ Application Management.
  • Find an app that blocks the gallery (like AppLock, Gallery Vault, or KeepSafe).
  • Press Remove or Stop.
  • Restart your phone as normal. Check access to the gallery.

If the lock is installed by MIUI and not by third-party software, Safe Mode won't help.

πŸ’‘

Safe Mode does not reset system passwords, but allows you to remove third-party applications that interfere with access to the gallery, which works only if the lock is not installed through the MIUI settings.

Method 5: Hard reset (last chance)

If no other method has worked, it leaves a full reset (hard reset) that removes all data from your phone, including photos, contacts and apps, so use it only as a last resort. On devices with MIUI 14 and a Snapdragon 8 Gen 2 chip (such as the Xiaomi 13 Ultra), the reset can take up to 10 minutes.

How to make a hard reset on Xiaomi:

  1. Turn off the phone.
  2. Press the Power + Volume buttons up at the same time and hold for 10-15 seconds until the Mi logo and the Recovery Mode appear.
  3. Use the volume buttons for navigation and the power button to select the Wipe Data (or Clear Data) item.
  4. Confirm the action by selecting Wipe All Data.
  5. After the reset is complete, select Reboot to reboot.

Important nuances:

Model/firmwareFeatures of dischargeTime to recover
Redmi Note 10/11 (MIUI 12–13)Requires confirmation via Mi Account after reset5-7 minutes
POCO F3/F4 (MIUI 13 for POCO)Can request an old password after rebooting3-5 minutes
Xiaomi 12/13 (MIUI 14)Reset also deletes data from the memory card (if it is encrypted)8-12 minutes
Redmi K50 (MIUI 13.5)Factory settings recovery doesn't always reset gallery password6-10 minutes

⚠️ Warning: On devices with encrypted storage (Settings option) β†’ Additionally. β†’ Encryption) a data reset can make the phone unusable without a password from your Mi Account. If you don't remember your account details, contact Xiaomi's service center.

Frequent Mistakes and How to Avoid Them

When you try to remove a password from a gallery, users often encounter typical problems, and here are the most common mistakes and ways to solve them:

  • πŸ”„ "After resetting, the gallery still asks for a β€œpassword” – this means that the lock is tied to the Mi Account. Try method 1 or contact Xiaomi with proof of ownership of the device.
  • πŸ“± "ADB Does not see the device – check if debugging is enabled USB, Install the drivers and try another cable. MIUI 14 may require additional permission in Settings β†’ Additionally. β†’ For developers β†’ Allow debugging by USB.
  • πŸ” "I can't log in to Mi" - restore access via account.xiaomi.com. If an old phone number is tied, contact support with a purchase check.
  • ⚠️ "After hard reset, the phone requires an old password, which means Factory Reset Protection is enabled (FRP). To unlock, you need data from the Mi Account that was on the phone before the reset.

If you bought the phone with your hands and the previous owner did not untie the account, contact him to transfer data. Otherwise, you can unlock the device only through the official Xiaomi service (you need a check or a box from the phone).

Can I remove a password from the Xiaomi gallery without resetting data?
Yes, in most cases. Try the 1-3 methods in this article: unlock through Mi Account, reset in security settings, or use ADB. Reset (method 5) is only needed if other methods have not worked or the lock is tied to the previous owner's account.
Why is the gallery still blocked after being dumped through Recovery?
This happens if: Lock is tied to your Mi Account, not your local password. The phone has data encryption enabled (Settings β†’ Additional β†’ Encryption). You use Xiaomi with a MediaTek chip (e.g. Redmi 9A), where resets don't always clear system applications. Solution: Try logging in to your Mi Account after a reset or contact a service center.
Does the ADB work on Xiaomi 13 Pro with MIUI 14?
Partially. On Xiaomi's new flagships (e.g. 13 Pro, 13 Ultra), the adb shell pm clear com.miui.gallery command may fail due to enhanced protection. In this case: Try the alternative command: adb shell am start -n com.miui.gallery/.activity.SafeCenterActivity. If USB debugging is disabled, turn it on via Settings β†’ About Phone β†’ MIUI Version (click 7 times, then return to Additional β†’ For developers).
How to protect the gallery after removing the password?
To avoid re-blocking: Use your Mi Account to sync passwords so they are easier to recover. Set a graphical key instead of a password. PIN-It's harder to forget, back up your photos to Google Photos or your computer. Enable two-factor authentication for your Mi Account (in your security settings).
What if the phone requires a password from the old Mi Account after a reset?
This is Factory Reset Protection (FRP) β€” protection against theft. Solutions: If your phone is: enter the Mi Account information that was on the device before the reset. If you bought it with your hands: contact the previous owner to transfer the account or provide a purchase check to the Xiaomi service center. To bypass FRP on older models (for example, Redmi 5/6), you can use special utilities like Mi Account Unlock Tool, but this violates the warranty.