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.
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:
- Open the Gallery app and enter any password 5 times in a row until the message βForgot your password?β appears.
- Click on this caption β select βReset password through Mi Accountβ.
- Enter your account details (email or phone number) and confirm the login.
- 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:
- Turn off the phone with a long press of the power button.
- Press Volume Up + Power and hold for 10-15 seconds until the Mi logo appears.
- From the Recovery menu, select the language β Wipe & Reset.
- Click Wipe All Data (Do not choose Format Data β it will erase everything!).
- 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?
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
rebootThis 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):
- Sign in to i.mi.com from the same account as your phone.
- Go to Cloud β Gallery β Private Album
- 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:
| Method | Conditions | Risks. | Efficiency |
|---|---|---|---|
| Reset gallery settings | Debugging by USB is not necessary | The application settings will be deleted, the media files will be saved | 70% |
| The Mi Unlock Tool | Requires a PC and unlocked bootloader | This may result in the blocking of Mi Accounts. | 80% |
| Recovery through TWRP | Installed custom TWRP recavery | Risk of βbriefingβ with incorrect actions | 90% |
| Contacting the service center | Availability of a check/guarantee | Possible refusal in the absence of evidence of ownership | 95% |
To reset gallery settings without ADB:
- Go to Settings β Applications β Application Management.
- Find the gallery β Warehouse β Clear the data.
- 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.
6 How to avoid blocking the gallery in the future
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:
- Open the gallery. β Settings (βοΈ) β Private album.
- Turn off the βBlock on exitβ option if it is active.
- 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).