Using a memory card as internal memory for Xiaomi

Owners of budget and mid-budget smartphones Xiaomi, Redmi and Poco often face critical shortages of free space. Modern applications take up gigabytes, and high-resolution photos quickly fill the available space. Standard 64 GB or even 128 GB of internal memory is overflowing, which leads to slowdown and inability to install new programs, at which point users think about expanding storage with a microSD card.

Unfortunately, the MIUI and HyperOS shells don't provide a simple button to merge drives by default, unlike older versions of Android. The system suggests using the card only as a portable storage for photos and music. However, there is a proven technical method to circumvent this limitation. With USB debugging and a computer, you can force the external drive to be formatted as internal memory.

This process requires care, as all data on the map will be permanently deleted, and after formatting, the map is tied to a particular device and will not be read on other phones without re-formatting. Despite the risks, it's the only way to make a phone count. SD-map part of system section /data, That allows you to install any application there.

Preparation of equipment and software

Before you start modifying the file system, you need to make sure that all components are compatible and available. You will need a Xiaomi or Redmi smartphone, a serviceable microSD memory card (preferably a U3 or V30 speed class) and a computer running Windows, macOS or Linux. The quality of the card directly affects the speed of the interface, so using cheap drives can lead to lags.

You need to install ADB drivers on your computer, which is a toolkit that allows you to send commands from your PC to your smartphone. Without this software, you can't interact with Android system partitions. Also make sure that the phone has USB debugging enabled in the Developer Menu.

⚠️ Note: All data on the memory card will be destroyed during the formatting process. Save important files on your computer or in the cloud before starting the procedure.

To work with the command line, you will need to download Platform Tools from the official Android developer site. After unpacking the archive, you will get access to the executable files adb.exe and fastboot.exe, which will become the main tool in the user’s hands.

β˜‘οΈ Preparedness for procedure

Done: 0 / 4

Setting up a smartphone and connecting to a PC

The first step is to activate the hidden features correctly in MIUI. Go to settings, select About Phone, and quickly click seven times on the build number. The system will tell you that you have become a developer. Next, go to advanced settings and find Developer's room. Here you need to activate the Debugging switch over USB.

When you connect the cable to your computer, you'll see a request for debugging permission on your smartphone screen. Make sure you select "Always allow from this computer" and confirm the action. If you don't, the PC command will be ignored. Check the connection by running the adb device command in the command line. The list should show a serial device with device status.

If the device appears as unauthorized, unlock the phone screen and re-confirm the fingerprint. RSA-Sometimes you need to switch the operating mode. USB in the notification curtain from "Charge Only" to "Transfer Files", although for ADB It's not always critical. It's about having a stable connection and drivers in Windows Device Manager.

πŸ’‘

Use the original cable or high-quality analogue with data support. Cheap "charging only" cables will not allow the computer to see the phone.

Formatting a map through the ADB command line

Once the connection is successful, we move to the most important step: Open the command line or the terminal in the ADB tool folder. Enter the adb shell command to access the smartphone shell. Now we'll work directly with the Android file system.

First, you need to know your memory card ID. Type in the command:

sm list-disks

The system will give you a list of the connected drives. The internal memory is usually denoted as internal, and the external card will be 179,XX or similar numerical value. Remember this ID, it will be needed for the next command. For example, if the card is denoted as 179.64, then further commands will use this address.

Now we're formatting the map as an internal storage unit, and the command is as follows:

sm partition disk:179,64 private

Replace 179.64 with your ID. Once you have entered the command, the process can take from seconds to minutes, while you do not turn off the cable or remove the card, and when you complete the operation, the system will notify you of the creation of new partitions.

πŸ’‘

The sm partition disk:ID private command completely rebuilds the map structure, making it indistinguishable from the built-in flash memory for the system.

Data transfer and application configuration

Once formatted successfully, the card becomes part of a single memory pool, but the files are not automatically transferred. You need to manually move the data. Go to the storage settings, select "Inner Memory" and click "Move Data." The system will suggest migrating photos, videos and some applications.

Not all applications support transfer to an external drive even after this procedure. SD-However, heavy games and instant messengers often manage to move in whole or in part, freeing up precious megabytes of the main partition.

To manage the transfer of specific applications, use the menu:

  • πŸ“± Settings β†’ Annexes β†’ Application management
  • πŸ’Ύ Select the desired application from the list
  • πŸ”„ Press "Memory" and select the "Move" button"

If the move button is inactive (gray), then the application is rigidly tied to the system partition, in which case only cleaning the cache or removing heavy data inside the application itself will help.

Why can’t some apps be moved?
Android developers prohibit the transfer of widgets, alarm clocks and system services to external drives, as SD-The card can be retrieved at any time, which will cause the critical functions to fail.

Comparison of performance and reliability

It is important to understand the difference between an embedded eMMC or UFS memory and a microSD card. Even fast memory cards are inferior to internal smartphone chips in read and write speeds, especially when working with small files, which can lead to longer loading of applications hosted on the card.

Below is a table comparing the characteristics of the different types of drives used in smartphones:

Type of storageReading speed (MB/s)Recording speed (MB/)Reliability
Built-in UFS 3.12000+1500+Tall.
Built-in eMMC 5.1300-400100-150Medium
Class 10 SD card80-9020-40Low.
SD card UHS-I U3100-16060-90Medium

Using a memory card as internal memory reduces the total life of the drive due to the intensive recording of cache and logs of the system. SD-cards are not designed to carry the load of internal flash memory, so they can fail faster.

πŸ“Š Do you use a memory card as your primary memory card?
Yeah, it saves the place.
No, I'm afraid of speed.
No, I'm buying a version with a margin.
I don't have a card slot.

Return to the factory map settings

If you're going to stop using the card as internal memory, or if you're going to sell your phone, you need to get the drive back to its original state, you can't just retrieve the card, it's going to be encrypted and unreadable on other devices, and you need to re-format it.

Go to the storage settings, select yours. SD-You can click Format, and the system will tell you that all the data will be deleted, and then the card will become portable storage again, and if the standard formatting doesn't work, you'll have to use it again. ADB team:

sm partition disk:ID none

This command will delete all the sections on the map, make it clean, and then the smartphone will suggest that you format it again as a portable medium, and remember that a return to factory settings is also necessary when you replace your smartphone with a new model.

⚠️ Note: When formatting the card back to portable mode, all applications installed on it will stop working and they will have to be reinstalled again.

Frequently Asked Questions (FAQ)

Can I transfer the Android system to a memory card?
No, the full transfer of the operating system to SD-Now, the map on today's Xiaomi smartphones is not possible without deep firmware and root rights, which is very unstable. We're just expanding the data section, but the core of the system is on the embedded chip.
Why is the phone slower after formatting?
You’re probably using a low-speed card. Applications are delayed because the microSD’s random read speed is significantly lower than that of UFS’ internal memory. It’s recommended to use A2 cards.
Will this work on Android 13 and HyperOS?
Yes, the ADB method works on most Android versions, including 12, 13 and the HyperOS shell. However, manufacturers can block the sm partition command at the core level in some newer models.
What happens if you remove the memory card from your phone?
All applications transferred to the map will stop running and their widgets will disappear from the desktop, the system may give an error about data corruption, you must first disable the card through the settings ("Extract") before physically pulling it out.