Combining internal memory and SD-maps on Xiaomi (MIUI 12)

Xiaomi smartphone owners often face a lack of space, especially on budget models, where the base storage capacity is limited to 32 or 64 gigabytes. The MIUI 12 operating system, with its rich functionality and heavy shell, itself takes up a significant part of the available space, leaving the user with a minimum of personal needs. In such situations, the only way out seems to be using a microSD memory card, but standard methods of installing applications do not always work as you would like.

The problem is that the developers of the MIUI shell by default hide the possibility of full use of external memory as part of the system partition. Normal moving files to the card does not solve the problem of lack of space for installing new programs or games. In order to make the system perceive the flash drive as an extension of internal memory, you need to resort to more advanced methods of configuration, including the use of debugging over USB and special ADB commands. It is important to understand that the process of forced merge (Adoptable Storage) on MIUI 12 is a hidden function and requires strict adherence to instructions.

Before you start technical manipulation, you should realize that any interference with system partitions carries certain risks. Incorrect execution of actions can lead to data loss or unstable operation of the device. However, if done correctly, you can significantly expand the capabilities of your Xiaomi, turning a regular memory card into a full extension of internal storage.

Preparation of equipment and software

The first step is to properly prepare the memory card, as it will be completely formatted during the setup process and all data on it will be irretrievably lost. It is recommended to use high-quality Class 10 or UHS-I cards from proven manufacturers such as Samsung, SanDisk or Kingston. Using cheap and slow cards can lead to a severe slowdown of the entire smartphone, as the system will constantly contact the drive.

