[Guide] Flash MIUI OTA/Stock/Any MIUI based ROM from recovery without bricking device

Search This thread

sofinoromi

Member
Oct 2, 2013
12
7
Lockscreen password changed

Hi guys. Sorry for this silly question. I completed the process of installing stock miui rom from pixel rom. When the reboot process completed, the phone asked for password but it is a different password from my previous one. Now I’m stuck at lockscreen and I’ve tried a lot of combination and still to no avail. Can someone help?
 

TheCrowX

Member
Feb 11, 2014
18
0
hi everyone today after installing lastest update ( android 10 ) when i boot in orangefox it no more asks for password just a swipe to enter and can t install anything
how can i fix this please
 

Imagitom

Member
Dec 28, 2010
35
2
Paris
hi everyone today after installing lastest update ( android 10 ) when i boot in orangefox it no more asks for password just a swipe to enter and can t install anything
how can i fix this please
Hi, this issue has been spotted last month since new boot structure in 12.5 Xiaomi ROMS appeared.
Thus, TWRP and Orange Fox are disturbed in their decryption process.
It seems a workaround exists with a version of TWRP, we are still waiting for a new version of Orange Fox (and an official one from TWRP too).
So for now :
- Take the TWRP from following quote, flash it from Orange Fox (if you can) or in fastboot mode
- Reboot to recovery

A fix has been found! Follow this link to BanditGR's post on Xiaomi.eu forums. Here is part of his comment: "Mystery solved. The issue with the TWRP on the latest ROM for ginkgo occured due to changes in the boot image. This is also the reason that flashing to a previous ROM (which would obviously write a new boot image) would automatically correct the issue. Xiaomi, in their not so infinite wisdom, saw fit to implement changes in the kernel so that the recovery would not be able to read the decryption keys, at least not without recompiling the kernel. The problem was investigated and fixed over @XiaoMi-miui.gr."

You can download the unofficial version of TWRP here.

It would be great if these changes could be carried over to OrangeFox for RN8 and other devices facing this issue. I hope our maintainer @Teguhpunya looks into this soon.
 

the_weird_aquarian

Senior Member
Nov 13, 2016
396
220
Lockscreen password changed

Hi guys. Sorry for this silly question. I completed the process of installing stock miui rom from pixel rom. When the reboot process completed, the phone asked for password but it is a different password from my previous one. Now I’m stuck at lockscreen and I’ve tried a lot of combination and still to no avail. Can someone help?
This is the process
 

fratellos

