How to set a password for a gallery on Android Xiaomi: all ways to protect photos and videos

Personal photos and videos on smartphones often contain sensitive information that you want to hide from prying eyes. On Xiaomi, Redmi and POCO devices running MIUI, there are several ways to password protect the gallery, from built-in features to third-party applications. But not all methods are equally reliable: some are easy to get through the file manager, and others require root rights.

In this article, we will discuss 5 working ways to set a password to a gallery, including hidden MIUI features, folder encryption, and using Googleโ€™s Safe Folder.We will also explain why the standard โ€œClockโ€ in the Xiaomi Gallery is not always secure and how to combine the methods correctly for maximum protection.

If youโ€™re using an Android 12+ smartphone with MIUI 13/14, some of the features may be different โ€” weโ€™ll give you nuances for different versions, and for owners of older models (such as the Redmi Note 8 Pro or Mi 9T), weโ€™ll give you alternative solutions, since they donโ€™t have a built-in Safe Folder.

๐Ÿ“Š What Xiaomi model do you use?
Redmi Note 12/13
POCO X5/F5
Mi 11/12
Redmi 10/9
Another model

The most obvious way to hide a photo is to use the built-in "Castle" feature in the Gallery app, which is available on all Xiaomi devices with MIUI 10 and later, to activate it:

Steps:

  1. Open the Gallery app.
  2. Choose the photos/videos you want to hide (you can select several files).
  3. Click on three dots in the upper right corner โ†’ Block.
  4. Set a password (if not previously set up) or use a fingerprint.

After that, the files will disappear from the main gallery and will be available only in the Blocked section (password access).

Advantages:

  • ๐Ÿ”น Quickly and without additional applications.
  • ๐Ÿ”น Support for biometrics (fingerprint/face).
  • ๐Ÿ”น Files are not deleted, but simply hidden.

Disadvantages:

  • โš ๏ธ Files stay in the folder. DCIM/.lock and can be found through a file manager (e.g., Files by Google).
  • โš ๏ธ Password resets when resetting phone settings.
  • โš ๏ธ No cloud backup of blocked files.

๐Ÿ’ก

To increase protection, move your locked files to Safe Folder (see next section) or use folder encryption via MIUI Security.

2. Googleโ€™s Safe Folder: A Reliable Alternative

If you use MIUI 12.5 or later, it has built-in support for Google's Safe Folder, a secure folder that is encrypted at the Android level. Unlike the standard Lock, files are stored in encrypted form and are not accessible without a password even through a PC.

How to set up:

  1. Open Google Files (if not, install from the Play Market).
  2. From the menu, select Safe Folder โ†’ Setting up.
  3. Install. PIN-code or pattern lock (minimum 4 characters).
  4. Move the files to the folder through the Add Files button.

Advantages:

  • ๐Ÿ”’ Full file encryption (even when connected to a PC, they are not visible).
  • ๐Ÿ”„ Sync with Google Drive (optional).
  • ๐Ÿ›ก๏ธ Recovery Reset Protection (files remain encrypted).

Limitations:

  • โš ๏ธ Not working. MIUI below 12.5 (for example, on the Redmi Note 9 Pro with the MIUI 12).
  • โš ๏ธ Requires authorization in Google account.
What if Safe Folder is not displayed?
If Google Files does not have a Safe Folder section, upgrade the app to the latest version or clear the cache through Settings โ†’ Apps โ†’ Files โ†’ Storage โ†’ Clear Cache. On some Xiaomi firmware, the feature is hidden - try changing the region to India in your phone settings (Safe Folder may appear after the reboot).

3. folder encryption via MIUI Security (for advanced)

On devices with MIUI 13/14, there is a hidden feature that encrypts folders through the MIUI Security app, which creates a secure storage area where you can transfer any files, including photos and videos.

Instructions:

  1. Open Security โ†’ Privacy โ†’ Encrypted folder.
  2. Click Create and set a password (other than locking the screen!).
  3. Transfer files to the folder through Add Files.

Features:

  • ๐Ÿ” Password is requested every time you open the folder.
  • ๐Ÿ“ Files are physically moved to encrypted storage (/storage/emulated/0/MIUI/PrivateFolder).
  • ๐Ÿšซ It does not work on custom firmware (e.g. Pixel Experience).

Important: If you forget your password, you canโ€™t restore access to files, even through resetting settings or connecting to a PC. We recommend writing your password to a secure location (for example, in Google Password Manager).

Backup of important files|Remember your password (do not use your date of birth)|Check the space (encryption increases the file size on the ~5%)|Disable autosynchronization with the cloud (OneDrive, Google Photos)-->

Third-party applications: when embedded functions are not enough

If standard methods donโ€™t work (e.g., on older versions of MIUI or after rooting), you can use third-party apps.

Top.-3 gallery-blocking:

