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

Forgot the gallery password on Xiaomi, Redmi or POCO and can't view personal photos? This problem is familiar to many users, especially after updating MIUI or resetting the phone to factory settings. Unlike locking the screen, the gallery password is often set randomly - for example, when setting up a Secure folder or turning on the Private Album feature.

In this article, you will find 5 working ways to remove your password from the gallery on Xiaomi, including official methods through settings. MIUI And alternative solutions for root-access devices, and we'll also look at what to do if you don't remember the pattern lock or the key. PIN-Important: some methods require prior preparation, such as linking a Mi Account or backing up data.

In Xiaomi smartphones, gallery protection is implemented at the MIUI firmware level and can be activated in three cases:

  • πŸ”’ Protected folder (Private Folder) - built-in function MIUI, which encrypts selected files and requires a password every time you open.
  • πŸ“ Private Album – a hidden section of the gallery, access to which is limited PIN-fingerprint.
  • πŸ”„ Data portability – after resetting settings or updating MIUI The system may request a password to restore access to media files.

In most cases, the gallery password matches the screen lock password or PIN-code SIM-However, if you have changed this data or used third-party encryption applications (such as AppLock), unlocking may require additional actions. MIUI 12 and later also binding to the account Mi Account - without it, resetting the password of the gallery is impossible.

πŸ“Š What kind of smartphone you Xiaomi?
Redmi Note 10/11/12
POCO X3/X4/X5
Mi 11/12/13
Another Xiaomi
Not Xiaomi.

Method 1: Removing password through MIUI settings (official method)

If you remember the screen lock password or the Mi Account attached, use the built-in MIUI tools:

  1. Open the Settings app and go to the Passwords and Security section.
  2. Select the "Private Folder" option.
  3. Enter the current screen lock password or confirm with a fingerprint.
  4. Click on the three dots in the top right corner and select Remove the protected folder.

If this method does not work, try an alternative method:

Settings β†’ Applications β†’ Application Management β†’ Gallery β†’ Memory β†’ Clear data

⚠️ Warning: Clearing the gallery data will delete all application settings, including albums and tags, but will not affect the photos themselves on the device. However, if files have been encrypted (for example, in Private Folder), they may become inaccessible.

Backup photos on your PC or cloud

Check the binding of Mi Account (Settings β†’ Xiaomi Account)

Make sure your phone is over 50% charged

Remember the screen lock password (may be required)-->

Method 2: Unlock with Mi Account (if you forget your password)

If you don’t remember the password, but the phone is linked to your Mi Account, use the Recovery feature:

  1. Go to Settings β†’ Xiaomi Account and make sure you are logged in.
  2. Open the Secure folder in the gallery and click Forgot your password.
  3. The system will offer to confirm the identity through SMS or email linked to Mi Account.
  4. After confirmation, you can set a new password or disable protection.

This method only works when you’re connected to the Internet. If MIUI requests the old password even after you’ve recovered, try restarting your phone and repeating the procedure. Some models (like the Redmi Note 10 Pro) may require additional confirmation via Find Device.

What to do if your Mi Account is not tied?
If the Xiaomi account was not tied before the gallery was blocked, official recovery methods are not available, in which case only alternative methods remain: resetting settings (with loss of data) or using the device. ADB-commands (requires root rights).

If previous methods didn’t work, try resetting only the Gallery apps settings without affecting system data:

  1. Go to Settings β†’ Applications β†’ Application Management.
  2. Find the Gallery app (or Mi Gallery) and open its settings.
  3. Click Warehouse β†’ Clear the data and Clear the cache.
  4. Reboot the phone.

After this procedure, the gallery protection will be reset, but all photos will remain in place - they are stored in the DCIM folder on internal memory. However, if you used the Secure folder, the files from it may disappear (they are encrypted and stored in a separate container).

/storage/emulated/0/MIUI/PrivateFolder/

⚠️ Attention: On devices with MIUI 14+ And by file-based encryption, a gallery reset can cause you to lose access to encrypted media files.

