How to unlock a gallery on Xiaomi, if you forgot your password: all the ways

Forgot the gallery password on Xiaomi and can't view personal photos? This problem is familiar to many owners of Redmi, POCO and Mi smartphones - the built-in privacy protection feature MIUI sometimes plays a cruel joke. Fortunately, you can unblock without completely resetting your phone, even if you don't have a backup.

In this article, we will discuss 5 working methods, including official and alternative solutions. You will learn how to circumvent password through Settings, use Mi Account, apply ADB-Important: some methods require prior preparation (for example, enabled debugging by the USB), Therefore, carefully read the conditions of each method.

All instructions are tested on the latest versions of MIUI 14 (including HyperOS) and are relevant for models from 2020-2026: Xiaomi 13/14, Redmi Note 12/13, POCO F5/X5 and others. If your smartphone is older, check the compatibility of methods in the FAQ at the end of the article.

πŸ“Š What kind of smartphone you Xiaomi?
Xiaomi (series 11/12/13/14)
Redmi (Note, K-series)
POCO (F, X, M-series)
Black Shark
Other

1. Password withdrawal via Mi Account (official method)

The most reliable and safe method is to use a linked Mi Account.

  • πŸ”Ή You remember the username/password from Mi Account (or tied) email/phone).
  • πŸ”Ή The phone has internet (Wi-Fi or mobile data) on it).
  • πŸ”Ή The device was not reset to factory settings after locking the gallery.

Instructions:

  1. Open the Gallery app and enter any password 5 times in a row until the message β€œForgot your password?” appears.
  2. Click on this caption β†’ select β€œReset password through Mi Account”.
  3. Enter your account details (email or phone number) and confirm the login.
  4. Follow the system’s prompts – the password will be reset automatically.

⚠️ Note: If you have previously disabled sync with Mi Account or deleted your account from your phone, this will not work, and it is not available on devices with an unlocked bootloader).

πŸ’‘

