How to put a code on the gallery on Xiaomi: protection of personal photos

Xiaomi’s smartphones hold a huge amount of personal information, among which photos and videos occupy a special place. Privacy becomes critical when a device falls into the wrong hands or is transferred for repair. Many users mistakenly believe that a standard password unlocking the screen is enough to protect all data inside the system.

In reality, MIUI and its successor HyperOS offer advanced encryption tools that work independently of the main lock. Hidden folder and application protection are the two main mechanisms that allow you to securely close access to media content. In this article, we will discuss in detail how to activate these features so that your pictures remain inaccessible to prying eyes.

The setup procedure does not require deep technical knowledge, but it is important to follow all the steps consistently for the correct operation of the security system. We will consider standard methods that do not require the installation of third-party software, which guarantees the stability of the system and the absence of background advertising. Understanding the principles of local protection will help you correctly allocate priorities for accessing your data.

Principles of operation of the MIUI security system

Xiaomi's shell security architecture is built on the principle of data isolation. When you activate protection for a particular application or folder, the system creates a virtual container with a separate encryption key. This key is not directly linked to the screen unlock code, which creates an additional layer of defense. Even if an attacker recognizes your primary pin, access to hidden albums will remain closed without a second password.

It's important to understand the difference between simple concealment and full encryption. Normal hiding only takes the icon or folder out of sight, but files remain accessible through file managers with administrator rights. Using the built-in Privacy Protection functionality allows for real cryptographic closure of data, which means that without entering special code or fingerprinting, content will look like a set of unreadable bytes.

⚠️ Attention: Forgotten passwords from hidden folders are almost impossible to recover without a pre-created Mi Account or an attached email.

The com.miui.gallery system process is responsible for displaying and managing media files, and it checks access rights when you try to open a secure album. If the Security settings are limited, the gallery will request authentication before rendering images, which protects even if the phone is unlocked and in the hands of another person.

πŸ“Š What method of photo protection are you using?
MIUI's Hidden Folder
Third-party calculator applications
Protection of the entire Gallery application
I don't use anything.

Activation of the hidden folder for photos

The most effective way to isolate images is to use the Hidden Album feature, which is built directly into the Gallery app and does not require downloading additional files. To get started, you need to open the standard Gallery app and go to the Album tab.

Then you scroll down the album list, and you'll see Hide Albums or a plus button, depending on the version of MIUI. Clicking on this will trigger the activation process. The system will prompt you to agree to the terms of use and immediately require you to create a separate password, which will be different from the one you're unlocking your phone with.

β˜‘οΈ Setup of a Hidden Album

Done: 0 / 5

Once you set the password, the gallery interface will change, you'll see the hidden album indicator on the top, you'll have to put the photos in the general stream, click "More" and select "Add to Hidden Album" option, and the files will disappear from public access and move to encrypted storage, and you'll need to enter a previously specified access code to view them.

There's also a hidden gesture for quick access. In some versions of the firmware, if you put two fingers in different directions on the gallery's home screen (plug out), you'll open a password entry window for hidden albums. It's a convenient way to quickly check the content without going through the settings menu, but remember that you need to activate this gesture in privacy settings.

If your goal is to prevent the Gallery app itself from running, not just individual folders, you'll need App Protection, which causes the system to ask for a password every time someone tries to open a photo program, and you'll be able to set up through the Security system app, which has a green lightning icon.

Inside the security menu, find the App Lock section. When you first log in, the system will ask you to set a password or use biometrics (fingerprint, face). Once you create the access key, you will be presented with a list of all installed programs. Find the Gallery list and put the switch into the active position.

You can choose when to request a password: each time you start or only after 1 minute of inactivity. For maximum security, you should select the option "At each start." Also, you should activate the option "Hide the contents of notifications" so that thumbnails of new photos do not appear in the notification curtain without unlocking.

⚠️ Note: When application protection is enabled, screenshots inside the gallery may be blocked by security. If you need to take a screenshot, temporarily turn off protection in the settings.

Using biometric authentication speeds up the process, so you don't have to enter a digital code every time, just put your finger on the scanner, but keep in mind that once you reboot your device, the system will always require you to enter a master password or pin to verify your identity before using biometrics.

Use of the Second Space for Total Isolation

For users who want to create a completely separate environment on their smartphone, Xiaomi offers a β€œSecond Space” feature, which is not just a folder with a password, but a full copy of the operating system inside your phone, you can install a separate gallery, separate applications and create a unique set of contacts.

To activate this feature, go to Settings β†’ Additional β†’ Second Space. The creation process will take a few minutes, as the system will prepare a virtual partition of memory. Once enabled, you can switch between the main and second space through a notification curtain or a special widget on the desktop. Each space has its own unlock password.

