Accidentally flashed TWRP in boot partition. - Xiaomi Mi A2 / 6X Questions & Answers

So..I was trying to unlock the bootloader using the fastboot commands. When it was all done and I was booted into TWRP, I flashed the TWRP image onto the boot partition instead of the recovery partition. Realizing my mistake seconds after, I flashed TWRP onto the recovery partition as well. Now everytime I try to boot my device, you guessed it, it opens up TWRP instead.
Previously I was using the Stock android 10 ROM with March's security update. I was wondering if there's a way to fix this? Maybe flashing the boot.img will fix this(if yes, then can one of you take a backup of yours and upload it, please?) or should I just flash Pixel experience rom and it will change the partition according to its needs?
I am kinda worried..Hopefully, the device is fixable. Thank You.

BungeeWatcher47 said:
So..I was trying to unlock the bootloader using the fastboot commands. When it was all done and I was booted into TWRP, I flashed the TWRP image onto the boot partition instead of the recovery partition. Realizing my mistake seconds after, I flashed TWRP onto the recovery partition as well. Now everytime I try to boot my device, you guessed it, it opens up TWRP instead.
Previously I was using the Stock android 10 ROM with March's security update. I was wondering if there's a way to fix this? Maybe flashing the boot.img will fix this(if yes, then can one of you take a backup of yours and upload it, please?) or should I just flash Pixel experience rom and it will change the partition according to its needs?
I am kinda worried..Hopefully, the device is fixable. Thank You.
Click to expand...
Click to collapse
"If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image."
https://twrp.me/xiaomi/xiaomimia2.html

ahenaol said:
"If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image."
Click to expand...
Click to collapse
I used
fastboot boot *path of twrp.img*
to boot twrp on my phone, i guess that is called side loading? after that, when TWRP opened up, I copied the twrp.img into my storage. After that, I was supposed to flash that image onto the recovery partition by using the sideloaded TWRP but instead I flashed it onto the boot partition. I hope that is a bit clearer..anyway, even in this case will I have to flash the stock rom before trying anything else?

BungeeWatcher47 said:
I used
fastboot boot *path of twrp.img*
to boot twrp on my phone, i guess that is called side loading? after that, when TWRP opened up, I copied the twrp.img into my storage. After that, I was supposed to flash that image onto the recovery partition by using the sideloaded TWRP but instead I flashed it onto the boot partition. I hope that is a bit clearer..anyway, even in this case will I have to flash the stock rom before trying anything else?
Click to expand...
Click to collapse
You could try flashing just the boot.img file from stock image.

BungeeWatcher47 said:
... flashed TWRP onto the recovery partition as well.....
Click to expand...
Click to collapse
What do you mean here? There is no "recovery partition" in A/B slots structure of MiA2. Or did you totally reformated partitions?
BungeeWatcher47 said:
Previously I was using the Stock android 10 ROM with March's security update. I was wondering if there's a way to fix this? Maybe flashing the boot.img will fix this(if yes, then can one of you take a backup of yours and upload it, please?)...
Click to expand...
Click to collapse
Yes, If you were on stock A 10 march (11.0.6.0), and never re-paritioned device, then you can restore OS fasboot-reflashing stock 10.0.6.0 boot image to the slot you were using previously with 11.0.6.0 (and, btw, try to remember what was and is now in the opposite slot). I've uploaded 11.0.6.0 bbot images to: https://forum.xda-developers.com/showpost.php?p=82166125&postcount=58
BungeeWatcher47 said:
... or should I just flash Pixel experience rom and it will change the partition according to its needs?
Click to expand...
Click to collapse
Sorry, I'm on stock and never went deep into nuances of custom ROMs partitioning.

Aerobatic said:
What do you mean here? There is no "recovery partition" in A/B slots structure of MiA2. Or did you totally reformated partitions?Yes, If you were on stock A 10 march (11.0.6.0), and never re-paritioned device, then you can restore OS fasboot-reflashing stock 10.0.6.0 boot image to the slot you were using previously with 11.0.6.0 (and, btw, try to remember what was and is now in the opposite slot). I've uploaded 11.0.6.0 bbot images to: https://forum.xda-developers.com/showpost.php?p=82166125&postcount=58
Sorry, I'm on stock and never went deep into nuances of custom ROMs partitioning.
Click to expand...
Click to collapse
When you try to flash a image in TWRP, it gives you multiple options on the next screen. Namely, boot, vendor, system, data, recovery. I had flashed that TWRP.img into my boot slot lmao. It messed everything up. Your stock boot images have been saving me in multiple pinches.

