- Enabling incremental OTA updates in stock MIUI ROMs requires an intricate setup process, otherwise, it will not work.
- You cannot set up MIUI OTA in recovery mode for MIUI 13/MIUI 14/HyperOS (ie, MIUI Android 12 and higher) ROMs. These are updated directly by the MIUI updater.
- If you are on MIUI 13/14/HyperOS, stop reading now! This guide is for
old
MIUI ROMs.
- To set up MIUI OTA properly, take the following steps (this is mainly for creating a brand new MIUI installation):
- Download the most up-to-date release of OrangeFox Recovery
- Download a full MIUI ROM, and copy it to your phone (normally this should be copied to an external storage device)
- If you don't already have OrangeFox installed, flash the OrangeFox zip with your current custom recovery (or follow the steps in the guides for installing from adb/fastboot)
- Reboot into OrangeFox Recovery (this will have happened automatically if you flashed the OrangeFox zip)
- Go to the OrangeFox settings, tap on "OTA & ROM" and turn on "Enable OTA". If you want to flash a stock MIUI 10/11/12 ROM that is based on Android 9.0 or higher, ensure that the "Disable DM-Verity" box is unticked in the OTA settings, otherwise the incremental MIUI OTA will most definitely not work - the typical symptoms of this failure are that, when you tap on "Reboot now" after downloading the incremental OTA update, nothing will happen - or you just get an error if you try to download the incremental OTA update. If you get this problem, you will need to repeat this entire process (starting with this step #5), with the "Disable DM-Verity" box is unticked in the MIUI OTA settings.
- Go to the “Wipe” menu, and wipe cache/dalvik and data and then reboot OrangeFox (with FBE ROMs you may have decryption isues if you only wipe data - you may need to format data instead - but you could first try without wiping or formatting).
- Flash your full ROM. After the ROM is flashed, OrangeFox will start the "OTA_BAK" process, which will backup your system (and sometimes vendor) and boot partitions into the /sdcard/Fox/OTA directory (this will be on your internal storage). You must NOT delete any of the files in the /sdcard/Fox/OTA directory. If you do, then incremental OTA updates will most definitely fail.
- Reboot your phone, and check that the files in /sdcard/Fox/OTA folder are intact.
- If the files are intact, then you can start to use your phone normally. If the folder is empty, then follow the steps outlined in point 11 below.
- If your data partition was formatted for the ROM installation, booting up the newly installed ROM for the first time will probably result in the ROM encrypting the device. This process will also normally delete the files backed up during the OTA_BAK process (in /sdcard/Fox/OTA). If this happens, you have to return to OrangeFox and dirty-flash the ROM again (ie, without wiping anything). This will allow the OTA_BAK process to run again. If you do not do this, the OTA settings page will simply tell you that you must flash the full ROM. Exactly the same considerations apply every time you format your data partition.
- When MIUI notifies you that there is an update, download the update, using the MIUI updater, and allow it to reboot automatically to OrangeFox
- OrangeFox will install the update automatically. Go and make a cup of tea, and some sandwiches, because this will take
several
minutes (at least 10 minutes). It is a very
involved process, which has 3 stages
- restoring the stock backups from the Fox/OTA folder (about 1-3 minutes), flashing the OTA update itself (about 5-10 minutes), and then creating a new pristine backup in the Fox/OTA folder (about 1-3 minutes)
- OrangeFox will reboot the phone automatically upon completion of the installation of the MIUI OTA update (unless you have ticked "Prevent auto reboot after installing OTA")
- After this, you will not need to flash a full ROM any more - just follow the steps in #9 above
- Enjoy
NOTES:
- If you want to move to a completely different version/build of MIUI, then you will first need to clean-flash the full ROM of that MIUI build, as described above.
- If you formatted your data partition before (or after) flashing your ROM, there is a bit of a rigmarole if you want incremental OTA support. See point 10 above.
- This guide does not apply to Android 12 MIUI ROMs.
If you want incremental OTA support for your existing stock MIUI ROM (ie, not a new installation), then you must take the following steps after the stock MIUI ROM has booted for the first time after flashing it:
- Reboot to OrangeFox
- Make sure that the Enable OTA option is selected
- If you have a MIUI 10/11/12 ROM that is based on Android 9.0 or higher, ensure that the "Disable DM-Verity" box is unticked in the MIUI OTA settings
- Dirty-flash the original zip of your current MIUI ROM (so that it will set up the OTA support)
- Reboot to system
- Reconfigure your ROM, as may be required
- One of the best known examples of block-based incremental OTA is MIUI OTA (see immediately above).
- This kind of OTA update is now being introduced in custom ROMs. The set up process is identical to the set up process for MIUI incremental OTA
- This feature is new (and experimental) for custom ROMs, and it not enabled for all devices - so you first need to ascertain that the device's OrangeFox maintainer has enabled it in his build of OrangeFox. If it has not been enabled, then there is nothing that you can do.
- If you have ascertained that the device's OrangeFox maintainer has enabled this feature, then read on!
- Enabling incremental block-based OTA updates requires an intricate setup process, otherwise, it will not work. To set it up properly, take the following steps:
- Download the custom ROM, and copy it to your phone (normally this should be copied to an external storage device)
- Go to the OrangeFox settings, tap on "OTA & ROM" and turn on "Enable OTA".
- Flash your ROM. After the ROM is flashed, OrangeFox will start the "OTA_BAK" process, which will backup your freshly installed system (and sometimes vendor) images, and the boot partition, into the /sdcard/Fox/OTA/ directory (this will be on your internal storage). You must NOT delete any of the files in the /sdcard/Fox/OTA directory. If you do, then incremental OTA updates will most definitely fail.
- Reboot your phone, and check that the files in /sdcard/Fox/OTA folder are intact.
- If the files are intact, then you can start to use your phone normally. If the folder is empty, then follow the steps outlined in point 6 below.
- If your data partition was formatted for the ROM installation, booting up the newly installed ROM for the first time will probably result in the ROM encrypting the device. This process will also normally delete the files backed up during the OTA_BAK process (in /sdcard/Fox/OTA). If this happens, you have to return to OrangeFox and dirty-flash the ROM again (ie, without wiping anything). This will allow the OTA_BAK process to run again. If you do not do this, the OTA settings page will simply tell you that you must flash the full ROM.
- When ROM notifies you that there is an update, download the update, using the ROM's updater app, and allow it to reboot automatically to OrangeFox (Note: do not try to flash a block-based OTA zip manually from the recovery - this will not work - it is necessary to do all incremental OTA updates via the ROM's updater app)
- OrangeFox will install the OTA update automatically (this can take several minutes)
- OrangeFox will normally reboot the phone automatically upon completion of the installation of the OTA update
- After this, you should not need to flash a full ROM any more
- Bootup OrangeFox
- Backup your internal storage (user files, eg, photos, etc) to an external device
- Wipe cache, dalvik, and system
- Format data
- Reboot OrangeFox (just swipe to continue if it complains that no ROM is installed)
- For a stock MIUI 10, MIUI 11, or MIUI 12 ROM that is based on Android 9.0 or higher, ensure that the "Disable DM-Verity" box is unticked in the MIUI OTA settings. If that box is ticked, then incremental MIUI OTA will not work
- Flash the MIUI ROM
- Bootup the ROM (during the bootup process, MIUI will probably encrypt the data partition, unless you ticked "Disable Forced Encryption" before flashing MIUI; the encryption process will also wipe your internal storage - see below for the implications of this)
- Reboot to OrangeFox
- Restore the backup of your internal storage
¶ Returning to a MIUI ROM from a custom ROM (old devices with unofficial/simulated Treble and that do not have a dedicated vendor partition)
- "Simulated" Treble ROMs on many devices use MIUI’s “cust” partition for their vendor image. This process removes the Xiaomi proprietary files that are necessary for MIUI to run. These files must be restored, otherwise MIUI will not work properly.
- For this purpose, the cleanest and easiest way to return to MIUI from a simulated Treble ROM is to flash a full fastboot MIUI ROM, using the Mi Flash tool.
- If you did not create a backup of your MIUI cust partition to MicroSD or USB-OTG before installing a Treble ROM, then you must use the method just described above (or else you can try flashing a stock vendor image for your device (if there is one for your device there))
- If you DID create a backup of your MIUI cust partition (in the newest versions of OrangeFox, this would be the “vendor” partition – it points to the same location as “cust”) to MicroSD or USB-OTG, then you can use OrangeFox to install MIUI when coming from a Treble ROM - but you have to take certain steps:
- Backup your internal memory to an external device (eg, MicroSD, USB-OTG, or your PC). DO NOT SKIP THIS STEP!
- Copy the latest stable MIUI ROM to your MicroSD or USB-OTG storage
- Boot OrangeFox
- Make sure that OrangeFox can read your MicroSD or USB-OTG storage, and can see the MIUI ROM that you copied there. This is the ROM that you will install in the steps below.
- Select the “Wipe” menu and wipe everything - system, dalvik, cache, vendor, etc (except MicroSD/USB-OTG)
- Format data (“format” - not “wipe”) - you will lose all the contents of your internal memory after doing this
- Reboot OrangeFox - you will see a message saying “No OS installed …” - just swipe to reboot OrangeFox
- Restore the backup of your MIUI cust partition (in the latest releases of OrangeFox, this will need to be restored to the "vendor" partition)
- Flash your MIUI ROM
- Reboot to system, and wait for a long time ...
- When ready, restore your backup of your internal memory from your external storage device.
- Tap on Menu, and tap on the settings icon at the top right of the screen. You will see all the various settings, including "OTA & ROM".
- No - unless you want your incremental OTA updates to fail completely.