Xiaomi memory extension: converting SD-map

Modern Xiaomi smartphones, even flagship models, often lack a memory card slot, and basic versions of Redmi and POCO with 64 or 128 GB quickly fill up. Users face a critical shortage of space when the system begins to demand free space and there is no place to delete photos or applications. In such situations, the standard solution - buying a new device - seems the only way out, but there are more economical and technically competent methods to solve the problem.

One of the most effective, albeit hidden by the manufacturer, is the microSD formatting of the card as an internal memory (Adoptable Storage), which allows the Android system to perceive the external USB drive as an integral part of the system partition Internal Storage. However, in the shell of MIUI and the new HyperOS, this option is by default hidden from the eyes of the average user in the standard settings menu, which requires the use of special tools for activation.

In this guide, we will discuss in detail the process of activating the function through USB debugging and ADB computer utilities. You will learn how to prepare the drive, what are the risks of data loss and why the speed of your memory card plays a crucial role in the stable operation of the smartphone. It is important to understand that once formatted, the card will be encrypted and become unreadable on other devices without resetting.

Preparation of equipment and selection of memory card

Before you start modifying your file system, you need to make sure your hardware meets the requirements. Not every microSD card is suitable for use as a system partition. The minimum requirement is a UHS-I speed class or higher, as low write speed will lead to interface lags and applications will be loaded long.

It is recommended to use memory cards with a capacity of 64 GB, as a smaller volume will not give a tangible increase after formatting and system costs. Before starting the procedure, be sure to copy all the important data from the flash drive to the computer, since in the process it will be completely cleaned. You will also need quality. USB-cable and computer running Windows, macOS or Linux.

⚠️ Note: During the procedure, all data on SD-The card will be permanently deleted. Make sure you back up your photos and documents in advance.

While Adoptable Storage is built into the Android core, some Xiaomi models may have software limitations. Owners of MediaTek-based devices sometimes face additional challenges when installing ADB drivers, requiring separate training of MediaTek VCOM drivers.

πŸ“Š What is the amount of memory your Xiaomi smartphone has?
32Gb
64 GB
128GB
256 GB or more

Installation of drivers and setting up ADB on the computer

To interact with hidden Android partitions, we need Android Debug Bridge (ADB) tools, a console utility that allows you to send commands directly to the phone’s operating system. You can download the current version of Platform Tools from the official Android developer website or through specialized builds such as Minimal ADB and Fastboot.

Once you download the archive, unpack it to the root of the C disk or another convenient folder with a short path to avoid errors when entering commands. Then you need to activate the developer mode on the smartphone itself. To do this, go to Settings β†’ About phone and click 7 times in a row on the field of the MIUI version or OS version until the activation notification appears.

  • πŸ“± Go to Settings. β†’ Advanced settings β†’ For developers.
  • πŸ”Œ Activate the debugging switch on USB and confirm the warning system.
  • πŸ’» Connect your phone to your computer with a cable and select the mode of operation. USB File transfer (MTP).
  • βœ… On the screen of the smartphone will appear a request for debugging permission - tick "Always allow" and click OK.

Open the command prompt in the ADB folder (click Shift + Right Mouse button β†’ Open PowerShell window here or Open terminal here) Enter adb devices. If a device with a serial number appears on the list, the connection is successful. If the list is empty, check the drivers in Windows Device Manager.

What to do if your computer can’t see your phone?
If the device is displayed as β€œUnknown” or not identified, try replacing it. USB-The problem is often with cheap cables that only support charging, and you may need to manually install Google drivers. USB Driver through Device Manager, selecting a device with a yellow exclamation mark and updating the driver manually from the folder sdk.\n\nIn some cases, switching the mode helps. USB In the notification curtain with "Only charging" on "MTP" cable-wire.}

The process of formatting a map through the command line

The most important step is to directly convert the file system. We will use the sm command (storage manager), which manages logical volumes in Android, make sure that the phone is unlocked and the screen is on, otherwise the command may not execute due to security restrictions.

In the terminal window, type the command adb shell sm list-disks. The system will return your memory card ID, usually it looks like disk:179.64 or similar numerical code. Write this number down, as it will be used in the next command instead of a universal value.

