How to Create a File on Xiaomi: From Text Documents to Hidden Configurations

Creating files on Xiaomi smartphones seems like a trivial task - as long as you do not encounter the nuances of MIUI. Unlike "pure" Android, Xiaomi's firmware hides some functions, restricts access to system folders and offers its own solutions for working with documents. For example, the standard Explorer in MIUI does not allow you to create an empty file in one click, and trying to save a screenshot in a non-standard folder can end in a "No rights" error.

In this article, we will discuss 5 working ways to create files on Xiaomi, from basic (via Notes or Explorer) to advanced (using ADB and terminal). Special emphasis on the hidden limitations of MIUI 14/15, which block the creation of files in root directories without root rights, and workarounds for these cases. If you need to not just save a photo, but, for example, create.nomedia to hide a folder from a gallery or a configuration file for automation, here you will find a solution.

1. Create files through the standard MIUI "Conductor"

Built-in Explorer (or Files in newer versions of MIUI) is the most obvious tool, but with a trick. Unlike third-party file managers, it doesn't show the Create File button on the home screen.

  1. Open the Files app** (yellow folder icon).
  2. Go to Local Storage or Internal Memory.
  3. Click on the three dots in the upper right corner β†’ Create.
  4. Select the File (not "Folder!").

The first limitation is that MIUI does not allow you to create a file with an arbitrary extension. The system will offer templates:.txt,.doc,.xls, etc. If you want to create script.sh or config.json, you will have to use workarounds (see section 3).

πŸ’‘

If there is no File option in the Create menu, update the Files app via Google Play or clear its cache in the app settings.

⚠️ Note: Files created through "Conductor» MIUI, They automatically save to the Download folder. /storage/emulated/0/ (The root of the memory will cause the error "No access." Use the methods in the section to work with system directories. 5.

2. Quickly create text files through β€œNotes”

The Notes app is a hidden tool for generating text files, and it has the advantage of automatically saving.txt format with exportability.

  1. Open Notes and create a new entry.

This is a good way to create README.txt, task lists, or configurations. The main drawback is that you can't give a random file name: the system uses the first line of a note, for example, if the first line is "My file," the result will be My file.txt.

πŸ“Š What kind of file creation you use more often?
Through the Guide.
Through Notes.
Through third-party applications
Through the PC and USB-cable
MethodSupported formatsLimitationsNeed root?
MIUI's "Conductor".txt, .doc, .xls, .pptNo arbitrary extensionsNo.
"Notes".txtFile name = first lineNo.
Third-party managers (Solid Explorer)Anybody.We need a storage license.No.
ADB/TerminalAnybody.Hard for beginners.Partially.

3. Third-party file managers: without limitation MIUI

If Xiaomi’s built-in tools don’t suit you, install an alternative manager, such as:

  • πŸ“ Solid Explorer – Supports file creation with any extension, FTP-server and cloud storage.
  • πŸ” FX File Explorer – allows you to edit system files (from root) and create hidden folders.
  • πŸ› οΈ MiXplorer – free, with support for archives and encryption.

Instructions for Solid Explorer:

  1. Open the application and go to the desired folder.
  2. Click + in the lower menu β†’ File.
  3. Enter a name with an extension (e.g. backup.sql).
  4. Choose to Create an empty file.

Important: Even with third-party managers MIUI Blocks entry to some system folders (e.g, /system/ or /data/). You will need root rights to work with them or ADB (see section 5).

Install an app from Google Play|Provide access to the storage facility|Disable Battery Optimization for the Manager|Check the rights to write to folders-->

4. Create files via PC (USB/MTP)

If nothing works on your smartphone, connect Xiaomi to your computer through USB-cable and use the conductor Windows/macOS Or Total Commander. This method is reliable for the:

  • πŸ“„ Create files with rare extensions (.bat,.sh,.conf).
  • πŸ—ƒοΈ Mass copying templates (for example, for Tasker).
  • πŸ”’ Files in folders that are not available through MIUI (for example, Android/data/).

Step-by-step:

  1. Connect your smartphone to your PC and select File Transfer (MTP) mode.
  2. Open the device folder in Windows Explorer.
  3. Go to the directory you want (e.g. Internal storage β†’ Download).
  4. Right-click β†’ Create β†’ Text document (or other type).
  5. Rename the file by specifying the desired extension (e.g. config.json).