Hello, thats my first entry in XDA forum. I did the same mistake with my mi9 and i have no idea how to fix it. Could someone help me, i hope i didn't killed it.
... i installed the mi 9 rom --> solved the problem

Related

TWRP not flashing

I have been having an issue flashing TWRP. I have previously had TWRP on my Nexus 6, but I recently flashed the latest security update, and now for the life of me, I cannot get TWRP to flash.
I run fastboot flash recovery twrp-3.0.2-0-shamu.img, it says it ran OKAY, I reboot the phone, then use ADB reboot recovery but it always comes back to the stock recovery. I have done this a hundred times, and never had an issue. Anyone else seen this?
lenard_hester said:
I have been having an issue flashing TWRP. I have previously had TWRP on my Nexus 6, but I recently flashed the latest security update, and now for the life of me, I cannot get TWRP to flash.
I run fastboot flash recovery twrp-3.0.2-0-shamu.img, it says it ran OKAY, I reboot the phone, then use ADB reboot recovery but it always comes back to the stock recovery. I have done this a hundred times, and never had an issue. Anyone else seen this?
Click to expand...
Click to collapse
boot up first, remove some system apps to clear up some space, then flash again with fastboot.
simms22 said:
boot up first, remove some system apps to clear up some space, then flash again with fastboot.
Click to expand...
Click to collapse
I can't remove any system apps. I need to have root first, and I need TWRP to install root. Besides, TWRP goes on the recovery partition not the system partition.
lenard_hester said:
I can't remove any system apps. I need to have root first, and I need TWRP to install root. Besides, TWRP goes on the recovery partition not the system partition.
Click to expand...
Click to collapse
true. you are using fastboot while you are in the bootloader?
simms22 said:
true. you are using fastboot while you are in the bootloader?
Click to expand...
Click to collapse
yes. I think I figured out a way around it. my mistake was rebooting. Instead of rebooting from the bootloader, I just went to recovery mode directly from there and TWRP booted right up.
lenard_hester said:
yes. I think I figured out a way around it. my mistake was rebooting. Instead of rebooting from the bootloader, I just went to recovery mode directly from there and TWRP booted right up.
Click to expand...
Click to collapse
I think you have to rename stock recovery files or when you reboot it will reinstall stock recovery.
cajun9924 said:
I think you have to rename stock recovery files or when you reboot it will reinstall stock recovery.
Click to expand...
Click to collapse
that is true, if the op is running stock android. or you can just delete that one file in /system/.

White LED instead of recovery

