Related
Edit: Figured out the missing step! Wasn't mentioned on any guide I read, or if it was, I'm afraid it wasn't clear :'( Hopefully this guide helps other people though, I've highlighted the step I added!
Hi Mi9 Forum!
Longtime S7 user here, I've flashed (literally) hundreds of roms over the years, but unfortunately lost my device so switched to a Mi9 (Which is ****ing huge!)
Earlier today, after the (arduous 1-week wait) I unlocked my phone (now reads unlocked on boot up), and set about testing three different roms.
From what I understood, I needed to flash a Vendor image before the actual rom itself, so I installed TWRP, flashed the vendor image, then tried flashing the ROM, but alas, I got kicked back to TWRP.
The steps I've taken a listed below, perhaps I've missed something obvious, or not so obvious, but any help would be appreciated!
UNLOCKING
Unlocked phone with Mi tool (Reads unlocked on bootscreen now)
Booted into Fastbook (Vol down + Power)
Plugged in
Used MinimalADB to push TWRP (3.3.1.42) onto my device
Unplugged and rebooted (Vol up + Power)
Plugged back in and entered into TWRP (Huzzah!)
Pushed two files into my "/tmp/" folder, these were xiaomi.eu_multi_MI9_V11.0.2.0.QFACNXM_v11-10.zip, and Magisk (V20)
Went to Wipe > Format Data > "Yes"
Back to TWRP Home, went to Install, and installed the xiaomi.eu mentioned above, then installed Magisk
Once both were done, I restarted, phone loaded up perfectly fine, and had Magisk installed
It was at this point I decided to try a custom rom:
CUSTOM ROM
Booted into TWRP
[*]Selected to Wipe > Format Data > "Yes"
I wiped System, Vendor, Data, Cache, and Dalvik
Pushed the Vendor 9.8.1 file into my "/tmp/" folder, along with whatever ROM I was testing (Tried with Syberia project, AOSPExtended, and ResurrectionRemix), GAPPS, and Magisk
Flashed the Vendor file
Flashed the ROM
Flashed GAPPS (Where it wasn't included with whatever ROM I was testing)
Flashed Magisk (This began giving me ERROR-1 here, even though it was exactly the same file that worked fine earlier.)
Once all that was done, I restarted the phone, it booted up fine, I saw the "Mi" bootscreen along with the "unlocked" at the bottom...Then the phone restarted.
It went to the same bootscreen once more, before restarting once again, and kicking me into TWRP.
I've tried it several times now, with different roms, both with/without installing GAPPS/Magisk, but I always get the same result.
I've been on these forums for a while, I know usually people post without reading, but that's not what I've done, I've read up on what to do, downloaded all the necessary (I think!) files ahead of time, and documented everything I did (in-case of a cockup!). So yes, I really have tried, and I really have searched
Any help, or direction, or hints, or magic wishes anybody can give me regarding this would be much appreciated!
same problem happened to me
i face the same problem every time without any solution i can only flash miui roms not aosp roms?
maheg said:
i face the same problem every time without any solution i can only flash miui roms not aosp roms?
Click to expand...
Click to collapse
Using the above steps, I have been able to flash AOSP, and Miui roms.
Though I always go back to Miui because it has the best camera app.
Cant boot into system after installing miui11. Everytime when i boot into system it reboots into twrp.
nerijusas said:
Cant boot into system after installing miui11. Everytime when i boot into system it reboots into twrp.
Click to expand...
Click to collapse
More details needed if you want some help or all you wanted is some condolence?
P.S. If you don't know what details, just describe what actions have been taken I was on ROM x versions x.x.x with TWRP x, how you flashed MIUI11 and what MIUI11 ROM and version you used.
TWRP version is: 3.3.1-42
I was on original rom and I used this rom: xiaomi.eu_multi_MI9_V11.0.2.0.QFACNXM_v11-10
Procedure: I wiped dalvik/ART cahce, cache, System Data and then installed the rom and rebooted and I am now in bootloop.
P.S I have global version
nerijusas said:
TWRP version is: 3.3.1-42
I was on original rom and I used this rom: xiaomi.eu_multi_MI9_V11.0.2.0.QFACNXM_v11-10
Procedure: I wiped dalvik/ART cahce, cache, System Data and then installed the rom and rebooted and I am now in bootloop.
Click to expand...
Click to collapse
Does your TWRP successfully decrypt data now? Do you have access to files in TWRP? Or you just see strange names.
If that is the case, just format data, it's an option in wipe menu. And then reflash ROM.
btw wiping system is not needed and useless.
Decrypts successfully because i install rom from internal storage and still it doesnt help.
nerijusas said:
Decrypts successfully because i install rom from internal storage and still it doesnt help.
Click to expand...
Click to collapse
Then everything should work, try to read this thread: https://xiaomi.eu/community/threads/miui-11-0-stable-release.52628/ , may be you not the only one.
But i would try format data any way. Format will remove everything and will create a fresh unecrypted file system. Wipe only delete files.
If it won't help you may try to flash fastboot ROM, and then format and etc.
btw When you wipe cache/dalvik, it takes some time to boot, it can be 5-10 minutes.
Hi all,
I was on xiaomi.eu MIUI 11 ROM for some time, but wanted to switch to either Evolution or Syberia ROM.
I did a complete wipe and installed evolution os trough twrp... but i forgot to remove encryption so i bricked my device...
So then, I flashed the latest stock rom (11.05)with Xiaomi flash tool, but then i was stuck with the chinese ROM so...
1. I went back to bootloader and flashed mauronofrio's TWRP recovery .
2. completely wiped phone; Cache,System,Data,Internal storage
3. copied Evolution OS 4.1 to my phone
4. installed zip trough TWRP, all successfull
5. but then when rebooting, TWRP says:"No OS installed, do you wish to continue"
6. i tried other ROMs like xiaomi.eu and syberia, but these would either give me the same problem, or just bootloop until iam back in the fastboot screen...
Anyone any idea what iam doing wrong?
dev-DaT said:
Hi all,
I was on xiaomi.eu MIUI 11 ROM for some time, but wanted to switch to either Evolution or Syberia ROM.
I did a complete wipe and installed evolution os trough twrp... but i forgot to remove encryption so i bricked my device...
So then, I flashed the latest stock rom (11.05)with Xiaomi flash tool, but then i was stuck with the chinese ROM so...
1. I went back to bootloader and flashed mauronofrio's TWRP recovery .
2. completely wiped phone; Cache,System,Data,Internal storage
3. copied Evolution OS 4.1 to my phone
4. installed zip trough TWRP, all successfull
5. but then when rebooting, TWRP says:"No OS installed, do you wish to continue"
6. i tried other ROMs like xiaomi.eu and syberia, but these would either give me the same problem, or just bootloop until iam back in the fastboot screen...
Anyone any idea what iam doing wrong?
Click to expand...
Click to collapse
This works for me every time.
1 Flash the latest fastboot ROM.
2 Flash TWRP (same one you used)
3 Boot into TWRP (use the vol+ button when booting)
4 In format menu swipe to factory reset, then format data (VERY IMPORTANT this must be FORMAT not just wipe)
5 In reboot menu boot into recovery, this ensures TWRP correctly accesses the newly formatted data partition.
6 Copy over the ROM (and GApps, if needed and/or Magisk)
7 Flash the ROM, (then GApps if needed)
8 Boot into system and do the initial setup
9 If installing Magisk, boot back to TWRP and install Magisk.
There is no need to wipe anything else. There is no need to wipe anything again after installing. There is no need to disable encryption or dm-verity.
Robbo.5000 said:
This works for me every time.
1 Flash the latest fastboot ROM.
2 Flash TWRP (same one you used)
3 Boot into TWRP (use the vol+ button when booting)
4 In format menu swipe to factory reset, then format data (VERY IMPORTANT this must be FORMAT not just wipe)
5 In reboot menu boot into recovery, this ensures TWRP correctly accesses the newly formatted data partition.
6 Copy over the ROM (and GApps, if needed and/or Magisk)
7 Flash the ROM, (then GApps if needed)
8 Boot into system and do the initial setup
9 If installing Magisk, boot back to TWRP and install Magisk.
There is no need to wipe anything else. There is no need to wipe anything again after installing. There is no need to disable encryption or dm-verity.
Click to expand...
Click to collapse
thanks, i always thought that a wipe was sufficient, or at least equal to a format... anyways will report back later when i have time to try it. lets hope it works because i can't handle this chinese rom
dev-DaT said:
thanks, i always thought that a wipe was sufficient, or at least equal to a format... anyways will report back later when i have time to try it. lets hope it works because i can't handle this chinese rom
Click to expand...
Click to collapse
The format is needed to temporarily remove encryption
I've just remembered that I missed an important step. Call it step 1.5
If you going to flash immediately after flashing official MIUI you must boot into MIUI once before doing anything else. You don't need to go through the set-up, you can boot immediately into fastboot after you get to the initial set-up page. The first boot finalises the install and is needed before you flash over the top of it. That may be the cause of your issue if you had missed this before.
Robbo.5000 said:
The format is needed to temporarily remove encryption
I've just remembered that I missed an important step. Call it step 1.5
If you going to flash immediately after flashing official MIUI you must boot into MIUI once before doing anything else. You don't need to go through the set-up, you can boot immediately into fastboot after you get to the initial set-up page. The first boot finalises the install and is needed before you flash over the top of it. That may be the cause of your issue if you had missed this before.
Click to expand...
Click to collapse
Ok so i flashed TWRP again, rebooted to stock rom and then rebooted into recovery, but the stock recovery is still there.
When i flash TWRP and reboot into recovery immediately i can enter TWRP, but if i reboot the phone to MIUI and then reboot again, TWRP is gone again...
It seems like TWRP does not persist... now iam stuck again on fastboot screen because i wiped + formatted everything.
Edit:
When i want to flash recovery it says "OKAY" but it is unable to boot:
Sending 'recovery' (65536 KB) OKAY [ 1.562s]
Writing 'recovery' OKAY [ 0.333s]
Finished. Total time: 1.989s
Sending 'boot.img' (65536 KB) OKAY [ 1.547s]
Booting FAILED (remote: 'Failed to load/authenticate boot image: Load Error')
fastboot: error: Command failed
dev-DaT said:
Ok so i flashed TWRP again, rebooted to stock rom and then rebooted into recovery, but the stock recovery is still there.
When i flash TWRP and reboot into recovery immediately i can enter TWRP, but if i reboot the phone to MIUI and then reboot again, TWRP is gone again...
It seems like TWRP does not persist... If i wipe all data trough TWRP and then reboot, i don't have OS but i do reboot back into TWRP, because well, there is nothing else...
Click to expand...
Click to collapse
This is normal, MIUI will restore stock recovery of the recovery partition changes. In order to persist TWRP you need to either install Magisk, disable dm-verity or install a custom ROM.
If you are going to flash a custom ROM, then you should do so immediately after flashing TWRP.
After formatting data, TWRP has an issue seeing the data partition, so go to the reboot menu in TWRP and select to reboot to recovery.
Then you can immediately install the ROM of choice. You cannot boot back into system as you'll lose TWRP.
Robbo.5000 said:
This is normal, MIUI will restore stock recovery of the recovery partition changes. In order to persist TWRP you need to either install Magisk, disable dm-verity or install a custom ROM.
If you are going to flash a custom ROM, then you should do so immediately after flashing TWRP.
After formatting data, TWRP has an issue seeing the data partition, so go to the reboot menu in TWRP and select to reboot to recovery.
Then you can immediately install the ROM of choice. You cannot boot back into system as you'll lose TWRP.
Click to expand...
Click to collapse
Ok, it appears that everytime i wipe system, i am not able to boot anymore into TWRP... Am i supposed to wipe System? or only wipe data & format data
dev-DaT said:
Ok, it appears that everytime i wipe system, i am not able to boot anymore into TWRP... Am i supposed to wipe System? or only wipe data & format data
Click to expand...
Click to collapse
There is no need to wipe system. You only need to wipe cache and dalvik and format data. (I choose to factory reset because it's easier in TWRP, but you could do advanced wipe and select cache and dalvik, then format data. Follow the steps exactly, but include my later step 1.5
I've just followed this myself today, as I've moved from LOS to the latest unofficial Havoc build.
In theory you could start by booting to fastboot and flashing TWRP again, then follow the steps from that point. You probably don't need to install MIUI.
Robbo.5000 said:
There is no need to wipe system. You only need to wipe cache and dalvik and format data. (I choose to factory reset because it's easier in TWRP, but you could do advanced wipe and select cache and dalvik, then format data. Follow the steps exactly, but include my later step 1.5
I've just followed this myself today, as I've moved from LOS to the latest unofficial Havoc build.
In theory you could start by booting to fastboot and flashing TWRP again, then follow the steps from that point. You probably don't need to install MIUI.
Click to expand...
Click to collapse
Ok thanks a lot! So no need to wipe system partition after stock rom install. just wipe cache/dalvik/data, got it.
Most ROM install guides tell you to wipe /system when coming from stock rom. I guess this requirement has changed? or depends on what ROM you're coming from?
Use can use my guide
https://forum.xda-developers.com/k20-pro/how-to/simple-beginners-guide-to-raphaelin-t4020543
it has how to flash roms, and fastboot fix. (which tells why the Recovery isn't staying)
Robbo.5000 said:
This works for me every time.
1 Flash the latest fastboot ROM.
2 Flash TWRP (same one you used)
3 Boot into TWRP (use the vol+ button when booting)
4 In format menu swipe to factory reset, then format data (VERY IMPORTANT this must be FORMAT not just wipe)
5 In reboot menu boot into recovery, this ensures TWRP correctly accesses the newly formatted data partition.
6 Copy over the ROM (and GApps, if needed and/or Magisk)
7 Flash the ROM, (then GApps if needed)
8 Boot into system and do the initial setup
9 If installing Magisk, boot back to TWRP and install Magisk.
There is no need to wipe anything else. There is no need to wipe anything again after installing. There is no need to disable encryption or dm-verity.
Click to expand...
Click to collapse
I need help... The reason why I'm flashing custom rom is, when the latest update came MIUI 12.5 android 11, all sensors of my phone stopped working like (Gyroscope, accelerometer, proximity sensor) I tied to flash the rom by fastboot method but still the problem persists. because of that I unlocked bootloader and flashed twrp. After flashing custom rom when I tried to boot it, it stuck on booting screen and when I tried to reboot into recovey it is showing fastboot mode. I'm unable to boot into custom rom.
dev-DaT said:
Hi all,
I was on xiaomi.eu MIUI 11 ROM for some time, but wanted to switch to either Evolution or Syberia ROM.
I did a complete wipe and installed evolution os trough twrp... but i forgot to remove encryption so i bricked my device...
So then, I flashed the latest stock rom (11.05)with Xiaomi flash tool, but then i was stuck with the chinese ROM so...
1. I went back to bootloader and flashed mauronofrio's TWRP recovery .
2. completely wiped phone; Cache,System,Data,Internal storage
3. copied Evolution OS 4.1 to my phone
4. installed zip trough TWRP, all successfull
5. but then when rebooting, TWRP says:"No OS installed, do you wish to continue"
6. i tried other ROMs like xiaomi.eu and syberia, but these would either give me the same problem, or just bootloop until iam back in the fastboot screen...
Anyone any idea what iam doing wrong?
Click to expand...
Click to collapse
Bro I have one doubt, I installed pixel os successfully then I roll back into stock os(miui) with locking bootloader, the. Again I unlock bootloader successfully, but the problem is I am unable to install os, i tried wipe data, catch. But the stock rom was not removed. What can I do?
Using orange fox in resmi note 10 pro
Hi there,
I tried to install a ROM on my Mi9T pro. I use Orange Fox and it asked me when I entered the recovery for the password, that decrypted my Data partition. All well so far.I installed the ROM Havoc and Magisk. After reboot into System, there was a bootloop. I entered the recovery again and the Data(internal storage is encrypted. Which is not too bad, because I know the password, but I do not get asked for the password/pattern. It says:
E: Error making /sdcard/fox, unable to wipe Data, unable to format to remoce encryption.
So I cannot install a new rom as the partion is encrypted and I cannot remove the partition.
“E:Unable to decrypt FBE device”
Does anyone have a recommendation on what to do?
Kind regards
berndbrecht said:
Hi there,
I tried to install a ROM on my Mi9T pro. I use Orange Fox and it asked me when I entered the recovery for the password, that decrypted my Data partition. All well so far.I installed the ROM Havoc and Magisk. After reboot into System, there was a bootloop. I entered the recovery again and the Data(internal storage is encrypted. Which is not too bad, because I know the password, but I do not get asked for the password/pattern. It says:
E: Error making /sdcard/fox, unable to wipe Data, unable to format to remoce encryption.
So I cannot install a new rom as the partion is encrypted and I cannot remove the partition.
“E:Unable to decrypt FBE device”
Does anyone have a recommendation on what to do?
Kind regards
Click to expand...
Click to collapse
When installing over MIUI you need to format data. You should still be able to format data, which should allow you to boot into the ROM after.
If Orange Fox won't let you format data at this point, then the issue is with Orange Fox. In TWRP when this happens, even though the data partition is encrypted and TWRP doesn't ask for the password, TWRP can still format the data partition.
If you can format data in OF, then good. If not try installing TWRP then formatting data. If that fails your best option is to restore to MIUI with a stock fastboot ROM, then start again.
thank you for your comment. as a follow up. do you recommend a certain twrp release? i just don't want to **** up the phone. when ich connect the phone to my laptop, I can see the internal data, but neither can i copy, nor make the names of the files any sense (encrypted i guess). is there now way to decrypt the files from the situation as is? i do not mind, as i back upped all the important stuff, but if possible i would do without format.
btw. i came from lineage os. what i did: i wiped data, system, cache and data, then installed the rom ( included gapps) and magisk. then restarted.
berndbrecht said:
thank you for your comment. as a follow up. do you recommend a certain twrp release? i just don't want to **** up the phone. when ich connect the phone to my laptop, I can see the internal data, but neither can i copy, nor make the names of the files any sense (encrypted i guess). is there now way to decrypt the files from the situation as is? i do not mind, as i back upped all the important stuff, but if possible i would do without format.
btw. i came from lineage os. what i did: i wiped data, system, cache and data, then installed the rom ( included gapps) and magisk. then restarted.
Click to expand...
Click to collapse
Use the latest TWRP from here https://forum.xda-developers.com/k2...cial-twrp-xiaomi-redmi-t3944363/post79823568. Go with the latest unofficial as it is the same as the official version, but with some minor bug fixes added.
Orange Fox is only really worth using when sticking with MIUI. Most of it's extra functions are MIUI specific.
When you get into this situation, unfortunately, there is nothing that can be done to recover or decrypt the data partition, as far as I know.
Normally going from one AOSP ROM to another you should be OK and won't need to format data. But occasionally this problem will happen, I've had it happen when going from LOS to AOSiP. Formatting data in TWRP, when this happens, will then allow you to boot into your new ROM. I haven't yet found out why this sometimes happens.
You will just need to backup your data whenever you flash a ROM, just in case this happens again.
Robbo.5000 said:
Use the latest TWRP from here https://forum.xda-developers.com/k2...cial-twrp-xiaomi-redmi-t3944363/post79823568. Go with the latest unofficial as it is the same as the official version, but with some minor bug fixes added.
Orange Fox is only really worth using when sticking with MIUI. Most of it's extra functions are MIUI specific.
When you get into this situation, unfortunately, there is nothing that can be done to recover or decrypt the data partition, as far as I know.
Normally going from one AOSP ROM to another you should be OK and won't need to format data. But occasionally this problem will happen, I've had it happen when going from LOS to AOSiP. Formatting data in TWRP, when this happens, will then allow you to boot into your new ROM. I haven't yet found out why this sometimes happens.
You will just need to backup your data whenever you flash a ROM, just in case this happens again.
Click to expand...
Click to collapse
Thanks man, many thanks. did flash the twrp and it worked out. having some minor problems with the rom, but in general it worked out fine
much appreciated.
Hi Guys
I tried an update to Mirza's ROM but after it caused more issues, I tried restoring from full Orangefox backup in recovery; only to find the phone stuck at Fastboot mode. It appeared strange, so I tried it again to end up with same fate. I tried installing Xiaomi.EU ROM, but after installation it got into a boot loop alternating between Recovery logo and MIUI startup logo. I got into fastboot again and flashed TWRP trying the same, but without joy. Tried another recovery and multiple versions of Xioami.EU ROM all with same fate. Finally got hold of an old fastboot ROM from Xioami.EU and flashed with MiFlash tool and it flashed successfully without issues. Assuming all was well, I tried flashing ROM via recovery which either gets stuck at MIUI logo or recovery. Boot loader in unlocked and decrypted. I tried flashing SHRP recovery, Magisk, wiping data etc as well to rule out any issues, but the problems remain.
Any ideas as to what's happening?
If I understood right, recovery ofox is working.
So reboot to it
Format data with yes
Reboot ofox
Flash ROM
Flash magisk recommend
Format data again with yes
Reboot system and give time to boot, could be more than some minutes but I think not more than 20
For those who might face similar issues.
According to Orangefox website, 'note that you should not restore a backup of the persist image, unless it proves absolutely necessary'. I may have checked it in recovery during restoration which probably destroyed the partition.
Fix:Installed TWRP via flashboot, formatted all data(not wiped) and installed ROM then formatted again and it booted.