Xiaomi Backup Restore Bug: Black Screen and Crash
"TLDR: This article describes an experience of encountering a black screen and app crash issue during backup restoration on a Xiaomi device, which was successfully resolved by extracting the compressed archive first. It analyzes possible causes of the bug and points out certain uncertainties in Xiaomi's device restoration mechanism."
I've been flashing my phone over the past couple of days and ran into a bug-like situation.
After backing up, the phone generates a 2025xxxxx.zip compressed file. After transferring it via USB cable to MIUI/backup/AllBackup, the backup record appears on the device restore screen. However, when I start the restore process, the screen goes black and becomes unresponsive.
Later, I extracted the compressed file in MIUI/backup/AllBackup, and the device restore screen showed two restore records with identical names. Clicking the new restore record successfully completed the restore.
The cause of the bug is unknown:
- My guess is that Xiaomi's device restore works by scanning all files or folders under AllBackup that look like dates, and displays one record for each match.
- But I'm not sure about the exact logic in Xiaomi's restore code. Sometimes the compressed file can be restored directly, but in my case, the compressed file caused a black screen and crash. It only restored properly after extraction.