Ok, so lets start from the beginning.
I have a OnePlus 3t and I have been trying for the whole day to get multirom up and running.
Made a couple of mistakes in the beginning (nothing serious) although i decided to use the unbrick tool to fully clean it.
After successfully cleaning it I booted, skipped thru the setup, went to developer settings, enabled oem unlocking and verified the computer signature.
Went to fastboot mode unlocked oem, and flashed TWRP like this:
Code:
fastboot flash recovery TWRP.img
fastboot boot TWRP.img
It all went well, then in twrp I copied a backup from my pc (that I made previously) and restored it.
And here comes the actual problem. Whenever I try to boot into TWRP it is just a black screen and a the LED is white.
Only way to boot into TWRP is by typing
Code:
fastboot boot TWRP.img
while in fastboot
Does anyone have a clue on this one?
(Sorry if grammar isn't perfect)
TheGamer14 said:
Ok, so lets start from the beginning.
I have a OnePlus 3t and I have been trying for the whole day to get multirom up and running.
Made a couple of mistakes in the beginning (nothing serious) although i decided to use the unbrick tool to fully clean it.
After successfully cleaning it I booted, skipped thru the setup, went to developer settings, enabled oem unlocking and verified the computer signature.
Went to fastboot mode unlocked oem, and flashed TWRP like this:
Code:
fastboot flash recovery TWRP.img
fastboot boot TWRP.img
It all went well, then in twrp I copied a backup from my pc (that I made previously) and restored it.
And here comes the actual problem. Whenever I try to boot into TWRP it is just a black screen and a the LED is white.
Only way to boot into TWRP is by typing
Code:
fastboot boot TWRP.img
while in fastboot
Does anyone have a clue on this one?
(Sorry if grammar isn't perfect)
Click to expand...
Click to collapse
Update: Just booted into recovery by using
Code:
fastboot boot TWRP.img
and now I'm unauthorized in adb
The unbrick tool flashes an old firmware that won't start twrp. You need to update the firmware to a newer version. Try this firmware zip and report please:
http://forum.xda-developers.com/showpost.php?p=70145090&postcount=41
sniperle said:
The unbrick tool flashes an old firmware that won't start twrp. You need to update the firmware to a newer version. Try this firmware zip and report please:
http://forum.xda-developers.com/showpost.php?p=70145090&postcount=41
Click to expand...
Click to collapse
Downloading and trying rn
sniperle said:
The unbrick tool flashes an old firmware that won't start twrp. You need to update the firmware to a newer version. Try this firmware zip and report please:
http://forum.xda-developers.com/showpost.php?p=70145090&postcount=41
Click to expand...
Click to collapse
I somehow made everything even worse so using the unbrick kit again.
Should I OTA update when in system?
Just tried doing a OTA and while it was rebooting it WIPED the data by some reason.
So now it is basically a clean install that needs a OTA that probably will wipe it again...
Ok just tried it again and it seems to actually update. Gonna report back soon
TheGamer14 said:
Just tried doing a OTA and while it was rebooting it WIPED the data by some reason.
So now it is basically a clean install that needs a OTA that probably will wipe it again...
Click to expand...
Click to collapse
So it seems like if you try to update while having a pc attached wipes the data?
This is really weird
sniperle said:
The unbrick tool flashes an old firmware that won't start twrp. You need to update the firmware to a newer version. Try this firmware zip and report please:
http://forum.xda-developers.com/showpost.php?p=70145090&postcount=41
Click to expand...
Click to collapse
YESSS I'm finally able to boot into twrp TNX SO MUCH
Glad to hear you aced this. Just for further explansion:
The OS update does a firmware update too.
I took the firmware from the 3.5.4 flash zip from oneplus.

Help! I really screwed up...

It all started when I tried to temporarily boot into the TWRP img file. It didn't work so I tried flashing the file to boot_a. Then I installed TWRP through the installer (stupidly didn't wipe the caches) and... Well. When I try to boot into System through TWRP, it gets COMPLETELY stuck at the powered by Android logo screen. No amount or combination of button holding will shut it off and I actually had to let the battery (thank you SO MUCH for non-removable batteries by the way, smartphone manufacturers >_>) drain before it would actually boot again. Rebooting it into Download mode will get it stuck in there too where every time I hold the power button and shut it off, it will just reboot right back into Download mode again. And now, here's probably the worst part. I CAN'T UNLOCK the critical partition to flash when in Download mode, so I can't use the OST tool! When I try to unlock it, it just complains that flashing unlock is not allowed even though the rest of the bootloader is completely unlocked.
TL;DR - When I power the phone up it goes straight into TWRP. Booting to System totally freezes it and the Bootloader puts it in a loop when I try to power it off. Critical partition is locked for some reason. I CAN get around the bootloader loop though and get back to TWRP by switching active slots and rebooting.
Did you flash the TWRP installer to your active boot partition or your inactive one? If you flashed it to the active one, you can't get into system anymore because TWRP is your boot partition.
If you are on Oreo, and you flashed to the inactive slot, and then patched the active slot, you have to reboot into the active slot recovery and flash the Magisk installer to disable verification of the partitions.
If you can get into the bootloader, and you still have the unlock key from nokia, do fastboot flash unlock <unlock.key>, and then fastboot oem unlock_critical. Then you should be able to flash using OST.
THMSP said:
do fastboot flash unlock <unlock.key>, and then fastboot oem unlock_critical. Then you should be able to flash using OST.
Click to expand...
Click to collapse
This unlocked it! Thank you! <3
I also did have an issue with the OST tool complaining that the updater was out of date, but changing the .mlf file and leaving it unpacked when I opened it in OST seemed to make it work perfectly. My phone is now booting just fine and back to stock!
Now I just need to solve the original problem I had. How can I install TWRP to recovery since the img file wouldn't temporarily boot last time?
EDIT: Apparently unlocking the critical partition seemed to solve the problem of the TWRP image file not temporarily booting as well!
S5Guy said:
EDIT: Apparently unlocking the critical partition seemed to solve the problem of the TWRP image file not temporarily booting as well!
Click to expand...
Click to collapse
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
THMSP said:
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
Click to expand...
Click to collapse
Yeah looks like you're right. Letting it update back to Android 9 deleted TWRP and made fastboot boot for TWRP nonfunctional again.
Wait, so can I use that TWRP boot image you specified to boot temporarily to TWRP and then run the installer zip? Or will that not work and I'll have to flash the img directly from the bootloader?
S5Guy said:
Wait, so can I use that TWRP boot image you specified to boot temporarily to TWRP and then run the installer zip? Or will that not work and I'll have to flash the img directly from the bootloader?
Click to expand...
Click to collapse
You have to flash it directly to your boot partition. fastboot boot will work for nothing (and even if it worked those images would just send you directly into the system)
THMSP said:
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
Click to expand...
Click to collapse
Alright! fastboot flash boot_a (TWRP image) worked! Thank you so much for all the help. <333

Mi A2 rooting issue! Help urgently

I just unlocked bootloader, flashed boot image and twrp image(temporary) from pc but when i come to my device mi a2 in twrp mode the twrp is unable to read the twrp image or magisk zip. I can see then when i go to file manager in twrp but when i am in flashing screen they just don't appear and other files names are also changed. Is there something missing. I used unlock bootloader and fastboot boot --.img . I am in November patch and my only reason to root was i am not getting further updates after November 2018. So pls help guys
Do this after unlocking critical unlock.. Your storage is encrypted just boot to twrp and do a factory reset under wipe->Format data then type yes!! now your storage will be ready to use as normal then copy your files to phone through pc Don't forget to unlock critical otherwise you cant able to flash stock rom if anything goes wrong
Sivakumar$ said:
Do this after unlocking critical unlock.. Your storage is encrypted just boot to twrp and do a factory reset under wipe->Format data then type yes!! now your storage will be ready to use as normal then copy your files to phone through pc Don't forget to unlock critical otherwise you cant able to flash stock rom if anything goes wrong
Click to expand...
Click to collapse
Thanks for the reply! I have already flashed boot img will there be no problem if i use unlock critical now? I have formatted data though
just flash the stock boot img and do unlock critical and then do all the flashing stuffs if you dont want to be taking any risk
Sivakumar$ said:
just flash the stock boot img and do unlock critical and then do all the flashing stuffs if you dont want to be taking any risk
Click to expand...
Click to collapse
Where can i get stock boot img. I have been searching and all post are about patched boot img
Sivakumar$ said:
just flash the stock boot img and do unlock critical and then do all the flashing stuffs if you dont want to be taking any risk
Click to expand...
Click to collapse
Hey bro please reply as soon you can i have been waiting for weeks stuck here . Is the process of flashing boot image same as patched boot image? I have to keep the boot image in patched boot image folder and flash using same code?
sourav56 said:
Hey bro please reply as soon you can i have been waiting for weeks stuck here . Is the process of flashing boot image same as patched boot image? I have to keep the boot image in patched boot image folder and flash using same code?
Click to expand...
Click to collapse
It's the same process. Flash stock boot.img then unlock critical. You flash stock boot and patched boot the same way. You can keep patched boot.img in same folder just change the code in flashing command flash boot.img to flash patched boot.img. If I recall correctly.
Files changed because you are encrypted flash DM-Verity to decrypt your file or do a wipe in internal.

Question How do i get Stock recovery to not replace TWRP when rebooting???

Tried a bunch of things to make the TWRP installation persistent, but it just goes back to MIUI recovery when i reboot from the system.
I'm using TWRP 3.5.2 by Nebrassy.
USB debugging turned on
Correct drivers installed
fastboot devices work Using minimal ADB and fastboot
I have the file renamed as TWRP.img.
Steps i followed:
fastboot boot "TWRP.img" - Correctly boots into TWRP
install the TWRP image to the recovery partition - Happens with no errors
Reboot to system - No errors there as well
Reboot to recovery - Goes back to MIUI recovery.
Can someone please tell me what i should do?
PS: Tried with TWRP 3.6.0 as well just now. Same issue.
Helhound0 said:
Tried a bunch of things to make the TWRP installation persistent, but it just goes back to MIUI recovery when i reboot from the system.
I'm using TWRP 3.5.2 by Nebrassy.
USB debugging turned on
Correct drivers installed
fastboot devices work Using minimal ADB and fastboot
I have the file renamed as TWRP.img.
Steps i followed:
fastboot boot "TWRP.img" - Correctly boots into TWRP
install the TWRP image to the recovery partition - Happens with no errors
Reboot to system - No errors there as well
Reboot to recovery - Goes back to MIUI recovery.
Can someone please tell me what i should do?
PS: Tried with TWRP 3.6.0 as well just now. Same issue.
Click to expand...
Click to collapse
Try again to flash TWRP dirty and if it's started don't boot with software. You have to boot TWRP again by pressing volume + and power button until you'll get vibration , afterwards you'll be in TWRP again, clear dalvik and cache and restart system via TWRP menu
Laptapper said:
Try again to flash TWRP dirty and if it's started don't boot with software. You have to boot TWRP again by pressing volume + and power button until you'll get vibration , afterwards you'll be in TWRP again, clear dalvik and cache and restart system via TWRP menu
Click to expand...
Click to collapse
Sorry mate that didn't work. Still going back to stock recovery...
Since i didn't find a solution to make the installation presistant, i went ahead and flashed Elixir with the temporarily booted TWRP. Then wiped cache and dalvik, flashed the TWRP image, formatted data and then rebooted. Now it works.
Edit: This method did something to my recovery. I can boot to system and recovery fine but TWRP isn't able to mount the data partition. So i'm not able to flash anything or root the device anymore.
I tried formatting data, no luck.
Then tried repairing the data partition. No luck.
Changed the file system to EX2 and then EX4... Nothing.
Anyone know a solution for this?
Helhound0 said:
Sorry mate that didn't work. Still going back to stock recovery...
Click to expand...
Click to collapse
Then you've got to do a flash with stock ROM and miflash via pc
Laptapper said:
Then you've got to do a flash with stock ROM and miflash via pc
Click to expand...
Click to collapse
Would that re-lock the bootloader? And if so do i have to wait 7 more days for it to be unlocked?
I used the Disable-Dm-Verity-Zip directly in TWRP after installation. Worked without a problem.
romuser87 said:
I used the Disable-Dm-Verity-Zip directly in TWRP after installation. Worked without a problem.
Click to expand...
Click to collapse
I read that somewhere too but that didn't help me at all... Maybe i have a bad zip file..
Can you share the zip you flashed?
Also, any idea how i could get this fixed:
Helhound0 said:
Since i didn't find a solution to make the installation presistant, i went ahead and flashed Elixir with the temporarily booted TWRP. Then wiped cache and dalvik, flashed the TWRP image, formatted data and then rebooted. Now it works.
Edit: This method did something to my recovery. I can boot to system and recovery fine but TWRP isn't able to mount the data partition. So i'm not able to flash anything or root the device anymore.
I tried formatting data, no luck.
Then tried repairing the data partition. No luck.
Changed the file system to EX2 and then EX4... Nothing.
Anyone know a solution for this?
Click to expand...
Click to collapse
Helhound0 said:
I read that somewhere too but that didn't help me at all... Maybe i have a bad zip file..
Can you share the zip you flashed?
Also, any idea how i could get this fixed:
Click to expand...
Click to collapse
The attached file worked for me
Helhound0 said:
Would that re-lock the bootloader? And if so do i have to wait 7 more days for it to be unlocked?
Click to expand...
Click to collapse
1. With MiFlash there is an option at the bottom of the screen to lock bootloader. Just make sure it is NOT checked, and you will be safe to use MiFlash without relocking bootloader.
2. When installing TWRP for first time, it is essential that your first reboot is straight back to TWRP - then it becomes persistent, and future reboots to recovery will be to TWRP. If you do not do the first reboot back to TWRP, the stock MIUI ROM recovery reinstalls itself.
HiQual said:
1. With MiFlash there is an option at the bottom of the screen to lock bootloader. Just make sure it is NOT checked, and you will be safe to use MiFlash without relocking bootloader.
2. When installing TWRP for first time, it is essential that your first reboot is straight back to TWRP - then it becomes persistent, and future reboots to recovery will be to TWRP. If you do not do the first reboot back to TWRP, the stock MIUI ROM recovery reinstalls itself.
Click to expand...
Click to collapse
The first ever twrp install i did, i rebooted to system by mistake but i reflashed twrp and made sure to reboot to recovery.... That was the second try. I think i may have tried at least two dozen times since that but it just kept booting back to stock recovery...
I think I'll run with this until the end of Jan and then redo everything from scratch...
Helhound0 said:
Since i didn't find a solution to make the installation presistant, i went ahead and flashed Elixir with the temporarily booted TWRP. Then wiped cache and dalvik, flashed the TWRP image, formatted data and then rebooted. Now it works.
Edit: This method did something to my recovery. I can boot to system and recovery fine but TWRP isn't able to mount the data partition. So i'm not able to flash anything or root the device anymore.
I tried formatting data, no luck.
Then tried repairing the data partition. No luck.
Changed the file system to EX2 and then EX4... Nothing.
Anyone know a solution for this?
Click to expand...
Click to collapse
I'm stuck at this stage. Have you found any solution yet?

Categories

Resources