adb shell sm partition disk:XXX,XX private

Replace XXX,XX with the numbers you got in the previous step. The private argument tells the system to format the disk as private storage. Once you input the command, the process will take anywhere from 10 seconds to a few minutes depending on the size of the card, during which time do not turn off the cable or lock the screen.

β˜‘οΈ Checklist before formatting

Done: 0 / 5

Once the command is successfully executed, the phone can automatically restart or suggest formatting the drive in the system notification that appears. Agreed to format. Now the card should appear in the storage settings as part of internal memory, not as a removable medium.

Set up application and data portability

Once the card is part of the internal memory, Android is allowed to move the application data to it, but by default, not all programs are ported automatically. You need to manually control this process through the settings menu to free up space on the built-in. NAND-storage.

Go to Settings. β†’ Annexes β†’ All applications. Select a heavy application, such as a social network or a navigator. If the application supports portability, you will see a Change or Move button in the memory usage section. Press it and select your SD-map.

Type of dataWe can move it.Impact on speedRecommendation
Cash app.Yes.Average.Move first
Photos and videosAutomatically.Low.Use synchronization
System filesNo.-Leave it on the phone.
Games (OBB)Partially.High.UHS-II cards only

It's worth noting that some system applications and widgets may not work properly when migrated to an external medium, so if you notice a program's instability, return it to internal storage via the same menu, which will help identify the problematic components.

πŸ’‘

Use Files by Google to clean duplicates before transferring.Often users forget that there are hundreds of unnecessary videos stored in the WhatsApp or Telegram folder that take up more space than the apps themselves.

Possible problems and ways to solve them

Despite its apparent simplicity, the process can run into technical hurdles. Often users encounter Failed:400 error when trying to format.This can mean that the memory card has bad sectors, the file table is corrupted, or simply does not meet the speed requirements.

In some cases, after formatting, the phone starts to work slower, a direct consequence of the slow speed of random read/write memory cards. The built-in memory of modern smartphones (UFS 2.1 or 3.1) works at times faster than even the most expensive microSD cards. System delay can manifest itself when you start heavy games or the camera.

⚠️ Note: If the phone is bootlooped after formatting, you will need to reset your settings via Recovery Mode, and the memory card will be defined as external, but the data on it will be lost.

You can also see that after you update your MIUI firmware, the system stops seeing the card as internal, so don't rush to format it again. Try simply restarting the device or retrieving and pasting the card back, and if the problem persists, it's possible that the updated version of the shell will block access to the modified partitions.

πŸ’‘

The speed of a smartphone depends on the speed class of the memory card, and using a cheap Class 10 card instead of UHS-I/UHS-II can reduce the overall performance of the system by up to 30%.

Return to the factory map settings

If you decide to sell your phone or use the card on another device, you have to return it to its original state, you can't just remove the card, it's encrypted and unreadable, you need to re-format it, which will delete all the data and encryption.

To do this, reconnect the phone to the debugging enabled computer. Enter the command adb shell sm list-disks to get an ID, and then do:

adb shell sm partition disk:XXX,XX public

The public argument returns the card to public storage status, and then the phone will suggest formatting the drive for portable use, and this process will also clean up the data completely, so make sure you save the files you want in advance.

Once put into public mode, the card will work like a flash drive on any device, such as a camera, laptop or other phone, and the encryption will be removed, and the file system will become compliant with exFAT or FAT32 standards.

Can I use this card on a computer without formatting?
No, after formatting as internal memory (private), the card is encrypted with a unique key tied to a particular device. The computer will not be able to read the data until you format the card back to public mode via ADB or phone settings.
Will this increase the speed of the phone?
No, it won't speed up the phone, and in some cases it might even slow it down if the memory card is slower than the built-in drive, and the main goal is to increase the amount of space available for installing apps and storing files.
Will it work on Android 12 and 13?
Yes, the Adoptable Storage mechanism is retained in newer versions of Android, including Android 12, 13 and 14. However, manufacturers can hide this option deeper. On Xiaomi with HyperOS, the ADB method remains the most reliable way to activate.
What happens if you take out the card while working?
Applications installed on the map will stop running, and the system will issue an error_missing_ The data will not be lost, but access to it will be lost before the card is re-installed.