Where in Xiaomi smartphones are stored deleted files and how to restore them

You accidentally deleted important photos, documents or videos from your Xiaomi and now you don't know where to look for them? Unlike computers where files are sent to the trash after deleting, mobile devices work differently. In this article, we will discuss in detail where deleted files are physically stored in Xiaomi smartphones, how the MIUI backup system works, and what tools will help you recover lost data even without root rights.

Many users mistakenly think that after clicking Delete files disappear forever, in fact, they remain in the device’s memory until the new data is overwritten. However, finding them is not so easy: Xiaomi does not provide direct access to β€œjunk” memory parts, and the standard basket in the gallery or file manager lasts only 30 days, we will tell you how to circumvent these restrictions and what to do if the files were deleted long ago.

How to store files in Xiaomi: what happens when you delete

In Xiaomi smartphones (as in other Android devices), files are stored in the ext4 or f2fs file system, depending on the model and version of MIUI. When you delete a file through the standard interface, the following happens:

  • πŸ“ Local Deletion: A file is marked as "deleted" in the file system table, but its data remains in place until it is overwritten with new files, which means that it can theoretically be restored.
  • πŸ—‘οΈ Basket MIUI: Files deleted through the Gallery, Files or Downloads are placed in a temporary storage (.trash or.recycle folder) for 30 days.
  • ☁️ Cloud redundancy: If sync with Mi Cloud is enabled, some files (photos, contacts, notes) can be saved to the cloud even after local deletion.
  • πŸ”„ System reserves: MIUI Creates hidden copies of some files in folders like /data/com.miui.gallery/cache or /sdcard/MIUI/Backup, But access to them is limited.

It is important to understand that complete deletion only occurs after formatting a partition or overwriting data. For example, if you delete a photo and then shoot a new video of the same size, the chances of recovery tend to zero, and some applications (such as WhatsApp or Telegram) store their β€œdeleted” files in their own folders, which do not fall into the shared MIUI basket.

πŸ“Š Have you ever lost important files on Xiaomi?
Yes, photos.
Yes, documents or videos.
No, I always do backups.
I remember.

Where to look for deleted files: standard folders and hidden partitions

If files were deleted recently (within 30 days), first check the standard MIUI garbage storage locations, and here are the key folders and paths where deleted data may remain:

Type of fileThe way to the folderStorage periodAccess without root
Photo and video (Gallery)/storage/emulated/0/MIUI/Gallery/trash/30 daysYes.
Files (File Manager)/storage/emulated/0/.recycle/30 daysYes.
Downloads./storage/emulated/0/Download/.trash/30 daysYes.
Cash galleries/data/data/com.miui.gallery/cache/Before the cache is cleaned.No (root needed)
Backup copies of MIUI/sdcard/MIUI/Backup/AllBackup/Before hand cleaning.Yes.

To see hidden folders (such as.trash or.recycle), open the Xiaomi file manager, click on the three dots in the upper right corner and select Settings β†’ Show hidden files. If there are no folders, then the files were deleted long ago or through third-party applications (such as Google Photos, which have their own shopping cart).

⚠️ Note: Don’t confuse the system basket MIUI Google Photos, the last one stores files. 60 days and available at the address photos.google.com/trash. If you have used an automatic backup, check it first.

How to recover files from the MIUI basket: step-by-step instructions