In addition to the card itself, you will need a personal computer running Windows, macOS or Linux, as well as a serviceable one. USB-You need to install drivers for your device on your computer, which usually come with the Mi program. PC Suite or can be downloaded separately, and you will also need to download a minimum tool package. ADB (Android Debug Bridge, which will allow you to send commands from your smartphone.

On the smartphone, you need to activate the developer mode. To do this, go to Settings โ†’ About the phone and quickly click seven times in a row on the MIUI Version. After the message โ€œYou became a developerโ€, return to the main settings menu, select Additional โ†’ For developers and activate the debugging switch over USB. Also in this menu, it is recommended to turn on the option โ€œDo not turn off the screen when chargingโ€ so that the device does not fall asleep during the process.

โš ๏ธ Warning: Before starting any operations, be sure to back up all important data to the cloud service or external hard drive. The process of formatting the memory card as an internal memory card will lead to a complete cleanup of its contents.

Once you have all the necessary components installed on your PC and your smartphone ready, you can move on to the next step, make sure that the cable connects the devices securely, and there's a confirmation on the phone screen that you're debugging permission from that computer, and without that step, no further commands will be executed.

The quality of the cable used directly affects the stability of the connection. If the computer can not see the phone or the connection is constantly interrupted, try replacing it. USB-cable or use another port, preferably located directly on the motherboard (for PC) or the original cable from the kit.

Setting up a smartphone and activating hidden functions

In the MIUI 12 shell, the standard interface doesn't provide a direct button to merge memory, so we'll need to use a special code or third-party app to access the hidden menu. One popular way is to use the Activity Launcher app, which allows you to run hidden system activities. Download it from the Google Play Store and install it on your smartphone.

When you run Activity Launcher, you search for "storage" or "storage." In the list of results, find the item associated with the storage settings, but not the one that usually opens, anium system. Often it is called "Storage" or has a long system name for the package. By clicking on it, you can go to the expanded disk management menu, where the option of formatting as an internal drive is sometimes available.

If the activity launcher is blocking or not working on your firmware version, you will need to use the command line. Connect your smartphone to your computer, open the command line (CMD) or PowerShell in the ADB folder and enter the adb device command. The phone screen should have a request for debugging permission โ€” confirm it. If the console displays the serial number of the device with device status, then the connection is established.

๐Ÿ“Š How much internal memory is your Xiaomi?
16GB
32GB
64GB
128 GB or more

There is also a method of activating through a hidden menu of engineering tests, but it does not work on all models. Try entering the code ##6484## or ##4636## into the dialer. SD Card or Storage, but the most reliable and versatile method for MIUI 12 Remains in use ADB-team.

It is important to note that once the developer mode is activated and the debugging is enabled, the system may periodically warn of security risks. Ignore these warnings if you are confident in the connected computer. To successfully perform the operation, the phone must be unlocked during the input commands.

Memory integration process through ADB teams

Now letโ€™s move on to the direct execution of the team that will transform yours. SD-This is a method known as Adoptable Storage. Open the command line on your computer in a folder with ADB and type in the adb shell command. You should see the input invitation changed to shell.@model_name.

The next step is to find your memory card ID, type in the sm list-disks command, and the system will give you a list of connected drives, usually in disk:179.64 or something like that, write down this number, which is unique to each device and card, and be careful not to confuse internal memory with external memory.

Once you get the ID, you type in a formatting command: sm partition disk:XXX,XX private, where XXX,XX is your drive number. This command will completely delete all the data on the card and create an encrypted partition that only this smartphone can access. The process can take several minutes, during which the screen can go out โ€” don't touch the device.

โ˜‘๏ธ Pre-formatting verification

Done: 0 / 5

Once the command is successfully executed, the system will notify you that the card is formatted. Now you need to reboot the smartphone with the reboot command or manually. Once you turn on in the storage settings, you will see that the amount of internal memory has increased, and the map is displayed as part of the system partition.

If you have an error or a process hangs over the sm partition, don't panic. Try restarting your phone and repeating the procedure, making sure the debugging mode is active. In rare cases, the map may be damaged, and you will need to re-format it to standard mode via sm partition disk:XXX,XX public.

โš ๏ธ Note: Once formatted as private, the card will not be read on other devices (cameras, other phones, PCs) without a special reset.

Features and limitations of MIUI 12

Despite successful memory integration, MIUI 12 users may face a number of limitations specific to this shell. Unlike pure Android, MIUI strictly controls which applications can be moved to an external drive. Many system applications and some heavy games may refuse to be ported even if physical space is available.

The speed of the interface and applications can be slightly reduced, especially if you use a medium-speed memory card. The operating system will actively use the swap partition on the memory card for virtual RAM, which creates an additional burden on the card controller. To minimize delays, it is recommended to use high-speed write cards (IOPS).

Another feature is encryption, and the data on the combined card is encrypted with a key that is tied to a particular device, which means that if the smartphone breaks down or is reset to factory settings without first unlocking and transferring data, the information on the map will be lost forever, and it will be impossible to restore it using standard methods.

ParameterStandard Mode (Portable)Regime of association (Private)
Access to PCGot it (via adapter)No (reset required)
Installation of applicationsLimited/ImpossibleFull support
Speed of operationStandard.Depends on the speed of the card.
SecurityLow (data open)High (encryption)

Also worth mentioning is that MIUI firmware updates can sometimes reset partition settings or change the logic of working with external drives. After a major system update, it is recommended to check the status of the memory card in the settings. In some cases, you may need to re-activate the developer mode.

Users often wonder if old memory cards are useful, and if your card is over 5 years old, it may not be able to withstand the intense load of internal memory, the life of memory cards is limited by the number of overwriting cycles, and in system partition mode, this counter is consumed much faster.

File management and space optimization

After memory is combined, file management becomes more transparent to the user, but requires addiction. All new files, photos and videos can be saved by default to the combined partition, unless otherwise specified in the camera and voice recorder settings. It is recommended to regularly check the Downloads folder and messenger cache, as they occupy the lion's share of space.

To clean up your garbage and optimize, use Xiaomiโ€™s built-in Security app, which can find large files, duplicates, and remnants of deleted applications. However, be careful with Deep Cleanup so you donโ€™t accidentally delete important system logs or cache cards if youโ€™re actively using them.

Applications that support portability can be moved manually. Go to Settings โ†’ Annexes โ†’ All applications, select the desired application and press Memory. If the Move button is active, you can transfer the application to the SD-This will make room in the fast internal partition for system processes.

What to do if the button is inactive?
If the move button is gray, the app developer has banned the installation on the external drive, and this restriction can only be circumvented with special modified launchers or root rights, which is outside the scope of the standard instructions and may violate the warranty.

It's important to monitor the temperature of your device when you're actively working with memory. Intense writing and reading can cause the memory controller to heat up. If you notice that your phone is getting too hot when you install games or copy files, take a break and let the device cool down.

Regular defragmentation for memory cards is unnecessary and even harmful, as it reduces the resource of memory cards. Android files optimize the placement of files. The only thing worth doing is periodically check the integrity of the file system through the recovery menu (Recovery Mode) if the system reports errors.

Possible problems and ways to solve them

One of the common problems is when, after a reboot, the phone stops seeing the memory card or writes that it is damaged, in which case, try to remove the card, wipe the contacts with a pin and paste back, and if that doesn't help, it may be that the file system has been damaged. Try formatting the card again through the storage settings menu by selecting the option "Clear" SD-map".

Sometimes applications transferred to the map stop running or crash, this can be due to slow card reading speed or physical wear and tear, in which case it is recommended to transfer critical applications back to internal memory, leaving only media files and rarely used software on the map.

If after all the manipulations, the smartphone began to work unstable, there were artifacts on the screen or endless restart (bootloop), it is possible that the system files were damaged. Data/Factory Reset) via the Recovery menu.Be sure to have a Mi Account and password before you do, as after the reset, the device will request them to confirm ownership (Mi Account Lock).

