Renaming folders on Xiaomi smartphones is a challenge that users face when organizing files, backing up or configuring applications. Redmi 9 with its MIUI shell has features that are not always obvious. Unlike Android in its βpureβ form, there may be restrictions on editing system directories, hidden folders with dots at the beginning of the name (.nomedia,.thumbnails), or problems with access rights when connecting to a PC.
In this article, we will discuss all the current ways of renaming, from the standard file manager to commands via ADB, and explain why some folders can not be renamed without root rights. We will pay special attention to the nuances of MIUI 12/13/14, since the firmware version directly affects the available options. If you tried to rename a folder through Explorer and received an error "failed to rename", here you will find a solution.
Method 1: Standard file manager MIUI
The easiest method is to use the built-in Explorer (aka Files or File Manager), which is suitable for folders on internal memory and storage. SD-If they are not protected by the system, it is important that MIUI Default hidden system directories (such as Android, MIUI), and rename them without additional actions will not work.
To rename the folder:
- Open the Files app (the folder icon on the desktop).
- Go to the Device section (for internal memory) or SD-map.
- Find the desired folder and hold your finger on its icon for 1-2 seconds.
- In the menu that appears, select Rename (pencil icon).
- Enter a new name (without the forbidden characters: / \: *?" < > |) and press OK.
Make sure the folder is not open in another app |
Check the free disk space (minimum 5% of the volume)|
Turn off cloud sync (if folder in Mi Cloud)|
Close all programs that work with files (gallery, music player)-->
β οΈ Note: If the folder is gray and does not stand out when pressed, it means that it is protected by the system.Attempt to rename it will result in the error "Operation not allowed." In this case, use Method 3 (ADB) Or Method 4 (Root).
Method 2: Rename via PC (MTP or PTB)
Connecting Redmi 9 to your computer allows you to bypass some limitations MIUI, Especially if the file is on SD-Use the protocol to do that. MTP (Media Transfer Protocol or PTB (older MIUI). Important: When connecting, select File Transfer Mode, not Charging.
Instructions for Windows/macOS:
- π Connect your smartphone to your PC through USB-cable (preferably original).
- π± On the Redmi 9 screen, select File Transfer in the Connection Notification.
- π₯οΈ Open This Computer (Windows) or Android File Transfer (macOS).
- π Find the folder you want, right-click and select Rename.
- βοΈ Enter a new name and press Enter.
| Problem. | Reason. | Decision |
|---|---|---|
| The folder is not displayed on the PC | Hidden by the system or in a secure directory | Enable the display of hidden files in the Windows Explorer settings |
| Error "Device is not responding" | Unstable. USB-connection or outdated drivers | Try a different cable/port or install MIUI ROM Driver |
| You canβt rename your DCIM or Pictures folder. | Protecting the system from changing media directories | Use ADB (Method 3) or refuse to rename |
β οΈ Note: If after renaming via PC folder disappeared from the gallery or music player, update the media index: go to Settings β Annexes β gallery β Warehouse β Clear the cache.
Only for charging |
For file transfer (MTP)|
In PTP mode (photo)|
Over Wi-Fi (FTP) |
Not plugged in.-->
Method 3: ADB commands (without root)
The ADB (Android Debug Bridge) tool allows you to manage the file system via the command line, bypassing the limitations of the graphical interface, which works without root rights, but requires you to enable USB debugging and install ADB on your PC.
Step-by-step:
- Activate Developer Mode: Go to Settings β About Phone. 7 times click on the MIUI Version until the notification βYou are a developerβ appears.
- Turn on USB Debugging: Return to Settings β Additional β Developer. Activate the USB Debugging Switch.
Redmi 9
adb shell
mv /sdcard/old name /sdcard/new nameReplace the old name and new name with the current values.
Examples of commands for typical cases:
- π Rename the folder to SD-map: mv /storage/1234-5678/ol'name /storage/1234-5678/new name (where) 1234-5678 β identifier SD-maps, check through the ls command /storage)
- π View the contents of the catalog before renaming: ls /sdcard/
- β If the name contains spaces, use quotes: mv"/sdcard/my folder""/sdcard/my dad"
What if the ADB canβt see the device?
Method 4: Root Access and Total Commander
If the folder is in the system partition (/system, /data) or protected from changes, root rights will be required. On Redmi 9, they can be obtained through unlocking the bootloader and installing Magisk, but this voids the warranty and may result in the inability to update the firmware through OTA.
After getting root, use Total Commander with the Root Access plugin:
- Install Total Commander from Google Play.
- In the application settings, activate Root mode (requires confirmation of superuser rights).
- Go to the directory you want (e.g. /data/data), hold the folder, and select Rename.
- Enter a new name and save the changes.
β οΈ Note: Modifying system folders (e.g, /system/app) This can lead to bootloop. Before doing this, back up through the bootloop. TWRP Or OrangeFox Recovery.
adb sideload firmware.zipMethod 5: Applications for working with files (without root)
If standard Explorer doesn't work, try third-party file managers with advanced rights.The best options for Redmi 9 are:
- π FX File Explorer - Supports FTP/SFTP In the settings, enable Show hidden files and Root access (if root is available).
- π Solid Explorer is a user-friendly interface with support for cloud storage. Use a long press to rename the name. β Rename.
- π οΈ Mixplorer is a powerful tool that supports archives and network protocols, allowing you to rename folders even on protected partitions (if you have root).
Example of renaming with FX File Explorer:
- Open the application and give access to the storage.
- Go to the Internal Storage or SD Card section.
- Find the folder, swipe left or hold it.
- From the menu, select Rename, enter a new name and confirm.
π‘
Partition file managers often have a "Batch Rename" feature, which is useful for changing multiple folders simultaneously across a template (for example, adding the Archive prefix to all folders).
Features of working with system folders
Some directories in MIUI are protected from change for security or system stability reasons, and here is a list of folders that are not recommended to be renamed without good reason:
| folder | Location. | Consequences of renaming |
|---|---|---|
| Android | /sdcard/Android | Application malfunction, loss of cache data |
| MIUI | /sdcard/MIUI | Failures in the work of branded services (themes, cloud) |
| DCIM | /sdcard/DCIM | Photos and videos will no longer be displayed in the gallery |
| Download | /sdcard/Download | Browser and messengers will not be able to save files |
If you still need to change the system folder name (for example, for testing), follow the rules:
- π First, back up your folder on your PC.
- π Write down the original name and path β it will be necessary for a rollback.
- π οΈ Use it. ADB Root Explorer, not the standard Explorer.
- π After renaming, check the work of the related applications (gallery, browser, etc.).
Frequent mistakes and their solutions
When you rename a folder to Redmi 9, users face typical problems.
β οΈ Note: Operation not permitted error when trying to rename folder ADB Often means you donβt have enough rights.USB root SELinux in Permissive mode. To check the current status of SELinux, type in ADB: adb shell getenforce If Enforcing response, system folder renaming is blocked.
| Mistake. | Probable cause | Decision |
|---|---|---|
| "Folder is in use" | The folder is open in another application (for example, a gallery scans media) | Close all programs, restart your smartphone and try again. |
| "Invalid file name" | The name contains forbidden characters or is too long (more than 255 characters). | Use only letters, numbers, accents and hyphens |
| The folder disappeared after renaming | Mi Cloud sync failure or file system error | Check the basket in Explorer or restore through DiskDigger |
If after renaming the folder with the photo / video they stopped appearing in the gallery, update the media database:
- Install the Media Rescan app.
- Run the scan or enter into ADB: adb shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///sdcard/