ParameterMain spaceSecond space
Access to filesFull accessIsolated.
AnnexesSeparate setSeparate set
Accounts.Main Mi AccountMaybe different.
HiddennessSeems like everyone.Entry into 2nd Space Requires

The main advantage of Second Space is that it's completely invisible to the person who uses the primary profile, and if you hand the phone over to a child or colleague, they won't even know that the second system exists until they have a special password or a non-executive gesture, and the photos taken in the second space are physically stored in another part of the memory and are not displayed in the main gallery.

How to transfer photos between spaces?
To transfer files, click on the Switching Settings icon (usually two circles) and select the option "Move data." You can select photos from the main space and copy them to the second one, where they will be available after you enter the password.

Configure private mode in the cloud Mi

Local storage isn't the only option. Mi Cloud offers a "Private Album" feature that syncs to the cloud, but is only available after additional authorization, which is convenient because even if your phone is lost or broken, your hidden photos will remain intact on the server.

To activate, go to your Mi Account settings and search for the Cloud section. Select Gallery and enable Hide Cloud Photos. Then, a separate tab or section will appear in the Gallery app that requires verification. All images uploaded there will be automatically encrypted before being sent to Xiaomi servers.

Cloud encryption has its own peculiarities: first, it requires a stable Internet connection for initial download; second, the amount of hidden photos may be limited by your cloud storage plan; however, it is more reliable, since the data is duplicated remotely.

πŸ’‘

Use different passwords for lock screens and hidden albums, and if an attacker sees your unlock pin, the second layer of protection will save personal photos.

Frequent problems and their solution

During the setup process, users may encounter various technical nuances, such as resetting the security settings or moving to another menu after updating the firmware, and sometimes there is a situation where hidden photos stop showing even after entering the correct password, often solved by clearing the Gallery app cache through the Apps menu in the settings.

Another common problem is the conflict between App Protection and Hidden Album. If you have the Gallery app locked on and you're trying to open a hidden album inside, the system can ask for a password twice, which is normal behavior, which is two layers of protection, and to avoid confusion, you can set up the use of a fingerprint for one of the levels.

If you forget the password from the hidden album, the system will suggest to restore it through the Mi Account associated with the device. To do this, on the password entry screen, you need to click "Forgot the password?" and enter the username / password from Mi Account. Without linking the account, data recovery is, unfortunately, impossible for security reasons.

⚠️ Warning: When you reset your phone to a factory setting, all the data from hidden albums that are not synced to the cloud will be irretrievably lost. Always back up.

It is important to keep an eye on security updates. Xiaomi engineers regularly release patches that close vulnerabilities in encryption methods. Ignoring updates can leave your data vulnerable to specialized hacking software.

πŸ’‘

The combination of a hidden album and an app’s protection creates a double barrier, making it almost impossible for outsiders to access the photo without your knowledge.

Additional precautions

In addition to code, there is a physical aspect to security: don't store original documents with sensitive information in the gallery unless you need them, use specialized scanner applications with their own encryption to store copies of passports or bank cards.

Check the list of apps that have access to your gallery regularly. Go to Settings β†’ Privacy Protection β†’ Permission Manager β†’ Photos and videos. Make sure that only trusted system applications and messengers you use have access. If you see an unfamiliar application, immediately revoke its rights.

Using guest mode when transferring the phone is also good practice, in which the gallery is either completely unavailable or only shows an empty album, depending on the settings, which allows you to give the phone to call or card without worrying about accidentally going into the photo stream.

Can I recover deleted photos from a hidden album?
If the photo was removed from a hidden album, it ends up in a gallery basket that can also be protected. If the cart is cleared, recovery is only possible through a backup of the Mi Cloud or a local backup made before removal. There are no special codes for "magical" recovery.
Does hiding a photo affect the place in memory?
No, hiding or encrypting a photo doesn't reduce the amount of memory you're using. Files just change their status and path in the file system, but their weight remains the same. To free up space, files need to be deleted or transferred to an external drive/cloud.
Will the hidden photos be visible when you connect your phone to your computer via USB?
When connected via USB in file transfer mode (MTP), the hidden albums do not appear as normal folders, they are encrypted files with modified extensions that cannot be opened without the decryption key stored in the phone's security system.
What happens to hidden photos when you change the password to unlock the screen?
Changing the primary password to unlock the screen does not affect the password of the hidden album. These are independent security systems. However, if you use a fingerprint to log into a hidden album, when you change the primary password, the system may require re-assignment of biometrics for security purposes.