I update my unlocked and rooted with magisk pixel 4a 5g every month and have never had a problem. After updating a couple of magisk modules and rebooting, the phone was bootlooping. So I tried flashing the stock boot.img extracted from the latest full rom. I had already installed this month's OTA. It complained about no valid slot to boot so I flashed the boot image to both slots.
I tried reflashing the update but that didn't fix it. So I tried flashing the full rom with flash-all.sh without "-w" thinking that would fix it without wiping. But it's still unable to boot and eventually ends up back at fastboot with "no valid slot to boot".
Is there anything else that I can try? Do I need to wipe it and do another flash-all but include wiping, or a factory reset from recovery?
I am attaching the log from flash-all.sh without wiping - does it indicate any problems? Are those "does not contain" errors normal?
It tried to boot several times and now it's sitting at the fastboot prompt with "no valid slot to boot".
Well, I tried many things all day without success including contacting pixel support and they said that if factory reset didn't work, there was nothing they could do but replace the phone and so asked for the information to do so. I gave it to them but decided to try doing a flash-all one last time, and it worked! So the phone is now restoring the last automatic backup and I will put magisk and the modules I had back on and see how it goes.
yaconsult said:
Well, I tried many things all day without success including contacting pixel support and they said that if factory reset didn't work, there was nothing they could do but replace the phone and so asked for the information to do so. I gave it to them but decided to try doing a flash-all one last time, and it worked! So the phone is now restoring the last automatic backup and I will put magisk and the modules I had back on and see how it goes.
Click to expand...
Click to collapse
Hi, could you please tell me what exactly steps have you done? I have a similar issue after rooting my pixel 4a. Thanks
I used the flash-all script that is included in the factory rom. So I downloaded that, unzipped it and ran the flash-all script. Note that if you run it without removing the -w argument that your phone will be wiped before flashing. In may case, I had already done a factory reset so I just let it do the wipe too. The first time I used flash-all I got an error near the end. But when I ran it again a few days later, it worked and the phone has been fine since.
Related
Wondering if many others of you have run across this, what causes it, and how to avoid it. Basically, I download the factory image from google's image page, flash-all using adb/fastboot. All looks good, every part of installation says OKAY, no fails. Then upon reboot it goes back to bootloader, but now with a yellow banner at the bottom - ERROR: LoadImageAndAuth Failed: Load Error. Sometimes the banner reads ERROR: Slot Unbootable: Load Error. (see attached pictures)
There's no way out of it, flashing images, bootloader or boot.img or whatever separately, flashing twrp, switching between a/b partitions, nothing changes it. Adb/fastboot is current. It's happened after regular flash-all, it's happened when "-w" is removed. It's happened with and without twrp installed. This last time I tried to avoid it by updating without flashing the image, removed twrp and tried to sideload the OTA in stock recovery, which also landed me in the same spot, in the bootloader with that yellow banner of death. Been hit by this using Dec., Feb., and March updates. I stayed on the Dec. update for a while because I've been afraid of it happening again... sure enough it did.
I've replaced a few pixel 2's because of this, every time Google willingly stands by their product and replaces it. One google worker told me this is a known issue they were working on, others said it isn't, and none have provided an explanation for why it happens or how to avoid it. I assume it's some kind of instability with the a/b partition system. I did the same process with my N5x a couple days ago (flashed image then added twrp, magisk, all that stuff) and as usual everything went swimmingly. Tried just flashing current image on p2 the next day and another one bit the dust. Another replacement is on its way now.
So I turn to you. Any of you run into this? What causes it? How can I flash updates without this happening again?
As you know, this happened to me partially. One of my bootloader slots is messed up. Just remember that you can always plug into USB and skip the bootloader and just boot using the boot.img directly.
fastboot boot boot.img
OR if you use Magisk...
fastboot boot patched_boot.img
This of course gets you booted up, so you can get your data backed up or whatever. You're basically tethered to a computer if you ever have to reboot or get back up after a power off.
I think I'll wait another month before having Google replace mine.
deepdvd said:
As you know, this happened to me partially. One of my bootloader slots is messed up. Just remember that you can always plug into USB and skip the bootloader and just boot using the boot.img directly.
fastboot boot boot.img
OR if you use Magisk...
fastboot boot patched_boot.img
This of course gets you booted up, so you can get your data backed up or whatever. You're basically tethered to a computer if you ever have to reboot or get back up after a power off.
I think I'll wait another month before having Google replace mine.
Click to expand...
Click to collapse
Tried boot.img but not working for me, still stuck in bootloader. But good to know, I didn't realize that was a possibility. Sucks having to be tethered like that though. I backed up double before messing with it, both nandroid and titanium, expecting I might run into this again.
The replacement process is relatively painless, only takes like 3 days to get a new one. Just be sure to do it while covered under warranty.
Hope it works out. To have this happen to several replacements is either extremely bad luck, or some unknown external factor.
clcdev said:
Hope it works out. To have this happen to several replacements is either extremely bad luck, or some unknown external factor.
Click to expand...
Click to collapse
Thanks man, seems like it since not many people are experiencing this. Can't think of what external issue it could be other than something with my computer, but im sure not having any troubles doing the same stuff and more on my nexus.
@trhacker01, have you tried flashing the latest full OTA image through recovery twice first (so that both partitions are updated) and then using the factory image? I had a similar (not same) issue where is displayed an empty yellow warning bar and did not let me update the bootloader, but after doing this, I no longer have this issue.
craigacgomez said:
@trhacker01, have you tried flashing the latest full OTA image through recovery twice first (so that both partitions are updated) and then using the factory image? I had a similar (not same) issue where is displayed an empty yellow warning bar and did not let me update the bootloader, but after doing this, I no longer have this issue.
Click to expand...
Click to collapse
Well I tried flashing the ota in recovery and that's what triggered it this last time. But I didn't try doing each partition, maybe that's where it went wrong
Every update bricks me when I try flashing an OTA.
Pretty sure I had both of those errors. One for Feb, other for March.
Fastboot full factory image -w and back to normal, then reinstall twrp.
Going forward I will just plan on using the full factory image.
COMpulse said:
Every update bricks me when I try flashing an OTA.
Pretty sure I had both of those errors. One for Feb, other for March.
Fastboot full factory image -w and back to normal, then reinstall twrp.
Going forward I will just plan on using the full factory image.
Click to expand...
Click to collapse
That's what gets me, can't simply fastboot the image to recover, that fail-safe isn't reliable for me.
Got the replacement and set it up so I can update normally. Just booted twrp but didn't install, so I could flash magisk. With no twrp and easily uninstall magisk I can just update via regular OTA when it shows up. Then temporarily boot twrp again to reinstall magisk. Just did that for the March update and worked fine.
A little inconvenient of a workaround but I'm updating without concern about this image flashing problem.
I have the exact same problem as first post, even same picture yellow banners. I have tried everything too.
I removed using automatically remove Magisk rooted through Magisk Manager. I liked the edge plus modules.
I was going to Android P with alt flash bat/All and (-W) edit to keep the perfectly working Jan updates.
First of above troubles.
I then went back and tried all updates of 2018.
Same steps as above, re updated everything, different USB port, cable a no go.
The load boot from Fastboot is a no go. Deuce's scripts no go. Manual install of all files (instead of) bat file commands no go.
I bought device through Project Fi, so first go around for return is now escalated and awaiting further return of device.
Looking at web searches used what I could find for return to normal complete image install, NO GO.
Maybe I have the early reports of Flashing Factory Image files =return device= that a few users had back in Nov 2017.
kkjb said:
I have the exact same problem as first post, even same picture yellow banners. I have tried everything too.
I removed using automatically remove Magisk rooted through Magisk Manager. I liked the edge plus modules.
I was going to Android P with alt flash bat/All and (-W) edit to keep the perfectly working Jan updates.
First of above troubles.
I then went back and tried all updates of 2018.
Same steps as above, re updated everything, different USB port, cable a no go.
The load boot from Fastboot is a no go. Deuce's scripts no go. Manual install of all files (instead of) bat file commands no go.
I bought device through Project Fi, so first go around for return is now escalated and awaiting further return of device.
Looking at web searches used what I could find for return to normal complete image install, NO GO.
Maybe I have the early reports of Flashing Factory Image files =return device= that a few users had back in Nov 2017.
Click to expand...
Click to collapse
Added: found I my bootloader was failing on updating. Fastboot message= (bootloader) Updating partition=0 Failed
(remote:Command Flash Error).
Some how thought to look over deuce flash all scrip instructions and followed exactly, which seemed strange to add script to expanded image file. Well even with lot's of error returns from running. Used same image that was installed Jan 1.17xx019.013 fixed bootloader and worked.
Odd that was not the usual process, but it WORKED.
kkjb said:
Added: found I my bootloader was failing on updating. Fastboot message= (bootloader) Updating partition=0 Failed
(remote:Command Flash Error).
Some how thought to look over deuce flash all scrip instructions and followed exactly, which seemed strange to add script to expanded image file. Well even with lot's of error returns from running. Used same image that was installed Jan 1.17xx019.013 fixed bootloader and worked.
Odd that was not the usual process, but it WORKED.
Click to expand...
Click to collapse
Wow great to hear it worked! I tried the deuce script but couldn't get it to work either. I heard there was an issue with the bootloader in December and was supposed to have been fixed in January. But that bootloader error was one that I was also getting after the yellow banner started showing up, even on this last go around. Just before the initial bricking fastboot was reporting all successful on the flash.
More of my troubles
I have twrp 3.2.1-2, Magisk v16.1(1610) Jan 18 8.1.0. The device is working as before. So to recap...first post is what I HAD. My bootloader is stuck on 002.0059.00 this is the one from opd1.170816.025 which is 8.0.0 Nov 17. This some how flashed through Deuce's script and stuck. Now of course nothing will flash with Factory images because I have a botched up Boot.img. From looking back the trouble started with going to update to P. Removed Magisk through manager. It "patched" boot but some how on mine (with flashed twrp) recovery caused a flag I guess to set.
So some point I'm going to get Magisk to patch current Factory Boot.img 002.0067.00 which is in Feb, Mar 18 and P.
Need time to read though Magisk or wait for others to experience. I believe this is the warning message of TWRP and Pixel 2 A/B slots.
update to my troubles
If you have watching as myself to correct the troubles I'm having: recap: Bootloader is not flashing to current one
I'm stuck on 0059. I get a flash fail message (bootloader) ( remote:Command Flash Error ) Bootloader A 200002000 SZ=0000B000. Stuck on bootloader screen only.
Corrected back to before still broken flashable bootloader 0059. Used install TWRP and Magisk. Which I had before trying to update from Jan 18 update. So works as before..
I tried a path to some how get back to correct. So flash current tdbo and boot.img and bootloader. WRONG white G screen only.
So fastboot back into twrp.img use install script zip, install Magisk nogo.
So caution DON'T do it my way.
I was lucky I had a back up twrp file from a month ago. Now at least back to "working"
opm1.171010.013. again that is bootloader 0066 but mine is 0059....
kkjb said:
If you have watching as myself to correct the troubles I'm having: recap: Bootloader is not flashing to current one
I'm stuck on 0059. I get a flash fail message (bootloader) ( remote:Command Flash Error ) Bootloader A 200002000 SZ=0000B000. Stuck on bootloader screen only.
Corrected back to before still broken flashable bootloader 0059. Used install TWRP and Magisk. Which I had before trying to update from Jan 18 update. So works as before..
I tried a path to some how get back to correct. So flash current tdbo and boot.img and bootloader. WRONG white G screen only.
So fastboot back into twrp.img use install script zip, install Magisk nogo.
So caution DON'T do it my way.
I was lucky I had a back up twrp file from a month ago. Now at least back to "working"
opm1.171010.013. again that is bootloader 0066 but mine is 0059....
Click to expand...
Click to collapse
That's pretty slick that you got it working again, especially with the bootloader error. I didn't think you could get the current OS working with an old bootloader at all. Hopefully at some point you will be able to update it all the way.
I soft bricked it..so don't do this.
See previous to catch up. Since I pulled the plug and had a Google Warranty phone in hand...21 hours later!
I decided to do all the things NOT TO DO.
Pulled factory Image file from last bootloader with 0059 bootloader.. Nov 17
Flashed tdbo.img, boot.img.
Didn't change same Flash failure device return message. Had to boot TWRP, flash twrp to get working again. Since phone needs to return for credit.
Nothing to lose, I have been on slot = A always. Moved to slot = B....
Now it is a brick.
First couple of power cycles, one line flash, vibrate. Then after 3-4 more cycles no more vibration. longer time to one line flash.
Warm to touch, overnight charge. Same.
So message is to keep backup of files used in first portion of Magisk and twrp installs. Must follow instructions if want to remove Magisk root.
Somehow my problem is a weird one off with the bootloader oddity.
everything was working fine for almost a year. twrp, magisk, everything was working as intended. decided to update to the july stable build (walleye-pq3a.190705.001) and decided id like a fresh start. ok cool, easy enough, just boot into the bootloader/fastboot mode and use the flash-all script, done. flash TWRP 3.3.0 using "TOOL ALL IN ONE". installs fine, reboots fine, cool. reboot to recovery to install the magisk 19.3 zip. wait what? password not accepted? it works in system, and is the same password i always use for the phone (i just use one to prevent butt dialing). ok fine whatever lets just reboot and completely remove all security for now, and figure that one out later. reboot into twrp, no password this time. excellent. lets flash this zip (same zip that i downloaded directly from magisk manager before starting any of this, also tried an old copy that i used to root the first time). everything looked like it was fine, so i rebooted to system. waited about 3 - 5 minutes, and it rebooted to recovery. hmm, odd, maybe just a bad cache or something. rebooted again. same thing, kicked back to recovery. ok, lets do dalvik/cache. nope, same problem. redid flash-all, and manually installed TWRP using fastboot to boot an img, push the twrp installer zip, flash that. same problems. changed slots, flash-, manual twrp flash, same problem. factory reset, repeat flashing, same problem. format system and data partition to get rid of everything, reflash, same problem. theres other stuff that ive tried that i dont remember too.
EDIT: also tried restoring an old TWRP backup from feb. and got the yellow auth error on the bootloader
where i currently sit is i can get a factory image on there and can get twrp on there, and even flashed lineage just for ****s and giggles, and that even worked (esim manager kept crashing, didnt test much else, but it booted and was functional for what little i tested).
TLDR: twrp wont accept pin, and when i disable the pin and flash magisk i can no longer boot even though these are the same files that have been on my E drive since the day i got it, which worked fine back then. it almost feels like theres some kind of corruption somewhere.
Well, not fully bricked, but it's completely non-working just the same.
I've had the K1 for a few years now and have been fine with the standard, stock OTA updates. Recently though I've been seeing constant notifications that I'm short on ram and after uninstalling apps, deleting old files, it would work ok for a few days and then start complaining about low memory again. So I figured that something must be corrupt and now is a good a time as any to root and see about flashing a new rom.
I've owned many android devices over the years and have rooted and patched most of them. so I'm familiar with the tools.
This time however, I think I must have crossed something up somewhere.
What I did was this:
Grabbed the minimal ADB package and fastboot drivers.
Booted into the bootloader and ran the fastboot oem unlock. No problem.
From the nVidia site, I then grabbed and flashed the latest stock image and recovery, just to ensure I was on a clean slate. No problem.
Flashed the latest TWRP for the device. No problem.
Flashed SuperSU. No problem.
Booted into the stock system to make sure everything was still working and it was. But, this is the start of where I maybe hosed things up(?).
While running stock, I converted the SD card to internal memory, just so I wasn't having to mess with it later, not thinking that I'd have to do it again anyway after flashing a new rom.
Rebooted back to TWRP and proceeded to flash the new rom (AOSP Extended (AEX) 5.8).
I flashed it by way of the sideload method rather than from a zip file sitting on the SD card. This all seemed to work just fine.
Next I went ahead and flashed OpenGapps Mini. This resulted in an error 70 and after reading about it, it was a simple matter of going into the advanced settings in TWRP and extending the system partition. Did that and OpenGapps then flashed with no problem.
Finally I wrapped it up by flashing tegra124-tn8-p1761-1270-a04-e-battery.dtb and rebooted.
... Nothing. Now I know that when flashing a new rom, the first boot can take some time, but I let it sit for about 2 hours with no result. It didn't appear to be boot looping, but instead just stuck on the nVidia boot screen. Forced it to boot back to the bootloader and brought up TWRP. I obviously did something wrong, so I prepared to reflash the stock image.
Did the wipe, flashed the files and rebooted. Again, nothing.
This time however, not only can I not boot to the system, I now also can't get back into recovery.
No matter how many times I reboot, or attempt to reflash anything, it hangs on the boot screen when attempting to get back into recovery.
So I'm stuck. I've tried reflashing TWRP, stock recovery and stock system, with the SD card in and out, a number of times, all with no joy.
I can access the bootloader, so I can at least run fastboot commands, but that's all I can do. Without being in recovery, I can't access an ADB shell if I need to repair anything.
If you're still with me after this rambling mess, do I have any hope at all in recovering this thing?
Hi,
I think the problem is in the modified .dtb try flash the original file.
Or : https://forum.xda-developers.com/showpost.php?p=82359331&postcount=39
greetings
kozaqu said:
Hi,
I think the problem is in the modified .dtb try flash the original file.
Or : https://forum.xda-developers.com/showpost.php?p=82359331&postcount=39
greetings
Click to expand...
Click to collapse
That got me in the right direction and I can at least get back into recovery now. Thanks! :good:
Also in the same boat
mkhopper said:
Well, not fully bricked, but it's completely non-working just the same.
I've had the K1 for a few years now and have been fine with the standard, stock OTA updates. Recently though I've been seeing constant notifications that I'm short on ram and after uninstalling apps, deleting old files, it would work ok for a few days and then start complaining about low memory again. So I figured that something must be corrupt and now is a good a time as any to root and see about flashing a new rom.
I've owned many android devices over the years and have rooted and patched most of them. so I'm familiar with the tools.
This time however, I think I must have crossed something up somewhere.
What I did was this:
Grabbed the minimal ADB package and fastboot drivers.
Booted into the bootloader and ran the fastboot oem unlock. No problem.
From the nVidia site, I then grabbed and flashed the latest stock image and recovery, just to ensure I was on a clean slate. No problem.
Flashed the latest TWRP for the device. No problem.
Flashed SuperSU. No problem.
Booted into the stock system to make sure everything was still working and it was. But, this is the start of where I maybe hosed things up(?).
While running stock, I converted the SD card to internal memory, just so I wasn't having to mess with it later, not thinking that I'd have to do it again anyway after flashing a new rom.
Rebooted back to TWRP and proceeded to flash the new rom (AOSP Extended (AEX) 5.8).
I flashed it by way of the sideload method rather than from a zip file sitting on the SD card. This all seemed to work just fine.
Next I went ahead and flashed OpenGapps Mini. This resulted in an error 70 and after reading about it, it was a simple matter of going into the advanced settings in TWRP and extending the system partition. Did that and OpenGapps then flashed with no problem.
Finally I wrapped it up by flashing tegra124-tn8-p1761-1270-a04-e-battery.dtb and rebooted.
... Nothing. Now I know that when flashing a new rom, the first boot can take some time, but I let it sit for about 2 hours with no result. It didn't appear to be boot looping, but instead just stuck on the nVidia boot screen. Forced it to boot back to the bootloader and brought up TWRP. I obviously did something wrong, so I prepared to reflash the stock image.
Did the wipe, flashed the files and rebooted. Again, nothing.
This time however, not only can I not boot to the system, I now also can't get back into recovery.
No matter how many times I reboot, or attempt to reflash anything, it hangs on the boot screen when attempting to get back into recovery.
So I'm stuck. I've tried reflashing TWRP, stock recovery and stock system, with the SD card in and out, a number of times, all with no joy.
I can access the bootloader, so I can at least run fastboot commands, but that's all I can do. Without being in recovery, I can't access an ADB shell if I need to repair anything.
If you're still with me after this rambling mess, do I have any hope at all in recovering this thing?
Click to expand...
Click to collapse
I'm also sort of in the same boat i had a custom rom installed and decided to go back to stock os and now i'm stuck at either the Nvidia Logo or the Fastboot menu there's nothing else it let's me do i'd take any advice at this point. I can use Fastboot commands and I've tried Flashing Twrp.img and also flashing all the stock os which goes through with no problems i reboot the device and it's just stuck at the Nvidia logo
Ps: how did you manage to get back into recovery
Hello.
I think i had the same Problem.
I Flashed a Custom Rom, MiniGapps and the tegra...Battery file and since then i had boot loop an the NVidia Logo.
The Problem was: i flashed the tegra-Battery.ZIP file!!!
I noticed that i have to unzip it and flash teh tegra-..battery.DTP file.
since then it booted up again.
the OpenGappMini was buggy. it worked with the Nano!
Hope this helps for you as well!
OMG you guys. I did the exact same damn thing. Flashed the ZIP instead of the DTP file. 100 million thanks to you. I'm going to give it a shot now.
It worked! I wonder how many other folks didn't realize it wasn't a zip to flash to dtb and bricked their devices.
So I've got a US unlocked device running firmware version KB2005_15_200918. I've rooted it with magisk.
Few days ago I got an update notification, to update to 11.0.1.2.KB05AA. So, thinking I could do it like a pixel, I unrooted, installed the update and re rooted installing to the inactive slot (per @topjohnwu's instructions). On reboot I got stuck on the qualcomm kernel crash screen, leaving my slot_A install hosed.
After some tinkering, I was able to get up and running on slot B. However, slot A is hosed up with the update. (system update says failed, reboot to try again, when i do, hoses back up. Probably because it's setting the active slot to A again).
I've tried re-flashing the KB05AA stock boot image someone dd' and shared on here with no luck. And I don't want to use the unbrick tool, and ending up having to backup/restore all my data.
What are my options at this point to fix slot A, and take the update again? I'm coming from a pixel 3, and know nothing about flashing the factory images on this device or the best way to recover from this. Any advice would be appreciated.
-Michael_ said:
So I've got a US unlocked device running firmware version KB2005_15_200918. I've rooted it with magisk.
Few days ago I got an update notification, to update to 11.0.1.2.KB05AA. So, thinking I could do it like a pixel, I unrooted, installed the update and re rooted installing to the inactive slot (per @topjohnwu's instructions). On reboot I got stuck on the qualcomm kernel crash screen, leaving my slot_A install hosed.
After some tinkering, I was able to get up and running on slot B. However, slot A is hosed up with the update. (system update says failed, reboot to try again, when i do, hoses back up. Probably because it's setting the active slot to A again).
I've tried re-flashing the KB05AA stock boot image someone dd' and shared on here with no luck. And I don't want to use the unbrick tool, and ending up having to backup/restore all my data.
What are my options at this point to fix slot A, and take the update again? I'm coming from a pixel 3, and know nothing about flashing the factory images on this device or the best way to recover from this. Any advice would be appreciated.
Click to expand...
Click to collapse
Use msm tool or reflash stock via fastboot. Either way you gotta wipe one way or another.
Or maybe..
Try fastboot erase boot_a
Then fastboot flash boot_a boot.img. With the kernel you had on slot_a. Hopefully you backed it up prior to this. If not, see my first recommendation.
Thanks, I'll give my kernel backup a shot.
Hey everyone, I'm in a pickle with mi Ultra.
I'll walk you through the key events that led me to where I am now.
Yesterday, I noticed my battery was being used up fairly quickly, the battery settings showed that "other" had drained my battery 16% over the course of a few hours. I decided I wanted more info so I got recommended to try installing Gsam and it's root addon to see if I could get more details.
At this point in time, I was on EU rom with Magisk running smoothly, after installing Gsam and the root addon it wanted me to reboot, and so I did. That was the last time since then that I have been able to get in to my phone.
It started with a bootloop, so I tried unrooting via TWRP, wiping cache, nothing.
After a while i said **** it, if I lose my data so be it. Tried dirty flashing the EU rom again, no luck. And now I couldn't see /data no more in TWRP.
Decided to try a fresh install of EU rom, formatted data via TWRP and installed EU rom again, still no.
So then I tried following the guide I followed orginally to install the EU rom via my PC, nope again.
Maybe the china rom could help here? Tried installing it via fastboot command-line - nope, via sideload - nope, via MiFlash - no.
The loop has during these hours of terror behaved differently, but the farthest I've gotten is being able to type in my wifi Password to start trying to unlock my Mi account, but just after that, the touch becomes unresponsive and "System has stopped responding" and then reboot.
So, I turn to you guys for help, I've followed all guides/forum threads that I could find about bootloops and bricking on the ultra (including the ones here of course) but so far none of those tips have solved my problem.
Does anyone have any more things that I could try?
If need be I can post a video of the problem as it occurs.
Thanks in Advance, Chris
After any branch change flash, did you format? If not, it will boot loop. No good formatting before flashing, it must be done after. I would start again by going to fastboot and install the original stock Chinese ROM. This will replace twrp with stock recovery. Get a fastboot ROM from mifirm.net .
Once done, then check it's working Ok and build on that with flashing twrp from fastboot and then a twrp ROM. BUT after flashing any same branch ROM, you must wipe cache and dalvik. If you change branch like stock to EU or stable to weekly, you must format data as there may be different partition differences. It is very hard to brick an Xiaomi phone as you will always have access to fastboot. Just one word of advice, if you choose the first EU fastboot ROM, you need to swap out the fastboot.exe as it had an issue but other than that slow down take your time and it will work. Good luck.