AnnexFeaturesCons
GalleryVault๐Ÿ”น Encryption AES-256๐Ÿ”น False password (bait folder)๐Ÿ”น Backup to the cloudโš ๏ธ Requires storage rightsโš ๏ธ Advertising in the free version
KeepSafe๐Ÿ”น PIN/print/face๐Ÿ”น Automatic concealment during clotting๐Ÿ”น Support MIUI 11+โš ๏ธ Limit the number of files in the free version
Private Photo Vault๐Ÿ”น Local encryption๐Ÿ”น Built-in viewer๐Ÿ”น No mandatory registrationโš ๏ธ Interface in Englishโš ๏ธ No sync with Google Drive

Before installing, check the application permissions in Settings โ†’ Applications โ†’ Permissions. Opt out of programs that request access to SMS, Contacts or Geolocation โ€“ this is unnecessary to block the gallery.

How to install and configure:

  1. Download the app from the Play Market (donโ€™t use APK from unknown sources!).
  2. Launch and set a master password (we recommend at least 8 characters).
  3. Import files through the built-in file manager.
  4. Enable the option to Hide from the Gallery (if any).

๐Ÿ’ก

The side of the application is convenient, but less reliable than the built-in MIUI features. Risks: data leakage through vulnerabilities, blocking after an Android update, file loss when a phone is reset.

5. Hiding a folder through a file manager (no password, but effective)

If you donโ€™t need a password, but simply hide a photo from random glances, you can rename the photo folder by adding a dot to the beginning of the name (for example,.PrivatePhotos), which is not displayed in most file managers and galleries by default.

How to hide the folder:

  1. Connect your phone to your PC or use a file manager (such as Mi File Manager).
  2. Go to /storage/emulated/0/DCIM/.
  3. Rename the target folder by adding a dot:.Secret.
  4. Reboot the phone.

How to regain visibility:

Enable the display of hidden files in the file manager settings (in Mi File Manager: three points โ†’ Settings โ†’ Show hidden files).

โš ๏ธ Note: this method does not protect files from targeted search. Anyone who knows the path can open the folder through Total Commander or FX File Explorer.

6 Additional Security Measures: What to Do If Your Phone Is Stolen

If you put a password on the gallery, it's only part of the protection, and if the phone gets into the wrong hands, an attacker can bypass the lock via Recovery or a PC connection, to minimize the risks:

Checklist for maximum security:

  • ๐Ÿ” Install. PIN-lock screen code (at least 6 digits).
  • ๐Ÿ”„ Enable phone encryption in Settings โ†’ Additionally. โ†’ Encryption.
  • ๐Ÿ“ฑ Turn off the debugging. USB (Settings โ†’ The phone. โ†’ Version. MIUI โ†’ 7 times press โ†’ For developers โ†’ Debugging by USB).
  • โ˜๏ธ Set up a remote cleanup via Find My Device (Google) or Mi Cloud.

If the phone is stolen:

  1. Block it through Google Find My Device.
  2. Delete the data remotely (if encryption is enabled, the files will not be available even after resetting).
  3. Change the passwords from accounts (Mi Account, Google, social networks) associated with the device.

Critical information: On Xiaomi devices with bootloader unlocked, any password can be reset via Fastboot. If you bought the phone from hand, check the lock status through the command fastboot oem device-info (must be Device unlocked: false).

๐Ÿ“Š Have you ever lost a phone with important data?
Yeah, and it was a disaster.
Yeah, but it's all fine.
No, but I'm afraid of that scenario.
No, I always have backups.
Can I put a password on individual photos, not the entire gallery?
Yes, in the standard Xiaomi gallery, you can block individual files: highlight them โ†’ three dots โ†’ Lock. This also supports applications like GalleryVault (you can create separate albums with different passwords).
Why did the blocked photos disappear after resetting the settings?
The standard lock in the MIUI gallery is linked to your Mi Account. If you reset your phone without a backup, the files in the.lock folder are deleted. To avoid loss, use Safe Folder or third-party cloud backup apps.
How to get around the password in the gallery if you forgot it?
Methods depend on the method of blocking: Standard "Clock": reset password through Settings โ†’ Passwords and security โ†’ Password of the Gallery app (required) PIN Safe Folder: Restor access through your Google account (if sync is enabled). App side: Use password recovery (if you have email binding). โš ๏ธ If nothing works, you only have to reset your phone (but the files will be lost!).
Does gallery locking work on custom firmware (like LineageOS)?
No, features like Safe Folder or Lock in MIUI only work on stock firmware. For custom ROMs (like LineageOS, Pixel Experience), use third-party apps (GalleryVault, KeepSafe) or encrypt folders through Cryptomator.
Can I hide the gallery from other users on one phone (Guest mode)?
Yes, MIUI has a Second Space feature (Settings โ†’ Special Features โ†’ Second Space) create a separate profile with limited access to files, and you can also use Guest Mode (some Xiaomi models call it Private Mode).