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.
- Open the Files app** (yellow folder icon).
- Go to Local Storage or Internal Memory.
- Click on the three dots in the upper right corner β Create.
- 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.
- 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.
| Method | Supported formats | Limitations | Need root? |
|---|---|---|---|
| MIUI's "Conductor" | .txt, .doc, .xls, .ppt | No arbitrary extensions | No. |
| "Notes" | .txt | File name = first line | No. |
| Third-party managers (Solid Explorer) | Anybody. | We need a storage license. | No. |
| ADB/Terminal | Anybody. | 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:
- Open the application and go to the desired folder.
- Click + in the lower menu β File.
- Enter a name with an extension (e.g. backup.sql).
- 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:
- Connect your smartphone to your PC and select File Transfer (MTP) mode.
- Open the device folder in Windows Explorer.
- Go to the directory you want (e.g. Internal storage β Download).
- Right-click β Create β Text document (or other type).
- 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?
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 textMethod 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 rightsThese 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:
1..nomedia file - hide the folder from the gallery
To exclude a folder from the multimedia scan (for example, for a document folder):
- Open any file manager (even the standard one).
- Go to the target folder (for example, Download/Secret).
- 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.