If you don’t have access to your Mi Account’s primary email/phone, try restoring it via [Xiaomi official website] (https://account.xiaomi.com). Use a backup email or linked number to reset your password.

2.Use of the recovery mode (Recovery Mode)

This method works if you don't remember the Mi Account data, but you're ready for partial data loss. It works through Recovery Mode, Xiaomi's built-in recovery mode. Importantly, it will delete the gallery password, but save the photos and videos themselves (unless you choose a full reset).

Step-by-step:

  1. Turn off the phone with a long press of the power button.
  2. Press Volume Up + Power and hold for 10-15 seconds until the Mi logo appears.
  3. From the Recovery menu, select the language β†’ Wipe & Reset.
  4. Click Wipe All Data (Do not choose Format Data – it will erase everything!).
  5. Confirm the action and wait for the reboot.

After turning on the phone, the gallery password will be reset, but:

  • πŸ”Έ Apps and settings will remain intact.
  • πŸ”Έ You will need to log in to accounts (Google, social networks, etc.).
  • πŸ”Έ If the gallery was protected through a Private Album, its contents may be hidden – see Section 4.
What happens if the Recovery Mode does not open?
If the combination Volume up + Power does not work, try: 1. Volume down + Power (on some POCO models). 2. Connect the phone to the PC and use the adb reboot recovery command (on USB debugging is required). 3. On older models (Redmi 4/5) you may need to press all three buttons: Volume up + Volume down + Power.

3. Delete password through ADB (for advanced users)

If you have debugging enabled USB (USB Debugging, you can delete the gallery password using ADB β€” This is a tool for controlling Android through a computer, which doesn't require a data reset, but requires minimal technical skills.

What you need:

  • πŸ–₯️ Computer with Windows/macOS/Linux.
  • πŸ”Œ USB-cable (original, do not damage the port!).
  • πŸ“₯ Installed drivers Xiaomi and ADB Tools.

Instructions:

1. Connect the phone to the PC and allow debugging (the phone will be asked).


2. Open the command prompt (Windows) or terminal (macOS/Linux) in the folder with ADB.




3. Enter the commands in turn:





adb shell




su




rm /data/system/locksettings.db




rm /data/system/locksettings.db-wal




rm /data/system/locksettings.db-shm




reboot





4.After the reboot, the gallery password will be reset.

⚠️ Note: Su commands require root rights. If they don't, use an alternative method:

adb shell


pm clear com.android.gallery3d




reboot

This will clear the Gallery app data, but save the media files.

Make sure USB debugging is enabled (Settings β†’ About Phone β†’ MIUI Version β†’ 7 times Press β†’ Additional β†’ Developers β†’ USB debugging)

Download ADB Tools and unpack it into a separate folder.

Connect your phone with the original cable (don’t use hubs!)

Run the command line on behalf of the administrator (Windows)-->

4 Unlocking the "Private Album" (Hidden Files)

If you used the "Private Album" feature in the Xiaomi Gallery, the standard password reset methods may not work. Files from this album are stored in encrypted form and are linked to your Mi Account. Here's how to return them:

Method 1: Mi Account (if the album is synced):

  1. Sign in to i.mi.com from the same account as your phone.
  2. Go to Cloud β†’ Gallery β†’ Private Album
  3. Download the files to your PC, then transfer them back to your phone.

Method 2: File Manager (if the album is not synced):

  • πŸ“ Use a file manager (e.g., Mi File Explorer or Solid Explorer).
  • πŸ” Cross the path: /storage/emulated/0/MIUI/PrivateAlbum/.
  • πŸ”“ Files will be with the.enc extension – they need to be renamed to.jpg/.mp4 and open through the standard gallery.

⚠️ Warning: PrivateAlbum files are encrypted with a key attached to the device. If you reset your phone to factory settings without a backup, you can't recover them!

5. Alternative methods (without loss of data)

If the previous methods didn’t help, try these options:

MethodConditionsRisks.Efficiency
Reset gallery settingsDebugging by USB is not necessaryThe application settings will be deleted, the media files will be saved70%
The Mi Unlock ToolRequires a PC and unlocked bootloaderThis may result in the blocking of Mi Accounts.80%
Recovery through TWRPInstalled custom TWRP recaveryRisk of β€œbriefing” with incorrect actions90%
Contacting the service centerAvailability of a check/guaranteePossible refusal in the absence of evidence of ownership95%

To reset gallery settings without ADB:

  1. Go to Settings β†’ Applications β†’ Application Management.
  2. Find the gallery β†’ Warehouse β†’ Clear the data.
  3. Confirm the action and restart the phone.

πŸ’‘

If none of the methods worked and the files in the gallery are critical, contact the official Xiaomi service center. Provide proof of purchase (check, box) - this will increase the chances of unlocking without losing data.

To avoid having to deal with the problem of a blocked gallery, follow these tips:

  • πŸ” Use biometric unlocking (fingerprint or facial recognition) instead of PIN-code.

Also check the privacy settings:

  1. Open the gallery. β†’ Settings (βš™οΈ) β†’ Private album.
  2. Turn off the β€œBlock on exit” option if it is active.
  3. Set a password reminder (e.g., in Google Keep).

If you often forget passwords, consider alternative ways to protect yourself:

  • πŸ“± Hidden folders in file managers (e.g. Files by Google).
  • πŸ”— Encrypted archives (by means of 7-Zip or RAR).
  • 🌐 Cloud Storage with Two-Factor Authentication (Mega, pCloud).
❓ Can I remove my password from the gallery without losing my photo?
Yes, if you use Mi Account (section 1) or ADB (section 3), these methods don't affect media files. If you choose to reset via Recovery, the photos will remain, but the application settings will reset.
❓ Are these methods working on POCO F5/X5?
Yes, all methods are POCO compatible, as these smartphones run on MIUI (or HyperOS), except for custom firmware models (like the POCO X3 Pro on Pixel Experience), where a different approach may be required.
❓ What to do if you forget your Mi Account password?
Restor access via the official website: Click on β€œForgot your password?” Select the recovery method (email/phone). Follow the instructions in the letter or SMS. If the linked number/email is not available, contact Xiaomi with proof of ownership of the device.
❓ Why did you reset your password through Recovery?
This happens if you chose Format Data over Wipe All Data. In this case: Repeat the procedure and select Wipe All Data. If it didn't work, use ADB (Section 3) or Mi Unlock Tool. On some models (Redmi Note 10 Pro and later), the gallery password is stored in a separate section - it needs to be cleared through fastboot.
❓ Can I unlock a gallery on Xiaomi without a computer?
Yes, but the choices are limited: πŸ”Ή Mi Account (Section 1) – if you remember the data. πŸ”Ή Recovery reset (Section 2) – if you are prepared for partial data loss. πŸ”Ή Cleaning the gallery data (section 5) - through the phone settings (ADB, TWRP) computer is mandatory.