If the files are still in the MIUI Recycle Bin, it will take no more than a minute to recover them.

  1. Open the Gallery app (for photos/video) or Files (for documents).
  2. In the upper left corner, click on the icon «☰» (menu and select the basket (Trash).
  3. Check the file list. If you have the file you want, click on it and select Restore.
  4. The file will return to the original folder (for example, in DCIM/Camera for photo).

For files deleted through Downloads or File Manager, the path is a little different:

  1. Open Files β†’ Categories β†’ Recycle Bin.
  2. Select the desired files with a long press.
  3. Click Restore in the lower menu.

Check the free space on the device (you need at least 10% of the file size)

Turn off automatic sync with Mi Cloud

Close all applications that work with files (gallery, instant messengers)

Connect charging (recovering large files drains the battery)-->

If you don't have files in the Recycle Bin, but you're sure you've deleted them recently, try restarting the device - sometimes the contents of the Recycle Bin display incorrectly due to cache. Also check the folder /storage/emulated/0/Android/data/com.miui.gallery/cache/ - there may be thumbnails of deleted photos.

Deep Memory Scanning: Rootless Recovery Programs

If files were deleted more than 30 days ago or the shopping cart was cleaned, specialized tools will be required. Below are proven applications that run on Xiaomi without superuser rights (root):

  • πŸ” DiskDigger: Scans internal and external memory, finds photos, videos and documents. Free version shows preview, you need to restore Pro (~500 rubles).
  • πŸ“‚ EaseUS MobiSaver: Supports recovery from memory cards and internal storage.
  • πŸ–ΌοΈ PhotoRec (via ADB): Powerful tool for power users, works through adb shell, recovers files by signatures.
  • ☁️ Dumpster: An alternative recycle bin that intercepts deleted files in real time, must be installed before data is lost.

Example of working with DiskDigger:

  1. Install the app from Google Play.
  2. Select Start Basic Scan (without root).
  3. Wait until it is completed (it may take up to an hour).
  4. Tick the required files and click Restore.
  5. Save files to a memory card or cloud (don’t restore them to the same device!).

⚠️ Warning: Never save recovered files to the same partition you are recovering them from! This can lead to overwriting of the remaining "scraps" of data.

πŸ’‘

If you're recovering photos, sort them by date in the scanning app, and often the last deleted files are at the bottom of the list.

Restoring root rights: access to system partitions

If your Xiaomi has an unlocked bootloader and root rights (for example, through Magisk), the chances of recovery are much higher. Root allows you to scan system partitions where traces of deleted files may remain, for example:

  • πŸ—ƒοΈ /data/data/ β€” cache of applications (sometimes stores thumbnails or temporary copies).
  • πŸ”§ /dev/block/mmcblk0 β€” direct access to the raw partition (requires specialized tools like Autopsy or Scalpel).
  • πŸ“₯ /sdcard/MIUI/Backup/ β€” System backups (if automatic backup is enabled).

To scan with root, use:

  1. Root Browser or FX File Explorer for manual search in system folders.
  2. Undelete for Root Users – an app that scans ext4-file-system-level.
  3. Adb shell su -c command "find /data -name '*.jpg'" to search for files by extension (replace jpg with the desired format).

Critical: After obtaining root rights, do not update MIUI via OTA – this can lead to data loss due to partition re-marking.

What to do if nothing works: alternative methods

If the standard methods didn’t work, try these options:

  • πŸ”„ Checking cloud services: Mi Cloud: Settings β†’ Xiaomi account β†’ Mi Cloud β†’ Gallery/Files. Google Photo: photos.google.com β†’ Bin. Yandex.Disk or Mail.ru Cloud: check the folder "RemoteΒ».
  • πŸ“§ Email and instant messengers: Check your attachments to Gmail, Mail.ru or corporate email. On Telegram, open Save Messages or chats where you may have sent files. On WhatsApp, go to Chat. β†’ Three points. β†’ Media.
  • πŸ–₯️ PC Connection: Use Recuva or TestDisk on your computer by connecting Xiaomi in mode MTP. For deep scanning, put the device into Fastboot mode and use it. ADB.

If files have been deleted from a memory card, remove it from your phone and connect it to your computer through a card reader, scan directly, which increases your chances of success, since MIUI does not block access to external drives.

How to increase the chances of recovery?
1. Minimize phone usage after deletion – each new file reduces the likelihood of recovery. 2. Turn off automatic sync (Mi Cloud, Google Photos) to avoid overwriting data. 3. Do not update MIUI – newer firmware versions can change partition structure. 4. Use a memory card to save recovered files, not internal memory.

Loss prevention: how to protect data on Xiaomi

The best way to combat file loss is to prevent it, and here are some proven methods to help avoid problems in the future:

  • ☁️ Automatic backup in Mi Cloud: Go to Settings β†’ Xiaomi account β†’ Mi Cloud β†’ Backup of the device: Enable backup for Gallery, Contacts, Messages and Notes. Set a schedule (e.g. once a week).
  • πŸ“ Local backups: Use Settings β†’ Additionally. β†’ Backup and reset β†’ Local backup. Save copies to a memory card or external drive.
  • πŸ”„ Third-party solutions: Install FolderSync or Sync.com to automatically sync with the cloud. Use Titanium Backup (requires root) for a full backup of applications and data.
  • 🚫 Protection against Accidental Deletion: Enable Deletion Confirmation in Gallery: Gallery Settings β†’ Delete Confirmation: Install Dumpster or Recycle Bin to intercept deleted files.

If you often work with important files, consider buying Xiaomi with support. OTG external SSD-For example, the Xiaomi Mi Portable. SSD 1TB Allows you to backup in one click through the Mi Drive app.

πŸ’‘

Even if files are removed from the Recycle Bin, they can remain in the app cache or MIUI backups. Check /MIUI/Backup/ and /Android/data/ folders regularly for hidden data.

FAQ: Frequent questions about file recovery on Xiaomi

Can I recover files that were deleted a year ago?
Theoretically, yes, but the odds are extremely low. After a year, the data is almost certainly overwritten with new files. Try PhotoRec through ADB, but don't expect to succeed. If the files were important, check the old backups on Mi Cloud or on your computer.
Why aren't my files in the MIUI bin when I deleted them yesterday?
Possible reasons: Files deleted through a third-party application (e.g. ES Explorer or Google Photos) that has its own shopping cart. Recycle Bin disabled in MIUI settings (check Settings β†’ Storage β†’ Recycle Bin). Files deleted from the memory card - it has a separate shopping cart (.trash-1000 folder). Try searching for files through DiskDigger.
Can I recover files after resetting to factory settings?
After a hard reset, recovery is almost impossible, as the /data and /sdcard partitions are formatted. The only chance is if you back up to Mi Cloud or your computer before reset. In the future, use Settings β†’ Additional β†’ Backup and Reset β†’ Local Backup before reset.
How to Recover Deleted Messages in MIUI?
Communications from SMS Messaging is harder to recover than files.Try: Check Mi Cloud: Settings β†’ Xiaomi account β†’ Mi Cloud β†’ Messages. Use them. SMS Backup & Restore (if previously backup) WhatsApp/Telegram check the folders /sdcard/WhatsApp/Databases Or export chats through the messenger settings. SMS You can only scan root rights by scanning. /data/data/com.android.providers.telephony/databases/mmssms.db.
Does flashing your phone help you recover files?
No, Fastboot or Recovery almost always results in data loss. Except if you do a full backup through TWRP before firmware. Other times: Fastboot formats /data. Update through OTA usually saves data, but doesn't guarantee the recovery of deleted files. If the goal is to return files, firmware should be the last option.