Xiaomi MI A2 -- TWRP can't be flashed - Xiaomi Mi A2 / 6X Questions & Answers

Hi I have Xiaomi mi A2. As it just arrived, I unlocked the bootloader, that was fine. Now I want to flash twrp, I was trying several versions and guides. I first started with classic command - fastboot flash recovery recovery.img (it was that 3.2.3 Jasmine) - OKAY...OKAY, no error. So I rebooted to recovery and what appeard was than android with text "no command". Then I tried some partition switching or whatever it is (flash recovery to non- active partition), but when I wanted to set my unused partition to use with command "fastboot set_active a" it didn't recognize the command. What I am doing wrong? I am noob with this, I flashed some other phones before, but I am really struggling with this. How should I flash it? Or is there some other way to root the phone (as my main goal is to root the phone)?

You should look at guides for Magisk. They basically say to flash a patched_boot.img (created by Magisk). It HAS to be the same version as your System (in other words, the boot image used to create patched_boot image has to be the same as the one you're replacing - else it won't boot).
And there is no 'recovery' partition anymore, not in dual slot phones (the other slot is now the recover).

Related

Stuck in fastboot :(

Hello everyone!
As the title states, my Xiaomi mi 9 is stuck in fastboot mode, after i tried installing the latest unofficial port of Lineageos 17.1 for the Mi 9.
I can not exactly remember how it happened but i guess i must have wiped the phone after installing the custom rom. Silly me...
I tried the following things to try to unbrick my phone:
1. Using the Mi Flash Tool in order to flash the official Xiaomi firmware onto my device. I flashed these versions: 11.05 global fastboot, 11.08 EEA fastboot, 11.06 global fastboot. None of them worked. My phone would show up on the flash tool and the flashing itself was always marked as successfull but sadly my phone would not boot into MIUI and just stay frozen in fastboot mode. Restarting the device did not help.
2. Flashing twrp and trying to boot into it. Sadly, this also did not work out for me. Every time after i would successfully flash the .img file and reboot my device, the damn fastboot screen appeared.
So is there anything i can do? No matter what i try, my device goes into fastboot mode. I tried searching for the answer myself but those who had the similar issue did either not receive any useful answers or the Mi Flash Tool magically worked for them after a few attempts.
Thank you in advance!
Hello,
As long as you have access to fastboot mode, am sure you can recover your device.
You need to download the official ROM that corresponds to your specific devices. If it is global version, download the global version.
Also, before flashing, make sure you unlock the bootloader.
jaybirdxyz said:
Hello everyone!
As the title states, my Xiaomi mi 9 is stuck in fastboot mode, after i tried installing the latest unofficial port of Lineageos 17.1 for the Mi 9.
I can not exactly remember how it happened but i guess i must have wiped the phone after installing the custom rom. Silly me...
I tried the following things to try to unbrick my phone:
1. Using the Mi Flash Tool in order to flash the official Xiaomi firmware onto my device. I flashed these versions: 11.05 global fastboot, 11.08 EEA fastboot, 11.06 global fastboot. None of them worked. My phone would show up on the flash tool and the flashing itself was always marked as successfull but sadly my phone would not boot into MIUI and just stay frozen in fastboot mode. Restarting the device did not help.
2. Flashing twrp and trying to boot into it. Sadly, this also did not work out for me. Every time after i would successfully flash the .img file and reboot my device, the damn fastboot screen appeared.
So is there anything i can do? No matter what i try, my device goes into fastboot mode. I tried searching for the answer myself but those who had the similar issue did either not receive any useful answers or the Mi Flash Tool magically worked for them after a few attempts.
Thank you in advance!
Click to expand...
Click to collapse
fastboot --cmdline "lge.kcal=0|0|0|x" boot twrp.img
this temporarily boots you into TWRP so you can reflash TWRP again. with this method the TWRP will be deleted once you reboot si you need to reflash TWRP in TWRP. then dont reboot, flash a Good working rom.
Similar problem here.
The line fastboot --cmdline "lge.kcal=0|0|0|x" boot twrp.img
brings up
FAILED (remote: 'Failed to load/authenticate boot image: Load Error')
ai5g said:
Similar problem here.
The line fastboot --cmdline "lge.kcal=0|0|0|x" boot twrp.img
brings up
FAILED (remote: 'Failed to load/authenticate boot image: Load Error')
Click to expand...
Click to collapse
try other TWRP images? or your boot partition fried?
fastboot flash boot twrp.img and see What happens

[HELP] Softbrick After Updating Magisk 21.2. Boot Into TWRP, But Touchscreen Not working.

So after updating Magisk 21.2 using the recommended option in the Magisk app, the phone will boot to the ROG logo screen and just stuck there.
I downloaded the twrp-3.5.0_9-0-I001D.img from TWRP website, then used 'fastboot boot twrp-3.5.0_9-0-I001D.img' to boot into TWRP, and managed to fix the softbrick with one of the function in TWRP (forgot what it's called, i think it's one of those functions under 'advanced' menu), but i didn't install TWRP.
I was then able to successfully boot up my phone, and decided to install Magisk 21.2 again with TWRP. So I downloaded Magisk-v21.2.zip and copied it into my phone, booted into TWRP again using 'fastboot boot twrp-3.5.0_9-0-I001D.img', and installed Magisk-v21.2.zip, and my phone was bricked again.
So again, I used 'fastboot boot twrp-3.5.0_9-0-I001D.img' to boot into TWRP, only this time the touch screen doesn't work.
Is there anyway around this ? or anyway to fix the touchscreen?
Thanks a lot in advance.
odysseusky said:
So after updating Magisk 21.2 using the recommended option in the Magisk app, the phone will boot to the ROG logo screen and just stuck there.
I downloaded the twrp-3.5.0_9-0-I001D.img from TWRP website, then used 'fastboot boot twrp-3.5.0_9-0-I001D.img' to boot into TWRP, and managed to fix the softbrick with one of the function in TWRP (forgot what it's called, i think it's one of those functions under 'advanced' menu), but i didn't install TWRP.
I was then able to successfully boot up my phone, and decided to install Magisk 21.2 again with TWRP. So I downloaded Magisk-v21.2.zip and copied it into my phone, booted into TWRP again using 'fastboot boot twrp-3.5.0_9-0-I001D.img', and installed Magisk-v21.2.zip, and my phone was bricked again.
So again, I used 'fastboot boot twrp-3.5.0_9-0-I001D.img' to boot into TWRP, only this time the touch screen doesn't work.
Is there anyway around this ? or anyway to fix the touchscreen?
Thanks a lot in advance.
Click to expand...
Click to collapse
try using the correct unofficial twrp from here (there's one for pie and one for android 10 - Q).
Perhaps your magisk version is corrupt - as a complete guess... could try re-downloading it. Did it flash without error?
Another possibility is that twrp has to installed for lastest magisk to run, again, as a guess. I think i read somewhere that it's the other way around - that if you have twrp installed/flashed, you must also have magisk installed in order to boot. Perhaps it works both ways
EDIT: by correct I simply mean the correct version for your android version...
odysseusky said:
So after updating Magisk 21.2 using the recommended option in the Magisk app, the phone will boot to the ROG logo screen and just stuck there.
I downloaded the twrp-3.5.0_9-0-I001D.img from TWRP website, then used 'fastboot boot twrp-3.5.0_9-0-I001D.img' to boot into TWRP, and managed to fix the softbrick with one of the function in TWRP (forgot what it's called, i think it's one of those functions under 'advanced' menu), but i didn't install TWRP.
I was then able to successfully boot up my phone, and decided to install Magisk 21.2 again with TWRP. So I downloaded Magisk-v21.2.zip and copied it into my phone, booted into TWRP again using 'fastboot boot twrp-3.5.0_9-0-I001D.img', and installed Magisk-v21.2.zip, and my phone was bricked again.
So again, I used 'fastboot boot twrp-3.5.0_9-0-I001D.img' to boot into TWRP, only this time the touch screen doesn't work.
Is there anyway around this ? or anyway to fix the touchscreen?
Thanks a lot in advance.
Click to expand...
Click to collapse
Hi ! i did a different approach when i updated my magisk to V21. i'm on firmware 2012.65 so i downloaded the firmware update from the official website for our phone.
your firmware version could be different so use your firmware's boot.img version.
* extract the firmware contents
* using payload dumper to get the boot.img
* transfer the boot.img to internal storage
* open magisk manager , install and click patch a file
* select the boot.img
* transfer the patched boot.img to the same folder together with your adb&fastboot environment
* boot the phone to bootloader
* using minimal adb and fastboot
* enter command " fastboot devices " make sure your device is listed
* get the current slot ; enter command " fastboot getvar current-slot " you should get A or B and remember which active slot is default
* if it's A or B either of the two enter command " fastboot flash boot patchedboot.img "
* if coming from the active slot A enter command " fastboot --set-active=b "
* if coming from the active slot B enter command " fastboot --set-active=a "
* then flash the patchedboot.img again ; make sure you flash the patchedboot.img on both slot A and slot B
* then go back to the default active slot ealier if it's A or B using the command on the top
* lastly enter command " fastboot reboot " then check if you're rooted on magisk manager.
you should boot without any errors if you follow correctly the procedure.
note : no need for TWRP on this procedure.

Phone goes into fastboot mode after I reboot, can't get into system or recovery

My phone keeps getting stuck on fastboot mode.
I'll flash the standard MIUI ROM using the MiFlash Tool, then I flash a custom recovery and a custom ROM(EvolutionX in this case), everything works and I can set up my phone, but as soon as I reboot I can no longer boot into android or recovery. i've tried flashing multiple recoveries using fastboot and straight up booting a recovery using "fastboot boot recovery.img" but it still always go to fastboot. The only solution is to start the process all over again, and obviously that's just not an option since I can never turn my phone off after that.
Any tips?
I think I got it solved, at least I got it to reboot into Android and TWRP.
I used this guide, but I'll write the steps I took here in case you're having the same issue. I wound up using xiaomi.eu MIUI rom, but it shouldn't matter what you use, I'll assume you're stuck in fastboot.
Do "fastboot flash vendor vendor.img", you get this vendor.img from the fastboot version of the official MIUI ROM, after you decompress the .tar.gz it should be in the "images" folder
Do "fastboot flash recovery twrp.img" then "fastboot boot twrp.img", this should flash twrp as your recovery and then boot into it, for some reason it only worked with the official twrp, not orange fox.
Assuming you got into TWRP you should now flash the latest firmware(I got mine from xiaomifirmwareupdater.com) make sure you download just the firmware not the entire rom, mine was named something like fw_raphael_miui... .zip
Format data (not wipe, format, it's a separate option in TWRP), it should ask you to type yes, so do that.
Flash whatever ROM you want
Hopefully this helps you, I hate finding forum posts marked "solved" but with no instructions. I also tried the "vbmeta_dv_shivsom.img" method some threads mentioned but it didn't work
Here's a pastebin of the guide I used in case the original link goes down
You can get all the files I mentioned from xiaomifirmwareupdater.com and the official TWRP site
Out of all that, the one instruction that solves it is the format data step. This is the magic step required. You always need to do this when flashing over MIUI.
Flashing vendor was totally irrelevant.
This will tell you what you need to do.
Simple Guide to flashing successfully
Here's a quick guide to some of the basics. Which recovery. ---------------------------- Use the latest from here. https://forum.xda-developers.com/k20-pro/development/recovery-unofficial-twrp-xiaomi-redmi-t3944363/post79823568 Do not use Orange...
forum.xda-developers.com
Thanks a lot man! I'm having this issue and it is beyond annoying. I've lost so much time with this BS.
Edit: Does not help actually
I just had the same problem with my Lamentablet.
I was trying stuff up and restarted it in fastboot mode and got stuck there.
So, ways to deal with it:
adb reboot recovery
rebooted the tablet in recovery mode. All I had then was to press the power button to activate Reboot. Solved! From now on it boots normally.
Meanwhile I had discovered that by typing
fasboot continue
the tablet would resume, but at the next reboot cycle, power down + up cycle or reboot after a crash, the tablet would reboot into fastboot mode...
And I found this out when it crashed (it's not called a Lamentablet for nothing!).
Luckily I had a PC with Linux around. It didn't have the software installed but drivers were already in the Kernel and installing adb and fastboot was a matter of mere seconds. If I didn't have an easily ready PC at hand, this tablet would have become a brick until plugged in and rebooted...
OMG Thanks dude.... I'm literally working to installing custom rom on redmi 7a from stock rom but I don't know what reason that make my phone always stuck on fastboot when format data, before this was fine.
Osga21 said:
I think I got it solved, at least I got it to reboot into Android and TWRP.
I used this guide, but I'll write the steps I took here in case you're having the same issue. I wound up using xiaomi.eu MIUI rom, but it shouldn't matter what you use, I'll assume you're stuck in fastboot.
Do "fastboot flash vendor vendor.img", you get this vendor.img from the fastboot version of the official MIUI ROM, after you decompress the .tar.gz it should be in the "images" folder
Do "fastboot flash recovery twrp.img" then "fastboot boot twrp.img", this should flash twrp as your recovery and then boot into it, for some reason it only worked with the official twrp, not orange fox.
Assuming you got into TWRP you should now flash the latest firmware(I got mine from xiaomifirmwareupdater.com) make sure you download just the firmware not the entire rom, mine was named something like fw_raphael_miui... .zip
Format data (not wipe, format, it's a separate option in TWRP), it should ask you to type yes, so do that.
Flash whatever ROM you want
Hopefully this helps you, I hate finding forum posts marked "solved" but with no instructions. I also tried the "vbmeta_dv_shivsom.img" method some threads mentioned but it didn't work
Here's a pastebin of the guide I used in case the original link goes down
You can get all the files I mentioned from xiaomifirmwareupdater.com and the official TWRP site
Click to expand...
Click to collapse
thanks bro. flashing vendor after a format from twrp did the good

Pixel 5 is broken after flash

Hello, I wanted to free my pixel 5 (android12) from google and install the e.foundation os. I managed to unlock the bootloader. At further step something must have gone wrong and I came only in the recovery mode. Then I flashed TWRP and wanted to install android 11 from there. I did not know which version for my phone is the right one. TWRP has any errors displayed. I have a few years ago on another phone made a custom rom flash on it and thought I know what I'm doing but thought wrong. I selected all the check marks in the wipe data menu and formatted everything. Then nothing worked and the phone went into bootloop. Now I managed to get into the recovery mode. But I can not flash TWRP or rom. Can someone maybe give me a tip? or do I now have a 500 euro expensive stone here.
I am grateful for any advice. this flashing is very complicated for me a I had it somehow easier in memory.
I speak german and the text was created with deepl
there is a photo of the screen
Okay you can try this
Download ADB AND MINIMAL FASTBOOT
Download TWRP
1. Open ADB AND MINIMAL FASTBOOT
2. Type fastboot flash recovery /path/to/twrp.img
3. Try reboot to recovery mode.
4. If you can reboot to recovery mode (TWRP) - Copy stock rom to device and flash it.
I have also tried this with TWRP but i always get the error message:
FAILED (remote: Not allowed to flash (recovery))
i have also tried several roms to flash after unpacking.
fastboot flash bootloader runs through
fastboot flash radio runs through successfully
fastboot update image but not
and ends with the message:
FAILED (remote: Partition should be flashed in fastbootd).

Question How to fastboot into reboot recovery?

I'm on a POCO M4 Pro 5G eea global V13.0.1.0.SGBEUXM, and my fastboot doesn't accept the "fastboot reboot recovery" command.
Every time I install the recovery.img, then I can't go to the installed custom recovery, I tried every solution I could find:
fastboot flash recovery recovery.img
fastboot reboot bootloader
and then select Recovery using Vol-Up/Down buttons + Power button to start the recovery ROM
Click to expand...
Click to collapse
1.fastboot set_active b
2.fastboot flash boot_b New_fox.img
3.fastboot reboot recovery
4.Select "Flash current OrangeFOX" in menu (automatically flashe to both slot ab )
5.Select "reboot" in menu
6.Select "Slot A is active"
7. reboot
Click to expand...
Click to collapse
fastboot flash recovery.img
fastboot reboot recovery
Click to expand...
Click to collapse
fastboot boot twrp.img
Click to expand...
Click to collapse
None of these methods allowed me to initialize the installed custom recovery.
Any suggestion?
Thank you so much in advance
escalhavardo said:
I'm on a POCO M4 Pro 5G eea global V13.0.1.0.SGBEUXM, and my fastboot doesn't accept the "fastboot reboot recovery" command.
Every time I install the recovery.img, then I can't go to the installed custom recovery, I tried every solution I could find:
None of these methods allowed me to initialize the installed custom recovery.
Any suggestion?
Thank you so much in advance
Click to expand...
Click to collapse
hi
I think the arraki's TWRP on xda cannot be started.
Better to use orangeFox.
There is no Recovery partition on this phone, so we use "fastboot flash boot recovery.img".
I think I just bricked my phone. I got it to enter in orangefox, then I selected restart system, and then is just looping into poco logo.
I can enter in fastboot, but even when i restore the original boot.img, it keeps looping in poco logo.
Can someone give me a help? I don´t have a clue how to boot a firmware trough fastboot
Very thankfully in advance
Edited: I managed to restore boot.img (thank God) :
Fastboot flash boot_a boot.img (Original firmware)
Fastboot flash boot_b boot.img (Original firmware)
fastboot reboot
escalhavardo said:
I think I just bricked my phone. I got it to enter in orangefox, then I selected restart system, and then is just looping into poco logo.
I can enter in fastboot, but even when i restore the original boot.img, it keeps looping in poco logo.
Can someone give me a help? I don´t have a clue how to boot a firmware trough fastboot
Very thankfully in advance
Click to expand...
Click to collapse
Use Xiaomi Flash Tool.
If you can get into fastboot mode, you can restore.
Then do the following. or give up.
1.fastboot set_active b
2.fastboot flash boot_b New_fox.img
3.fastboot reboot recovery
4.Select "Flash current OrangeFOX" in menu (automatically flashe to both slot ab )
5.Select "reboot" in menu
6.Select "Slot A is active"
7. reboot
escalhavardo said:
I think I just bricked my phone. I got it to enter in orangefox, then I selected restart system, and then is just looping into poco logo.
I can enter in fastboot, but even when i restore the original boot.img, it keeps looping in poco logo.
Can someone give me a help? I don´t have a clue how to boot a firmware trough fastboot
Very thankfully in advance
Edited: I managed to restore boot.img (thank God) :
Fastboot flash boot_a boot.img (Original firmware)
Fastboot flash boot_b boot.img (Original firmware)
fastboot reboot
Click to expand...
Click to collapse
I forgot to say
Be careful not to lock bootloader with Xiaomi Flash Tool. It's a very confusing setting.
kousuke5555 said:
6.Select "Slot A is active"
Click to expand...
Click to collapse
Where is "Slot A is active" ? i don´t see it
Did you mean "Switch to slot A" ?
Thank you so much, you're a lifesaver.
escalhavardo said:
Where is "Slot A is active" ? i don´t see it
Did you mean "Switch to slot A" ?
thank you so much, your a life saver.
Click to expand...
Click to collapse
Go back to fastboot
"fastboot set_active a"
1.fastboot getvar current-slot
2.if the result is slot a.(slot a in which the system boots)
3.fastboot set_active b
4.fastboot flash boot_b New_fox.img
5.fastboot reboot recovery
6.Select "Flash current OrangeFOX" in menu (automatically flash to both slot a/b )
7.Select "back"
8.Select "reboot" in menu
9.Select "Slot A is active"
10.reboot
You solved my problem. Thank you so much for all your help. You're a life saver.
kousuke5555 said:
I forgot to say
Be careful not to lock bootloader with Xiaomi Flash Tool. It's a very confusing setting.
Click to expand...
Click to collapse
Can you send me unlocked bootloader backup of poco m4 pro 5g i just locked it and i can't unlock it now because my phone is bricked and it's showing nv data is corrupted if you have solution on this plz share it.
delete
kousuke5555 said:
hi
We can't solve boot loops with the bootloader locked.
Please go to the service center.
Had you backed up seccfg.img, you could have unlocked it again.
However, it is specific to each device.
I can't send.
Click to expand...
Click to collapse
Do you have any other solution to this error "nv data is corrupted"
delete
It's important to note that many devices do not have a recovery partition. A/B slot devices are an example of this. The recovery kernel, as well as the system kernel and ramdisk, is in /boot. If you flash a recovery image to /boot, this overwrites anything that was already in there, meaning that you just deleted your system kernel.
To work around this, do not FLASH custom recoveries, but instead LIVE BOOT them:
fastboot boot twrp.img
This tells your device to load the image you're sending, without flashing it to the boot partition.
From here, once TWRP is running, you should be able to install TWRP which replaces the recovery kernel in /boot with TWRP, while preserving your system kernel.
However, in many cases, installing TWRP shouldn't be necessary at all if you can flash partitions directly from fastboot.
If you made this mistake and your device is only booting to TWRP, simply reflash the factory boot image.
V0latyle said:
It's important to note that many devices do not have a recovery partition. A/B slot devices are an example of this. The recovery kernel, as well as the system kernel and ramdisk, is in /boot. If you flash a recovery image to /boot, this overwrites anything that was already in there, meaning that you just deleted your system kernel.
To work around this, do not FLASH custom recoveries, but instead LIVE BOOT them:
fastboot boot twrp.img
This tells your device to load the image you're sending, without flashing it to the boot partition.
From here, once TWRP is running, you should be able to install TWRP which replaces the recovery kernel in /boot with TWRP, while preserving your system kernel.
However, in many cases, installing TWRP shouldn't be necessary at all if you can flash partitions directly from fastboot.
If you made this mistake and your device is only booting to TWRP, simply reflash the factory boot image.
Click to expand...
Click to collapse
hi
Unfortunately, some models of xiaomi cannot use the fastboot "boot" command.
The method mentioned in the thread here is a last resort.
I've talked to some developers but they don't accept this method.
sad.
However, there is no thread in xda, but the developer made twrp, so I think we should use it.
shanawgray said:
Do you have any other solution to this error "nv data is corrupted"
Click to expand...
Click to collapse
hi
I'm sorry. I was wrong.
I thought I needed an official unlock.
but maybe it seems that SP Flash Tool can also be used for locked.
How-to-fix-system-destroyed-on-locked-MTK-bootloader
ttps://telegra.ph/How-to-fix-system-destroyed-on-locked-MTK-bootloader-07-10
"nv data is corrupted" may be another issue.
Perhaps putting in the "correct" stock ROM might fix it.
However, it may be impossible if nvram is completely erased.
There are smart people who made the guide link above in the telegram group, so I think you should talk to them.
kousuke5555 said:
hi
I'm sorry. I was wrong.
I thought I needed an official unlock.
but maybe it seems that SP Flash Tool can also be used for locked.
How-to-fix-system-destroyed-on-locked-MTK-bootloader
ttps://telegra.ph/How-to-fix-system-destroyed-on-locked-MTK-bootloader-07-10
"nv data is corrupted" may be another issue.
Perhaps putting in the "correct" stock ROM might fix it.
However, it may be impossible if nvram is completely erased.
There are smart people who made the guide link above in the telegram group, so I think you should talk to them.
Click to expand...
Click to collapse
Hi
I was trying to flash gsi on my poco m4 pro 5g and that didn't work and my phone got bricked after that i flash stock rom with sp flash tool but the download only option was not working then i try to flash with format all + download and it did worked and the error started showing up. can i bypass that error "nv data is corrupted" and boot into system?
shanawgray said:
Hi
I was trying to flash gsi on my poco m4 pro 5g and that didn't work and my phone got bricked after that i flash stock rom with sp flash tool but the download only option was not working then i try to flash with format all + download and it did worked and the error started showing up. can i bypass that error "nv data is corrupted" and boot into system?
Click to expand...
Click to collapse
If you flash the wrong stock ROM (for example, evergreen rom → evergo rom) with SP TOOL and get "nv data is corrupted", it is highly likely that you can fix it by flashing the original ROM.
However, your case is different.
format all + download is a taboo setting.
I think the unique IMEI information was also erased.
Since it is a new problem apart from the bootloader lock problem, recovery is very difficult.
This is a problem beyond my knowledge
I'm sorry.
kousuke5555 said:
If you flash the wrong stock ROM (for example, evergreen rom → evergo rom) with SP TOOL and get "nv data is corrupted", it is highly likely that you can fix it by flashing the original ROM.
However, your case is different.
format all + download is a taboo setting.
I think the unique IMEI information was also erased.
Since it is a new problem apart from the bootloader lock problem, recovery is very difficult.
This is a problem beyond my knowledge
I'm sorry.
Click to expand...
Click to collapse
thanks.....!
but I think I got the solution
For those looking at this thread.
Just in case, I'll mention it below.
This article is about "arraki's" TWRP and orangefox.
Information is old.
there's a new TWRP, so any troubles or questions should be resolved in that TWRP thread.
Thank you

Categories

Resources