Senior Member
Aug 8, 2012
149
17
Hello! I have Redmi Note 8 (simple, gingko, 4/64). Immediately after the purchase, I installed Indonesia software (for non-Google caller, call recorder, sms). I was extremely pleased ... until I upgraded it to 12.0.1, OTA, officially! Now the battery drops seeing with my eyes .. before it lasted 5-6 days, now 3, maximum 4. I would like to put back MIUI 11 that I had (with MiFlash, obviously). From what you know, is there a danger of brick ??? Is the operation possible? Note: the phone has the bootloader unlocked (otherwise I couldn't have made the switch from EU to Indonesia) Thanks in advance for any response!
 

the_weird_aquarian

Senior Member
Nov 13, 2016
396
220
Hello! I have Redmi Note 8 (simple, gingko, 4/64). Immediately after the purchase, I installed Indonesia software (for non-Google caller, call recorder, sms). I was extremely pleased ... until I upgraded it to 12.0.1, OTA, officially! Now the battery drops seeing with my eyes .. before it lasted 5-6 days, now 3, maximum 4. I would like to put back MIUI 11 that I had (with MiFlash, obviously). From what you know, is there a danger of brick ??? Is the operation possible? Note: the phone has the bootloader unlocked (otherwise I couldn't have made the switch from EU to Indonesia) Thanks in advance for any response!
you can flash the recovery rom too without any issues.. If you want to flash via miFlash then yes you can do that too... however make sure not to lock the bootloader while flashing another region rom with miflash .. select "clean_all" and NOT "clean_all_and_lock". 🙂
 
  • Like
Reactions: fratellos

Reza. M

Member
Jun 11, 2020
5
1
SHZ
Redmi K20 / Xiaomi Mi 9T
hello, thanks for all
for back to encrypted device just flash the rom and format data?
because you said if i decrypted OFox use about 5GB of my data for next OTA update and i don't want it . Thank u bro (y)

and what happens if i use encrypt option in my setting
 
Last edited:

dumanoldum

Member
Jun 13, 2013
6
1
miyana
Phone: willow unlocked BL
Recovery: orangefox 11.1.0
Current ROM: MIUI Russian 12.0.5
Came from: RRos v8.7
Problem: NFC always on( or trying to be) and options disabled. How do i turn it off?
Screenshot_2021-08-11-00-15-09-323_com.android.settings.jpg
 
I have some issue with flashing last OTA update for my Note 8T. Just received the Android 11 update and when the phone reboots it only goes to almost 1% then it reboots... so, no flashing ota...
Had same issue when I had TWRP installed but I went back to stock recovery.
Why is this happening?
 

nullifiEdNTITY

New member
Aug 9, 2022
1
0
2. If coming from a non MIUI based rom to MIUI based one or if switching from current MIUI based rom to completely different MIUI based one then select data, cache, dalvik, system, vendor.
- Now go to "Install" and flash your MIUI ROM. (This is just a one time process.)
- After the ROM is flashed, OrangeFox will start the "OTA_BAK" process, which will backup your system and boot partitions into the /sdcard/Fox/OTA directory. 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 > system.
Hi Im new to these and my rn8 is already unlocked/ From china rom to now global rom/ Planning to flash eu rom instead. How much sd card storage is needed?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Code:
    /*
     * Your warranty is now void.
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. 
     * Please do some research if you have any concerns.
     * YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    A guide to flash MIUI OTA/Stock/Any MIUI based rom from recovery without any bootloops or bricking device.

    First things first, if you haven't done any modifications to your device (not even unlocked bootloader), then this guide is probably not for you. Just update via the Updater app. If you want to unlock bootloader and root read this guide first then come back. :)

    Now if you have unlocked bootloader with TWRP installed and encrypted device then you can flash full ROM from TWRP without any issues.
    Staying on an encrypted device is recommend for better security.

    To check if your device is encrypted or not go to Phone Settings > Passwords & security > Privacy > Encryption & credentials > check if it shows encrypted or not.

    To decrypt your internal storage (Not recommended):
    Make sure you have a backup of your data copied in PC.
    - In TWRP go to Wipe and select Format Data(don't go to advanced). Type yes and format data. [This process will format all your data so make sure your data is backed up].
    - Go back to TWRP home and Reboot > Recovery.
    - Reboot > System.

    Now if you check again in Phone settings it'll show "Phone not encrypted".

    If you have a decrypted device and want to flash MIUI rom or OTA through recovery you'll face bootloop.
    Then there are two solutions to overcome this issue:

    1. After flashing full MIUI rom through TWRP you need to format data again. But you will have to backup your data to PC everytime as your internal will be formatted. And then you would have to go through the hassle of setting up your phone which takes atleast 15 mins.

    2. A better solution is to use another recovery like OrangeFox recovery. It has a special MIUI OTA support. So you can flash MIUI OTA and any MIUI based rom from recovery without bootloop, formatting data or bricking device in any way.

    Here's how to use OrangeFox recovery:
    Make sure you have a backup of your data copied in PC.
    These steps work for both encrypted and non-encrypted devices
    - Download the stock MIUI Recovery ROM for your region or any other MIUI based custom rom of your choice, and copy it to your phone’s storage.
    - Download the OrangeFox recovery zip from here.
    - If you don't have any recovery installed right now then extract the recovery.img file from the zip and follow the "Flashing TWRP" steps from here
    - If you already have TWRP then go to Install > flash zip normally. Your device will boot into OrangeFox recovery automatically in 5 seconds.
    - Go to the Menu > tap on OrangeFox settings icon in top right corner, and enable these under MIUI OTA settings :
    1. Support MIUI incremental OTA
    2. Include system in OTA survival
    3. Incremental OTA signature verification
    4. Prevent auto reboot after installing OTA
    5. Disable DM-Verity
    6. Disable Forced Encryption (Don't enable this if you have an encrypted device already and want to stay encrypted)
    7. Aggressive stock recovery deactivation
    - Now go to the “Wipe” menu :
    1. If already on a MIUI based rom and flashing your current MIUI rom zip then select data, cache, and dalvik.
    2. If coming from a non MIUI based rom to MIUI based one or if switching from current MIUI based rom to completely different MIUI based one then select data, cache, dalvik, system, vendor.
    - Now go to "Install" and flash your MIUI ROM. (This is just a one time process.)
    - After the ROM is flashed, OrangeFox will start the "OTA_BAK" process, which will backup your system and boot partitions into the /sdcard/Fox/OTA directory. 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 > system.

    Now when MIUI notifies you that there is an update:
    - Download the update, using the MIUI updater app/official website.
    - If on an encrypted device allow it to reboot automatically to OrangeFox. If decrypted, boot to recovery manually and under miui OTA settings enable the Disable Forced Encryption option first and then flash OTA from recovery.
    - OrangeFox will install the update automatically (this might take several minutes).
    - Your phone will reboot automatically upon completion of the installation of the MIUI OTA update (If it doesn't then reboot manually).
    - After this, you will not need to flash a full rom any more.
    - Enjoy your updated MIUI :)

    Links
    1. OrangeFox Recovery
    2. Stock MIUI Recovery ROM


    If this helped you then hit the Thanks Button. Good Luck. :)
    2
    thanks
    Can u pls tell me that, as my data is encrypted so every time i put password to decrypt it in OF recovery.. but i found in Miui OTA>Disable DM-Verity is unchecked. Is that okay or i should check mark that every time when flash any zip etc?
    Disable dm-verity is used to stop the stock mi recovery from coming back. Disable force encryption is required to stop the encryption. Now in OF, "Disable DM-Verity" and "Disable Force Encryption" options are always unchecked automatically everytime you reboot.
    If you're encrypted and you're flashing the miui zip again(like updating maybe or something) only then check the disable dm verity option(so that stock mi recovery doesn't come back)...for other zips like magisk, gapps whatever no need to do anything just flash....
    1
    im using android 10 syberia project and wanted to go back stock rom, will it work the same way?

    Yes absolutely :) just make sure to wipe dalvic,cache,data,system,vendor...rest procedure is same
    1
    Hello
    Can I flash Global Stable 11.0.4.0 rom via orange fox recovery over India stable rom??
    What's the process
    Plz reply...
    Yes you can...in wipe select dalvic,cache,data,system, vendor...rest process is same. :)
    1
    Hello! I have Redmi Note 8 (simple, gingko, 4/64). Immediately after the purchase, I installed Indonesia software (for non-Google caller, call recorder, sms). I was extremely pleased ... until I upgraded it to 12.0.1, OTA, officially! Now the battery drops seeing with my eyes .. before it lasted 5-6 days, now 3, maximum 4. I would like to put back MIUI 11 that I had (with MiFlash, obviously). From what you know, is there a danger of brick ??? Is the operation possible? Note: the phone has the bootloader unlocked (otherwise I couldn't have made the switch from EU to Indonesia) Thanks in advance for any response!
    you can flash the recovery rom too without any issues.. If you want to flash via miFlash then yes you can do that too... however make sure not to lock the bootloader while flashing another region rom with miflash .. select "clean_all" and NOT "clean_all_and_lock". 🙂