Forgot your gallery password on Xiaomi and can't see your photos? Or did you buy your phone with your hands and the previous owner didn't remove the protection? The blocked gallery problem is one of the most common among MIUI users. In this article, we will analyze all the current ways of unlocking (including hidden MIUI 14/15) features, their pros and cons, and also give a checklist for secure access restoration.
We warn you right away: some methods require technical skills or lead to data loss. For example, a Fastboot reset will delete all files from internal memory, and using ADB can disrupt the system if you execute commands incorrectly. So read the instructions carefully and try the safest options first.
If the gallery is not blocked by a password, but due to a system failure (for example, after updating). MIUI Or if you have a phone crash, try rebooting the device, sometimes it helps you regain access without any further manipulation, but if the problem is that you've forgotten the device. PIN-code or pattern lock β read on.
1. Unblock the gallery through the Mi Account (the safest way)
If your Xiaomi has a Mi Account attached, you can restore access to the gallery without losing data.This method works on most devices with MIUI 12 and later, but requires an Internet connection.
How to do this:
- On the gallery lock screen, click Forgot Password? (or Forgot Password? on English firmware).
- Select the recovery option through Mi Account.
- Enter the username and password from your Xiaomi account.
- Confirm unlocking via SMS or email (if two-factor authentication is enabled).
β Pros of the method:
- π No need to reset settings or technical knowledge.
- πΈ Stores all photos and videos in the gallery.
- π It works even on locked phones (if you remember the data from the account).
β οΈ Note: If you bought the phone with your hands and don't know the previous owner's details, this method won't work.
If the buttons Forgot your password? no, then your device is using the old version of MIUI (up to 11th). In this case, try updating the system through Settings β About Phone β System Update or use alternative methods.
2. Reset gallery password via MIUI settings (without data loss)
On some Xiaomi models (e.g. Redmi Note) 10/11, POCO X3/X4) You can reset the gallery password right in the settings if you remember the main one. PIN-This method does not delete files, but requires access to the system.
Step-by-step:
- Open Settings β Applications β Application Management.
- Find the Gallery app (or Mi Gallery) in the list and tap it.
- Select Warehouse, then Clear Data (not to be confused with Clear Cache!).
- Confirm the action by entering PIN-lock-screen code or pattern lock.
After that, the gallery will reset to factory settings and the password will be removed, but all the albums, hidden folders and sorting settings will be reset β they will have to be reconfigured.
Backup important photos (via Google Photos or computer)
Remember current album settings (hidden folders, favorites)
Make sure you know. PIN-lock-screen
Check the available space on the phone (needs at least 500 MB)
-->
β οΈ Attention: On some firmware (MIUI Global for European Region) Clear data may be hidden. If it is not available, try changing the region to India (this is temporary and will not affect the phoneβs performance).
If this method didnβt work, you may have password reset protection on your device (often found on Xiaomi for the Chinese market), so move on to the following methods.
3. Unlock through ADB (for advanced users)
If previous methods didnβt work, you can try removing the gallery password through ADB (Android Debug Bridge), which requires USB debugging enabled and only works if youβve previously activated it in the developer settings.
What you need:
- π₯οΈ A computer with installed Xiaomi drivers and ADB.
- π± USB-cable (preferably original).
- π§ Included debugging by USB (Settings β The phone. β Version. MIUI β Tap 7 times, then return to the Additional Settings β For developers β Debugging by USB).
Instructions:
- Connect the phone to the computer and confirm the debugging permission on the smartphone screen.
- Open the command prompt (or Terminal on Mac/Linux) and type: adb shell pm clear com.miui.gallery
- Reboot the phone.
This command will completely reset the gallery settings, including the password, but hidden albums and some metadata may disappear. If the team doesn't work, try the alternative:
adb shell am start -n com.miui.gallery/.activity.SplashActivity --ez "reset_password" trueWhat if the ADB canβt see the device?
| Unlocking method | Is a reset required? | Do you need root rights? | Difficulty |
|---|---|---|---|
| Through the Mi Account. | β No. | β No. | β Easy. |
| Gallery data dumping | β No. | β No. | ββ Middle-Average |
| ADB-team | β No. | β No. | βββ Hardly. |
| Reset via Fastboot | β Yes. | β No. | ββββ Very difficult. |
4.Severe reset via Fastboot (extreme case)
If no other method has worked, you can completely reset your phone via Fastboot mode, which will remove all data from your device, including photos, contacts, and apps, and only use it if:
- π You donβt remember the password from your Mi Account.
- π± The phone is purchased from hand and it is impossible to contact the previous owner.
- π§ Other methods didn't work.
How to reset:
- Turn off the phone.
- Press the Volume Down + Power buttons before the Fastboot logo appears.
- Connect your phone to your computer and start the Mi Flash Tool (download from the official Xiaomi website).
- Select the firmware for your model and press Flash.
Once reset via Fastboot, the phone will be βlike newβ β all data, including photos in the gallery, will be permanently deleted. If the phone was enabled sync with Google Photos or Mi Cloud, some files can be restored.
β οΈ Note: On some models (Xiaomi) 12T, Redmi K50) After a Fastboot reset, you may need to unlock the bootloader, you need a Mi Account that has been tied to the device for more than 7 days, and without that, the phone will become a brick".
π‘
Before resetting, try extracting photos via TWRP (Castom Recovery) and installing TWRP for your model and copying files from /data/media/0/DCIM to your computer, however, this method requires an unlocked bootloader and technical skills.
5. Restoring access through third-party programs (risky!)
You can find programs like Mi Account Unlock Tool or Xiaomi Gallery Password Remover that promise to unlock the gallery without resetting.
- π‘οΈ Most of these programs contain viruses or spyware.
- π They often require root rights, which deprives the phone of the warranty.
- πΈ Some people ask for a βfull versionβ but donβt work.
If you do decide to do this, at least check the program through VirusTotal and create a restore point, but remember: there are no official tools from Xiaomi to unlock the gallery without resetting.
The only exception is the use of MTK Bypass Tool for MediaTek-based phones (e.g. Redmi) 9A, POCO C31). This tool allows you to bypass the lock MI-account, but does not guarantee the safety of 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 the same thing. PIN-lock screen and gallery code (but don't use simple combinations like 1234 or 0000).
- βοΈ Enable automatic photo sync with Google Photos or Mi Cloud.
- π Write your password in a secure location (for example, in the Bitwarden or KeePass password manager).
- π Make backups regularly through Settings β System system β Backup.
If you give your phone to your kids or friends often, it's best not to lock the gallery with a password, but instead to hide individual albums.
- Open the gallery and select the photos.
- Press More. β Hide.
- Hidden files will only be accessible through a special section (no password required).
π‘
The most reliable way to keep your photos safe is to sync to the cloud, and even if the gallery is blocked, you can download files from Google Photos or Mi Cloud to another phone.