Method 4: Using ADB to bypass protection (for advanced users)

If you have access to USB-debugging and computer, you can try to delete the gallery password through ADB (Android Debug Bridge is suitable for root-free devices, but requires pre-configuration:

  1. Activate Developer Mode: Go to Settings β†’ About Phone and click on MIUI Version 7 times.
  2. Back to Settings β†’ Additionally. β†’ For developers and include USB-debugging.
  3. Connect your phone to your PC, install ADB Tools and execute the command:
adb shell pm clear com.miui.gallery

This command will reset the gallery settings, including the password. USB-Debugging is blocked, try an alternative method via Fastboot (requires an unlocked bootloader):

fastboot erase userdata

Note that the last command will perform a complete reset by removing all data from the device. Use it only as a last resort!

πŸ’‘

If ADB does not recognize the device, try updating drivers through the Mi Flash Tool or using the original USB-Xiaomi cable.

Method 5: Delete password via TWRP (root required)

For users with an unlocked bootloader and installed TWRP, the most reliable method is available - editing system files:

  1. Upload the phone to TWRP Recovery (clip Power + Volume up).
  2. Go to Advanced β†’ File Manager.
  3. Find the file on the path /data/system/locksettings.db and delete it.
  4. Reset the device.

This method removes all passwords, including screen locking and PIN-code SIM-If the gallery still requests a password after the reboot, check if the files are in the folders:

  • πŸ“‚ /data/data/com.miui.gallery/shared_prefs/ β€” Delete files with the.xml extension.
  • πŸ” /data/system/users/0/ β€” Find the files associated with lock_pattern password.

Some models (POCO F3, Xiaomi 11T) may require additional deletion of encryption keys in /data/misc/vold/. Be careful: wrong actions in TWRP can lead to a device blink!

πŸ’‘

Using TWRP is the most efficient way, but it is only suitable for users with unlocked bootloader and root rights. On devices with locked bootloader, this method will not work.

Frequent Mistakes and How to Avoid Them

When trying to remove a password from a gallery, users often face typical problems:

Mistake.Reason.Decision
Wrong password after resetCash galleries not fully clearedRepeat data cleanup or use ADB
Mi Account is not confirmedThe device is not tied to the accountRestoring access via findmi.com
Files disappeared after unlockingEncrypted data in a private folderTry to restore it through DiskDigger.
ADB does not see the deviceThere are no drivers or USB-debuggingInstall Mi PC Suite and check the settings

If none of the methods worked, check:

  • πŸ”„ Version MIUI β€” on MIUI 14+ Additional confirmation may be required via Mi Cloud.
  • πŸ“± Phone model – on some devices (e.g. Redmi) K50) hardware-encrypted.
  • πŸ”§ Third-party apps – if you installed AppLock or Vault, the password could be set through them.
Can I remove a password from the Xiaomi gallery without resetting the settings?
Yes, if you remember the lock password or the attached Mi Account. Use official methods through Settings β†’ Secure folder or restore through account. If the password is lost and there are no root rights, it is almost impossible to circumvent the protection without losing data.
What if the photos are missing after the gallery is dropped?
Files could be stored in a Secure folder that is encrypted. Try to find them through the file manager on the path /storage/emulated/0/MIUI/PrivateFolder/. If the folder is empty, restore the data using DiskDigger or Recuva (you need a PC connection).
Does the ADB work on MIUI 14?
Newer versions of MIUI may require additional confirmation via Mi Account even when using ADB. If the adb shell pm clear com.miui.gallery does not work, try disabling MIUI Protection in the security settings first.
How do I know if my photos are encrypted in the gallery?
Open the file manager and check the folder. DCIM. If the photos are displayed as normal files (for example, IMG_2023.jpg), If you see files with an enc or.dat extension instead, it means that the data is encrypted and requires a password to decrypt it.
Can I unlock the gallery through the Xiaomi service center?
In theory, yes, but in practice, service centers rarely help unlock a gallery without proof of ownership of the device (check, box, tied account), in most cases they will offer a complete reset, which will lead to data loss.