Mi A2 rooting issue! Help urgently - Xiaomi Mi A2 / 6X Questions & Answers

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.

Related

Flashing twrp on stock v20i

So I came from a stock lollipop Tmobile h811 non rooted
To stock MM v20i.
Ive tried flashing twrp 3.0 for cm13, and no matter what,
I get failed: (remote unknown command at the end after it sends recovery.
Its already unlocked(bootloader)
Thanks.
[email protected] said:
So I came from a stock lollipop Tmobile h811 non rooted
To stock MM v20i.
Ive tried flashing twrp 3.0 for cm13, and no matter what,
I get failed: (remote unknown command at the end after it sends recovery.
Its already unlocked(bootloader)
Thanks.
Click to expand...
Click to collapse
Type: fastboot boot (path goes here)
You can drag and drop the twrp img into the command window. This will ensure you have the correct path
[email protected] said:
So I came from a stock lollipop Tmobile h811 non rooted
To stock MM v20i.
Ive tried flashing twrp 3.0 for cm13, and no matter what,
I get failed: (remote unknown command at the end after it sends recovery.
Its already unlocked(bootloader)
Thanks.
Click to expand...
Click to collapse
Follow this instruction
http://forum.xda-developers.com/tmobile-g4/development/stock-h811-20i-images-kdz-flashable-t3308227
mingkee said:
Follow this instruction
http://forum.xda-developers.com/tmobile-g4/development/stock-h811-20i-images-kdz-flashable-t3308227
Click to expand...
Click to collapse
That link doesn't really solve the OP's issue. I have the same issue. BUT - your link did show me that I can BOOT the .img file, I can't flash the .img file. I've verified the bootloader is unlocked by the fastboot getvar command.
I'm not sure what to do next. Installing OpenGapps causes a boot loop and the only thing I can do at this point is a factory reset with the OEM recovery since in the boot loop adb is unresponsive.
joesee said:
That link doesn't really solve the OP's issue. I have the same issue. BUT - your link did show me that I can BOOT the .img file, I can't flash the .img file. I've verified the bootloader is unlocked by the fastboot getvar command.
I'm not sure what to do next. Installing OpenGapps causes a boot loop and the only thing I can do at this point is a factory reset with the OEM recovery since in the boot loop adb is unresponsive.
Click to expand...
Click to collapse
The instruction shows how to flash recovery.img with TWRP though I have no clue how to do it.
I got that error the first time I did it, it was because of a misspelling of the command.
If you already unlocked the bootloader, while in fastboot, you only type "fastboot boot" + "path to twrp img on computer" OR instead of typing out the path, you may drag and drop the file into the command window.
Once it boots to twrp, flash twrp from within the booted img. That ensures you have permanent twrp.
If you were able to unlock your bootloader, the only thing stopping you from loading twrp is improper spelling and path to the img. Almost every error I have seen is from not following the directions.
Vseprz said:
If you already unlocked the bootloader, while in fastboot, you only type "fastboot boot" + "path to twrp img on computer" OR instead of typing out the path, you may drag and drop the file into the command window.
Once it boots to twrp, flash twrp from within the booted img. That ensures you have permanent twrp.
If you were able to unlock your bootloader, the only thing stopping you from loading twrp is improper spelling and path to the img. Almost every error I have seen is from not following the directions.
Click to expand...
Click to collapse
OK, just so I understand correctly, the proper sequence of events is to use fastboot to boot TWRP (which I can do) then, once in TWRP, I can then flash the twrp .zip file, right? Does anyone know if the LG's bootloader overwrites the recovery partition upon boot (in other words, do I have to boot straight to recovery after I flash to ensure it sticks?)
Sorry for the obtuse questions, I've got a lot of experience with Samsung flashing back in the KK and LP days, but not MM.
Thanks in advance!!
joesee said:
OK, just so I understand correctly, the proper sequence of events is to use fastboot to boot TWRP (which I can do) then, once in TWRP, I can then flash the twrp .zip file, right? Does anyone know if the LG's bootloader overwrites the recovery partition upon boot (in other words, do I have to boot straight to recovery after I flash to ensure it sticks?)
Sorry for the obtuse questions, I've got a lot of experience with Samsung flashing back in the KK and LP days, but not MM.
Thanks in advance!!
Click to expand...
Click to collapse
So you have flashed 20i which overwrites twrp with the stock recovery.
You then go through the steps for unlocking the boot loader.
After the boot loader is unlocked, you may boot into twrp with the fastboot boot command.
When that boots into twrp, flash twrp from within that to have it stick.
Have a question and maybe someone can help. Me getting carried away installed twrp from external partition. Now i cannot boot into recovery. Tried flashing using flashify and twrp manager. but flashify does not install after reboot and there is no option for h811 in twrp manager. Anyway to fix this?
Sent from my LG-H811 using Tapatalk
Vseprz said:
So you have flashed 20i which overwrites twrp with the stock recovery.
You then go through the steps for unlocking the boot loader.
After the boot loader is unlocked, you may boot into twrp with the fastboot boot command.
When that boots into twrp, flash twrp from within that to have it stick.
Click to expand...
Click to collapse
Yes, that's exactly the steps I do. I've flashed 20i. I used fastboot to boot into twrp. I then "install" the twrp zip file. Says it flashes with no issues. I then reboot the phone. Still has stock recovery.
I've confirmed my bootloader is unlocked with the fastboot getvar all. I've also tried all three versions of twrp available (.1, .2 and .3) and still doesn't work. Yet twrp works fine if I boot it.
joesee said:
Yes, that's exactly the steps I do. I've flashed 20i. I used fastboot to boot into twrp. I then "install" the twrp zip file. Says it flashes with no issues. I then reboot the phone. Still has stock recovery.
I've confirmed my bootloader is unlocked with the fastboot getvar all. I've also tried all three versions of twrp available (.1, .2 and .3) and still doesn't work. Yet twrp works fine if I boot it.
Click to expand...
Click to collapse
How did you confirm you have stock recovery? Did you use adb reboot recovery? Or did you use hardware keys to boot to it? Because if you use hardware keys you still get the initial confirm factory reset. You just have to accept then it boots to twrp.
---------- Post added at 10:44 AM ---------- Previous post was at 10:22 AM ----------
99problemz said:
Have a question and maybe someone can help. Me getting carried away installed twrp from external partition. Now i cannot boot into recovery. Tried flashing using flashify and twrp manager. but flashify does not install after reboot and there is no option for h811 in twrp manager. Anyway to fix this?
Sent from my LG-H811 using Tapatalk
Click to expand...
Click to collapse
If boot loader is unlocked you should load twrp from fastboot.
Vseprz said:
How did you confirm you have stock recovery? Did you use adb reboot recovery? Or did you use hardware keys to boot to it? Because if you use hardware keys you still get the initial confirm factory reset. You just have to accept then it boots to twrp.
---------- Post added at 10:44 AM ---------- Previous post was at 10:22 AM ----------
If boot loader is unlocked you should load twrp from fastboot.
Click to expand...
Click to collapse
Hahaha now that's funny!! I bet I've been through 50 blog posts on various sites to try to figure this out. Having successfully installed Viper I didn't want to take the chance and pass that confirm wipe factory question.
I feel like a complete tool. Seriously, thank you for taking the time to respond to me!
joesee said:
Hahaha now that's funny!! I bet I've been through 50 blog posts on various sites to try to figure this out. Having successfully installed Viper I didn't want to take the chance and pass that confirm wipe factory question.
I feel like a complete tool. Seriously, thank you for taking the time to respond to me!
Click to expand...
Click to collapse
I'm glad it all worked out! :good:
finding I have to re-flash with flashify each time
using twrp-2.8.7.1, I get only the first reboot from there with hardware keys letting me into twrp after accepting the first factory reset prompt and denying the second. After that cant do it again unless I re-flash. Same thing happens if I flash it from within twrp. Can use terminal, su, boot recovery and I am in., or ADB/fatsboot Primarily worried about a soft brick condition. H-811, v1 20i stock, unlocked bootloader and rooted. DE-bloated,
Any Ideas, Thanks
jdoebean said:
using twrp-2.8.7.1, I get only the first reboot from there with hardware keys letting me into twrp after accepting the first factory reset prompt and denying the second. After that cant do it again unless I re-flash. Same thing happens if I flash it from within twrp. Can use terminal, su, boot recovery and I am in., or ADB/fatsboot Primarily worried about a soft brick condition. H-811, v1 20i stock, unlocked bootloader and rooted. DE-bloated,
Any Ideas, Thanks
Click to expand...
Click to collapse
You drop the twrp file
In fastboot folder open command prompt and flash twrp first just rename it simply to recovery.img while in the fastboot folder
Type fastboot flash recovery recovery.img
Or just fastboot flash recovery.img
Then it should boot you into twrp
Once booting into twrp flash the supersu zip in your internal sd
Once you have root and reboot all you have to do is use flashify app and download twrp from the app and flash it Twrp sticks from there.
Sent from my LGMS631 using XDA Free mobile app

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

Accidentally flashed TWRP in boot partition.

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

Accidentally flashed TWRP in the boot partition

Hello,
So I did a mistake by flashing TWRP into the boot partition... Now whenever I reboot my phone it enters TWRP. How can I fix that or is it bricked? I can't find anywhere on the Internet stock boot images, only some modded kernels or something like that. Can anyone tell me how can I get stock boot.img and flash it so that I can use my phone again?
Aspect13 said:
Hello,
So I did a mistake by flashing TWRP into the boot partition... Now whenever I reboot my phone it enters TWRP. How can I fix that or is it bricked? I can't find anywhere on the Internet stock boot images, only some modded kernels or something like that. Can anyone tell me how can I get stock boot.img and flash it so that I can use my phone again?
Click to expand...
Click to collapse
Downllad zip or tgz file for your extract firmware, ectract boot img and then flash by fastboot to boot

Stuck In Fastboot Mode

I was on stock 12.1 (rooted, bootloader unlocked) and wanted to try out this ROM e/OS.
Went through the first step of flashing the recovery, after which it is now stuck in Fastboot mode.
I did try to boot into TWRP to install a ROM or do a factory wipe via Fastboot but any command just takes me back to Fastboot.
Any ideas on how to fix this?
Thanks.
bluegrass55 said:
I was on stock 12.1 (rooted, bootloader unlocked) and wanted to try out this ROM e/OS.
Went through the first step of flashing the recovery, after which it is now stuck in Fastboot mode.
I did try to boot into TWRP to install a ROM or do a factory wipe via Fastboot but any command just takes me back to Fastboot.
Any ideas on how to fix this?
Thanks.
Click to expand...
Click to collapse
What happens when you try to boot TWRP?
Is there an error message at the bottom of the bootloader screen?
V0latyle said:
What happens when you try to boot TWRP?
Is there an error message at the bottom of the bootloader screen?
Click to expand...
Click to collapse
It returns back to fastboot.
Just noticed the error message "error boot prepare"
bluegrass55 said:
It returns back to fastboot.
Just noticed the error message "error boot prepare"
Click to expand...
Click to collapse
Ah, this usually happens when you are trying to use a custom ROM with the stock boot image. Extract the boot image from the ROM you're trying to install then flash it to /boot.
Otherwise, use a GSI.
V0latyle said:
Ah, this usually happens when you are trying to use a custom ROM with the stock boot image. Extract the boot image from the ROM you're trying to install then flash it to /boot.
Otherwise, use a GSI.
Click to expand...
Click to collapse
Thanks for the quick reply.
I'll try flashing the custom ROM boot image first. By GSI do you mean the stock boot image?
bluegrass55 said:
Thanks for the quick reply.
I'll try flashing the custom ROM boot image first. By GSI do you mean the stock boot image?
Click to expand...
Click to collapse
Managed to sort it out from the instructions on this website to unbrick Pixel4.
Restore Pixel 4/XL/4a to Stock Firmware via Fastboot | Unbrick it
In this tutorial, we will show you how to restore Pixel 4, 4 XL, and 4a to Stock Firmware via Fastboot Commands and then unbrick it.
satus.keystoneuniformcap.com
bluegrass55 said:
Thanks for the quick reply.
I'll try flashing the custom ROM boot image first. By GSI do you mean the stock boot image?
Click to expand...
Click to collapse
No, Generic System Image. May not be available for the custom ROM you're trying to use.
bluegrass55 said:
Flashing stock boot didn't work.
I hadn't flashed the custom ROM. Just the custom ROM recovery, with which you install the ROM.
Click to expand...
Click to collapse
I would suggest asking in the ROM thread, but make sure you read back as the question may have been answered before.
To get your device working for now, just flash back to stock

Categories

Resources