⚠️ Note: When connecting through MTP some folders (e.g, Android/obb/) They can be empty. It's not a mistake β€” MIUI hides their contents to protect the application data. ADB root-access.

Why does the PC not see some files on Xiaomi?
MIUI hides hidden files (e.g.,.nomedia) and system folders by default. To see them, 1. Enable the display of hidden files in Windows Explorer settings. 2. In MIUI, go to Settings β†’ Additional β†’ Show hidden files. 3. For folders like /data/, you will need ADB or root.

5. Advanced methods: Terminal and ADB

For users who need system files or automation, command line tools are the right option.

Method 1: Through the terminal on a smartphone (without a PC)

Install the Termux app from F-Droid (the version from Google Play is outdated) and do:

termux-setup-storage # Provide access to storage


cd ~/storage/shared/Download




Touch myfile.txt # Create an empty file




echo "Hello" > myfile.txt # Write the text

Method 2: Available from a computer via ADB

If Termux is not suitable (e.g. for /system/), use ADB:

adb shell


Su # Only if there is root!




echo "data" > /sdcard/test.conf




chmod 644 /sdcard/test.conf # Assign rights

These methods allow:

  • πŸ“ Create files in any folder, including system folders.
  • πŸ”§ Assign access rights (e.g., chmod 755 for scripts).
  • πŸ”„ Automate the creation of files through scripts.

πŸ’‘

Use ADB or Termux if you want to create a file in a folder that is not accessible through standard methods (e.g. /data/local/tmp/ for temporary files).

6. Creation of special files (nomedia, configs, scripts)

Some files on Xiaomi have a special purpose, and let's look at three common cases:

To exclude a folder from the multimedia scan (for example, for a document folder):

  1. Open any file manager (even the standard one).
  2. Go to the target folder (for example, Download/Secret).
  3. Create an empty file called.nomedia (a point at the beginning is mandatory!).

After the reboot, the gallery will stop displaying files from this folder.

2. Configuration files for Tasker/MacroDroid

Automation applications (such as Tasker) require files with.prf.xml or.macrodroid extensions to create them:

  • πŸ“± Use Solid Explorer (specify manual extension).
  • πŸ’» Or create a file on a PC and transfer to a smartphone.

3. Scripts for Termux (Python, Bash)

To run scripts in Termux:

pkg install python


echo 'print("Hello")' > script.py




chmod +x script.py




./script.py

⚠️ Note: Script files (.sh,.py) will not run without chmod rights +x. Use Termux or ADB prerogative.

FAQ: Frequent questions about creating files on Xiaomi

Can I create a file in the root folder (/) without root?
No. MIUI Blocks the entry to the root directory (/) and system folders (/system/, /data/) No root rights, maximum available β€” /storage/emulated/0/ (internal memory. Use the system to bypass the limitations ADB with superuser rights (su).
Why not save files to DCIM or Pictures?
DCIM and Pictures folders are protected by MIUI from being changed by third-party apps. Solutions: Save files to Download and then move. Use Xiaomi Gallery to create screenshots/records - it has recording rights. Provide manual access through Settings β†’ Apps β†’ Permissions β†’ Storage.
How to create a file with a name in Cyrillic?
MIUI supports Cyrillic file names, but some applications (e.g. Termux) may not display them correctly. Recommendations: Use the Latin alphabet for system files (e.g. config.json instead of config.json). Cyrillic is acceptable for media files, but avoid #% &* characters.
Can I recover a deleted file by accident?
Yes, if: πŸ—‘οΈ The file was deleted recently – check the Recycle Bin in the Files appΒ». πŸ” Use applications like DiskDigger (requires root for deep scanning). πŸ’Ύ For critical data, set up automatic backup in Settings β†’ Google β†’ Backup.
How to create a file larger than 4 GB?
The 4GB restriction is related to the FAT32 file system that Xiaomi uses for external drives (e.g. microSD).Solutions: Format the memory card in exFAT or NTFS (via PC). Save large files to internal memory (it uses ext4/f2fs). Break the file into pieces with archivers (7-Zip, RAR).