Did you download a new file, but Xiaomi's smartphone persistently opens it in an unnecessary app? Or did the system automatically assign a default program that you don't like? This problem is familiar to many users of Redmi, POCO and other devices on MIUI. Unlike "pure" Android, Xiaomi's firmware has its own nuances in managing file associations - and today we'll take them all apart.
In this article, you will find 5 proven ways to change the program to open files โ from standard settings. MIUI We'll also explain why sometimes the system forgets your choices and how to fix them once and for all. APK and multimedia, when MIUI Ignores custom settings due to battery optimization.
Why Xiaomi automatically selects applications for files
MIUI firmware (especially versions 12-15) actively interferes with file processing for three reasons:
- ๐น Battery optimization: the system blocks background activity of โunnecessaryโ applications, resetting their rights to open files.
- ๐น Advertising integration: in some regions MIUI Promotes its own services (e.g. Mi Video for Video or Mi Music for Audio).
- ๐น Security:.apk and.exe files are assigned by default MIUI, to prevent the installation of malware.
Android 10+ also introduced Scoped Storage, which restricts applications from accessing files. On Xiaomi, this often results in file associations being reset once the system is updated. For example, if you previously opened a PDF in Adobe Acrobat, after an update, MIUI can reassign this action to Google PDF Viewer.
Method 1: Change the program through the Open with Menu
The easiest method is to use the context menu of the file, which works for most formats (.jpg,.mp4,.pdf, etc.), but has limitations for system files.
- Open Files (standard Xiaomi or Google Files manager)
- Find the desired file and make a long press on it.
- In the menu that appears, select Open with (or More) โ Open with help).
- Slip on the application you want to use once, or select Always for a permanent appointment.
โ ๏ธ Attention: On Xiaomi with MIUI 14+ The option may always be missing for some formats (e.g..apk). In this case, use Method 3 (application settings).
File is not corrupted (try to open in another application)
Appendix installed and updated
APK Installation from Unknown Sources Enabled
Battery optimization for target application disabled-->
Method 2: Configure associations in application parameters
If the context menu does not offer the desired application or does not save the choice, change the settings directly:
- Go to Settings โ Applications โ Application Management.
- Tap it on. โฎ (three-point) โ Default applications.
- Select a file category: ๐ Browser - for links http/https ๐ต Music player - for.mp3,.flac ๐ฌ Video player - for.mp4,.mkv ๐ฑ Telephone for calls and SMS
Select the desired application from the list.
This method is more reliable than the first, but has a limitation: MIUI There are no separate settings for rare formats (e.g..epub or.mobi) that require Method 4 (ADB-team).
๐ก
If the desired application does not appear in the list, first open the file through this application at least once - the system will add it to the available options.
Method 3: Reset all file associations (if MIUI forgets the choice)
Sometimes MIUI resets after an update or reboot, and this is due to the operation of the com.miui.securitycenter service, which "optimizes" the system, to regain control of:
- Go to Settings. โ Annexes โ Application management โ โฎ โ Resetting application preferences.
- This will delete all user associations of files, but allow them to be reassigned without any malfunction.
- Repeat Method 1 or Method 2 for the desired formats.
โ ๏ธ Note: Reset also removes: Browser default settings Preferences for phone calls and SMS Permissions for Assistants (e.g. Google Assistant) We recommend taking screenshots of current settings before resetting.
Method 4: Using ADB for Involuntary Assignment (for experienced)
If MIUI ignores your settings (for example, for.apk or.zip), you can apply ADB-This method requires a PC connection, but it's guaranteed to work.
You'll need:
- ๐ฅ๏ธ Computer with installed ADB Tools
- ๐ USB-cable (preferably original)
- ๐ฑ On the smartphone included debugging on USB (Settings โ The phone. โ Version. MIUI โ 7 times to tap โ Return to Additional Settings โ Developer parameters)
adb shell cmd role remove-role-holder android.app.role.SUPPORTED_MEDIA_PACKAGES com.miui.video # Delete Mi Video for video
adb shell cmd role add-role-holder android.app.role.SUPPORTED_MEDIA_PACKAGES com.mxtech.videoplayer.pro # Assign MX PlayerFull list of roles for different file types:
| File type | Role. | Example of an application package |
|---|---|---|
| Video | SUPPORTED_MEDIA_PACKAGES | com.mxtech.videoplayer.pro (MX Player) |
| Audio. | MUSIC | com.spotify.music (Spotify) |
| browser | BROWSER | org.mozilla.firefox (Firefox) |
| APK-file | INSTALL_PACKAGES | com.android.packageinstaller (Standard Installer) |
To find out the package of the desired application, use the command:
adb shell pm list packages | grep "appendix name"How to find an application package without ADB?
Method 5: Using Third-Party File Managers
If standard methods donโt work, install an alternative file manager (e.g. Solid Explorer or FX File Manager) that has its own file association settings that are independent of MIUI.
Instructions for Solid Explorer:
- Open the manager and find the file you want.
- Put it on the file. โ Open with help.
- Select the app and mark Use Always.
- In Solid Explorer settings, go to Settings โ File Association and secure the selection.
The advantage of this method is that the manager creates his own rules, which MIUI does not reset after updating, and the disadvantage is that you have to use third-party software for all operations with files.
๐ก
Part-party file managers bypass the limitations of MIUI, but require additional permissions (access to storage, installation of APK).
Frequent Mistakes and How to Avoid Them
Even after you set it up properly, users have problems, and here are the most common ones:
- ๐ MIUI Resets settings after rebooting โ Turn off battery optimization for the target application (Settings) โ Battery โ Choice of applications โ No restrictions).
- ๐ซ There's no "Always" option for APK โ Use it. ADB (Method 4) or install SAF (Storage Access Framework โ Compatible Manager.
- ๐ฑ The application does not appear in the list โ Check if it supports the file format (for example, VLC It doesn't open.docx).
- ๐ The file does not open even after the program change. โ Remove the application cache (Settings) โ Annexes โ Warehouse โ Clear the cache).
Pay special attention to.apk files: MIUI blocks them from opening through third-party installers (e.g. APKMirror Installer).
- Go to Settings. โ Annexes โ Application management โ โฎ โ Special access โ Installation of unknown applications.
- Select your file manager (or browser) and allow APK installation.