๐Ÿ’ก

Use memory cards of no more than 256 GB for older Xiaomi models. Smartphones with Snapdragon 600-series processors and below may not work properly with the drives in internal memory mode.

There are cases when the combined memory functionality is blocked software after the MIUI update, developers can change the configuration files of the system, preventing the use of Adoptable Storage on specific models, in which case you can only wait for the patch to come out or use the card in normal file storage mode.

โš ๏ธ Note: If your phone is hit by water or has been hit hard, using the combined memory mode increases the risk of data loss.

Return to standard operating conditions

If you've decided to give up the idea of memory consolidation or sold your phone, you need to return the card to its original state. SD-The system will warn you that all data will be deleted, and then the card will again become a regular flash drive, available for reading on any device.

Before formatting, make sure to copy all the important data from the card to your computer. Since the partition has been encrypted, no software can recover the data after formatting. Make sure that all photos, documents and ported applications are no longer needed on this medium.

Once the card is returned to Portable mode, it is recommended to clear the system cache, you can use standard cleaning tools or just restart the device, which will help the system to re-index files and correctly display the free space.

In some cases, once the card is portable, the system may be left with "tails" - folders from previously installed applications, which can be safely removed manually through the file manager, finding folders with application names at the root of the memory card, which will return the card to its original purity.

Can I combine memory on Xiaomi without a computer?
There is no such feature in the standard MIUI 12 interface, but there are applications from Google Play (such as dedicated launchers or developer utilities) that can provide access to hidden formatting menus, but this method is lower than with ADB, and it depends on the version of Android and the specific model of the phone.
Will this reduce the speed of the smartphone?
Yes, the speed can slow down, especially when you run heavy applications that are ported to the card. The speed of reading random blocks on microSD cards is much lower than that of embedded memory eMMC or UFS. For comfortable work, it is recommended to use only high-speed cards of the U3 class.
What will happen to the data on the map after the phone is reset?
When resetting the phone to the factory settings (Hard Reset) encrypted partition on the SD-The card will also be cleared or unreadable, as the encryption keys are stored in a secure area of the phone's internal memory, which is cleared when reset.
Do all memory cards support this mode?
Any card can be technically formatted, but it requires cards with high write and read speeds to run in internal memory, and cheap cards can cause strong interface lags and quick failures due to overloading with overwriting cycles.
Can I transfer the already installed applications?
Yes, most applications can be moved after mode is activated, but some system applications and widgets may not support portability, and the move is made through the application-specific control menu in the settings.