Are you trying to flash Xiaomi through an iPhone? Or do you want to use iOS Restore mode to unlock the bootloader on your Mi/Redmi/POCO device? At first glance, the combination of “iphone” and “xiaomi” in one query seems absurd — but in practice, such scenarios are more common than you think. For example, when the iPhone acts as an “intermediary” for downloading firmware through iTunes, and then these files are transferred to Xiaomi for installation through the Mi Flash Tool. Or when MacBook owners (where the iPhone is synchronized by default) try to flash through fastboot on the same machine.
In this article, we’ll break down two key iPhone modes that can come in handy when working with Xiaomi devices: Recovery Mode and DFU Mode (Firmware Update Mode). You’ll learn how to activate them, what the difference is between them, and why using an iPhone to run Xiaomi through fastboot requires you to transfer your iPhone to DFU — otherwise the Mi Flash Tool won’t see the device. We’ll also look at typical bugs (such as Error 4013 or Device not) and how to get around them.
Why iPhone is needed for Xiaomi firmware: 3 real scenarios
So, to start with, why do you even want to link your iPhone and Xiaomi in the same process? Because usually, Mi/Redmi firmware runs through a Windows PC with the Mi Flash Tool or fastboot, and it turns out that there are at least three cases where the iPhone becomes part of the chain:
- 📱 Using a MacBook for Xiaomi firmware. If you only have an Apple computer, you can use a fastboot or a fastboot. ADB You will have to transfer the iPhone to special modes so that the system recognizes the connected Xiaomi as a firmware device.
- 🔄 Firmware porting via iTunes. Some users download custom firmware (like LineageOS or Pixel Experience) to iPhones via Safari, and then transfer it to Xiaomi over AirDrop or through the cloud.
- 🔓 Unlock Xiaomi bootloader on iOS devices. To get the unlock code (Mi Unlock) sometimes requires confirmation through an app that only works on iPhone (for example, for users from China).
Additionally, the iPhone can come in handy for backing up data before Xiaomi’s firmware, for example, if you transfer contacts or photos from Redmi to your iPhone before resetting, and then return them back after installing a new firmware.
Recovery Mode vs DFU Mode: What’s the difference and what to choose for Xiaomi
Before you put your iPhone into any of these modes, it’s important to understand their purpose, both of which are used to restore the system, but are suitable for different tasks when working with Xiaomi:
| Parameter | Recovery Mode | DFU Mode |
|---|---|---|
| Appointment | Restore iOS via iTunes/Finder, Update without Data Loss | Deep recovery, firmware with full reset, unlocking the bootloader |
| Is it good for Xiaomi? | ❌ No (used only for iPhone) | ✅ Yes (required for fastboot teams on Mac) |
| iPhone screen | The iTunes logo and cable are displayed | Black screen (no backlighting) |
| Will Xiaomi be recognized? | ❌ No. | ✅ Yes (if you connect Xiaomi to fastboot) |
You'll need DFU Mode to work with Xiaomi. Why? Because:
- Recovery Mode is an easy-to-recover iPhone mode that doesn’t allow access to low-level commands. It’s useless for Xiaomi’s firmware.
- DFU Mode allows your iPhone (or rather your MacBook) to communicate with a connected Xiaomi via fastboot or ADB. Without it, the Mi Flash Tool won’t see the device.
💡
DFU Mode is the only iPhone mode that allows you to flash Xiaomi through a Mac. Recovery Mode is not suitable for this.
Step-by-step: how to transfer iPhone to DFU Mode to work with Xiaomi
Now, let's get to the point: To make sure your MacBook (or iPhone as a middleman) can recognize Xiaomi in fastboot mode, follow these steps:
Make sure your Mac has Homebrew and fastboot | Connect Xiaomi to your Mac via USB-C/USB-A| iPhone charge at least 50% |Close all programs except Terminal
-->
- Connect Xiaomi to the Mac via cable (preferably original).The device should be in fastboot mode (clip Power + Volume down on Xiaomi off).
- Open Terminal on Mac and check if the system sees the device: fastboot devices If the list is empty, move on to the next step.
- Translate your iPhone to DFU Mode: Connect your iPhone to your Mac. Quickly press and release Volume Up. Quickly press and release Volume Down. Press the Side button (or Home on older models) and hold for 10 seconds until the screen goes out. Without releasing the Side button, press Volume Down for 5 seconds, then release the Side button, continuing to hold Volume Down for another 10 seconds.
Check out the Xiaomi connection
fastboot devicesThe device must now appear in the list (e.g. 1234567890abcdef fastboot).
If Xiaomi is still not visible, try:
- 🔌 Change. USB-port on Mac (some ports do not support data transfer to Mac) DFU).
- 🔄 Restart the Mac and repeat the procedure.
- 🛠 Install drivers for Xiaomi via Homebrew: brew install android-platform-tools
What if the Mac doesn’t see Xiaomi in DFU?
Common Mistakes and How to Fix Them
When trying to flash Xiaomi through a Mac with an iPhone connected to DFU Mode, users often encounter errors.
⚠️ Note: If you see an Error 4013 error in the Mi Flash Tool, it means that the iPhone is not fully translated into the new device. DFU Repeat the procedure by holding the buttons 2-3 seconds longer.
| Mistake. | Reason. | Decision |
|---|---|---|
| Device not found | Mac doesn’t recognize Xiaomi in fastboot | Check the cable, reinstall Android-platform-tools, try another one USB-port |
| Waiting for device | Xiaomi is not in fastboot mode | Turn off Xiaomi, pinch Power + Volume down for 10 seconds |
| Error: cannot load 'miui.zip' | Firmware file damaged | Download the firmware again, check the checksum (MD5) |
| Remote: device is locked | Xiaomi bootloader not unlocked | Get permission via Mi Unlock Tool (you may need an iPhone to confirm SMS) |
Another common problem is that the Mac doesn't see Xiaomi after the reboot, and that's because the iPhone is in the same position. DFU Mode "takes" part USB-Resources: Decision:
- Turn off the Mac's iPhone.
- Restart the Mac.
- Connect first to Xiaomi, then to iPhone.
sudo /Applications/Xiaomi/MiFlash.app/Contents/MacOS/MiFlash
-->
How to exit DFU Mode on iPhone after Xiaomi firmware
After successful firmware Xiaomi, it is important to properly remove the iPhone from the DFU Mode, otherwise it may hang on the black screen.
- 🔄 Forced reboot: On the iPhone 8 And newer: quickly press Volume up, then Volume down, then hold the Side button until the Apple logo appears. 7/7 Plus: Hold the Side button + Loudness down. On the iPhone. 6s And older: keep it home. + Nutrition.
- 🖥 Through iTunes/Finder: Connect your iPhone to your Mac. Open Finder (or iTunes on older macOS). Click "Restore iPhone" and the system will automatically output the device from the Mac. DFU.
⚠️ Note: If after leaving the DFU iPhone Mode is not turning on, plug it into charging for 30 minutes.It may have run out of battery due to prolonged stay in recovery mode.
If none of these methods worked, try to restore your iPhone through Recovery Mode.
- Connect your iPhone to your Mac.
- Press the Side button (or Home on older models) and hold until the screen with the cable and iTunes logo appears.
- In Finder, select "Restore".
Alternative ways to run Xiaomi without iPhone
If you can’t make iPhone and Xiaomi “friend” through DFU Mode, consider alternative firmware options:
- 🖥 Use Windows PC. Mi Flash Tool officially supports only Windows. A virtual machine (such as Parallels Desktop or VMware Fusion) on a Mac may not recognize Xiaomi in fastboot.
- 📱 Squeeze through TWRP. If Xiaomi has custom recavers installed, you can download the firmware directly to the device (for example, through the ADB Sideload and install it without PC.
- ☁️ Update by air (OTA). If you do not need custom firmware, check for updates in Settings → The phone. → Updating the system.
- 🔧 Use Linux. Some distributions (like Ubuntu) fastboot is more stable than macOS. You can install Linux on a virtual machine or boot from Live. USB.
If you still want to flash Xiaomi through a Mac, but without the involvement of the iPhone, try the following method:
- Install Android File Transfer for macOS.
- Download the firmware for Xiaomi in.tgz format and unpack it.
- Connect Xiaomi in fastboot mode and execute: fastboot flash boot.img fastboot flash system.img fastboot reboot