How can I keep MIUI from overwrite TWRP with stock recovery after a ROM flash? - Xiaomi Mi Max 3 Questions & Answers

I'm on fw Global 9.6.6.0.
(Bought the phone 'bogus' unlocked with "fake" 9.6.4.0, bricked it while trying to restore chinese fw and re-lock bootloader using miflash - I'm not doing that again
brought it back to life using the steps from Omer919's thread - thanks Omer919 and Nijel8)
I deleted install-recovery.sh from system/bin using TWRP's file manager before first boot, but it still overwrites MIUI recovery.
It's not a huge deal because I guess I can always fastboot flash twrp before flashing any new ROM, but does anyone have a solution? Much appreciated!

You have to boot to twrp right after flashing.
Go to twrp official site, choose your device and follow exactly instruction to the end.
It wouldnt harm your device if you reboot it to twrp twice.

Thanks, I tried but it reverts to stock recovery. After flashing TWRP in fastboot, I either try Fastboot boot twrp.img or disconnect the cable and hold power and vol+.
Either way, it goes into TWRP, and I make it boot back into TWRP several times with no problem.
But as soon as I boot to System, it reverts to stock.
TWRP site gives me this info (but it didn't work):
Note many devices will replace your custom recovery automatically during first boot. To prevent this, use Google to find the proper key combo to enter recovery. After typing fastboot reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.

OMG I found it - Google really is a friend. All I had to do was install Magisk before booting to System.
Below are my exact steps, if that helps someone.
Preliminary:
Download Magisk 17.1 zip, place it on a USB flashdrive.
Install latest magiskmanager apk from Play store (or sideload it if not on the store)
1- In Fastboot:
fastboot flash recovery twrp.img
fastboot boot twrp.img (If all goes well, this boots to TWRP; if prompted for a code, hit cancel)
2- Disconnect the cable.
Reboot to recovery once more (just to make sure, this is probably redundant; hit cancel if prompted for a code)
3- Mount USB-OTG, connect your flashdrive.
Install Magisk.
During the installation, you'll see some red fail lines, but Magisk seems to work around the encryption, just be patient.
4-Reboot System. You're done! Launch MagiskManager. Device is rooted in the process, too. (Verify with a root checker app).
Power Off. Hit Power + volume Up - You should boot to TWRP.

thanks a million McNoob. I was lost, but due to your hints I managed to install Magisk

Hi i cant boot to twrp and it keeps reverting to stock recover..
already tried this "fastboot flash recovery twrp.img
fastboot boot twrp.img (If all goes well, this boots to TWRP; if prompted for a code, hit cancel) "
after sending the last command line the phone reboot but its just black screen.. i try to reboot the phone again and boot it to recovery but still stock recovery is preset.. thanks

Thanks man! It worked for me as well!

Lamantin001 said:
Thanks man! It worked for me as well!
Click to expand...
Click to collapse
How did it work for you

thanks but.... the twrp for nitrogen is corrupted apparently and nothing work

Related

URGENT TWRP switch back to stock recovery after reboot

I used this https://dl.twrp.me/oneplus3/twrp-3.0.2-0-oneplus3.img.html recovery to flash but after reboot to system and then to recovery it shows the stock recovery. Any help ?
That's quite normal. If you flash a stock rom without reinstalling twrp before rebooting system, you will lose twrp because stock rom will install stock recovery too . So, you have to install TWRP from adb by Fastboot again.
Enviado desde mi ONEPLUS A3003 mediante Tapatalk
samnaction said:
I used this https://dl.twrp.me/oneplus3/twrp-3.0.2-0-oneplus3.img.html recovery to flash but after reboot to system and then to recovery it shows the stock recovery. Any help ?
Click to expand...
Click to collapse
Honestly its not that urgent to be honest before you flashed the stock rom you should of read up on what was going to happen. Being knowledgeable about what you are doing is your biggest asset. Also its not that big of a deal reflash TWRP as mentioned and going forward do some reading before making moves
Also make sure the right stuff is checked off in your settings so that the stock recovery does not come back
if u can still boot into ur OS just download flashify and flash twrp via flashify, u can download twrp via flashify too
this is normal it happens from time to time
playya said:
Honestly its not that urgent to be honest before you flashed the stock rom you should of read up on what was going to happen. Being knowledgeable about what you are doing is your biggest asset. Also its not that big of a deal reflash TWRP as mentioned and going forward do some reading before making moves
Also make sure the right stuff is checked off in your settings so that the stock recovery does not come back
Click to expand...
Click to collapse
No it's not the issue I haven't flashed stock rom. I m flashing twrp for first time. Don't know what's the issue but it got fixed after I did factory reset and flashed twrp again
samnaction said:
No it's not the issue I haven't flashed stock rom. I m flashing twrp for first time. Don't know what's the issue but it got fixed after I did factory reset and flashed twrp again
Click to expand...
Click to collapse
did you follow these steps or did you just reboot directly into the OS
2. Flashing TWRP
Turn the phone off. Then boot it into fastboot mode by holding volume up + power.
Rename the recovery file that you downloaded above to recovery.img. *Make sure that you rename it to recovery.img NOT recovery.img.img* ,Make sure that this file is placed on the desktop.
Open a new command prompt on desktop and run the following commands:
Code:
fastboot flash recovery recovery.img
Once the flash has completed, Don't use the "Fastboot Reboot" Command Instead Unplug Your phone then Manually boot it into recovery by keeping Power + Volume Down button pressed.
In TWRP, select Reboot and then select System. Now your phone will boot into System and you have cleared Steps 2/3 . Grats.
playya said:
did you follow these steps or did you just reboot directly into the OS
2. Flashing TWRP
Turn the phone off. Then boot it into fastboot mode by holding volume up + power.
Rename the recovery file that you downloaded above to recovery.img. *Make sure that you rename it to recovery.img NOT recovery.img.img* ,Make sure that this file is placed on the desktop.
Open a new command prompt on desktop and run the following commands:
Code:
fastboot flash recovery recovery.img
Once the flash has completed, Don't use the "Fastboot Reboot" Command Instead Unplug Your phone then Manually boot it into recovery by keeping Power + Volume Down button pressed.
In TWRP, select Reboot and then select System. Now your phone will boot into System and you have cleared Steps 2/3 . Grats.
Click to expand...
Click to collapse
Yes I did. Don't know why it didn't work first time. Everything fine after factory resetting again

TWRP, how to make it work?

Hello!
I unlock the bootloader, installed TWRP (several versions) but it doesn't work.
I enter in recovery, select YES in both options, the green android shows up and the phone just boot normally. TWRP options never displayed.
Any help on this? Plz...
Thank you!
Download: https://dl.twrp.me/h815/
1. fastboot boot recovery your_recovery_image.img
2. flash twrp image from booted twrp
Or fastboot flash recovery twrp.img
No ! This doesnt work. Read the official twrp xda thread.
Hi!
I tried all that, flashed all TWRP versions, all available versions of european rom for LG G4 H815, nothibg... the damn thing just don't work on my phone
Have you followed the right steps?
First use fastboot boot twrp.img (boot not flash)
Then within twrp copy the twrp image from your pc by adb or mtp then use the button to flash an image and then choose the copied twrp to flash to recovery
Now I think you got me... I followed the tutorial how to install twrp but, in the beggining I was having problems with the drivers. Win10 was changing them on every command, and after so much time (I went to sleep at 5 AM ) trying everything that it could work, maybe I just mess on that step....
Thanks for your help. As soon as I have time again, I'll check that step.
Thank you very much @steadfasterX !!!
It works
I followed this tutorial: http://www.technobuzz.net/install-twrp-recovery-on-lg-g4/
Thats why I got mistaken... Thanks once again
First use fastboot boot twrp.img (boot not flash)
Then within twrp copy the twrp image from your pc by adb or mtp then use the button to flash an image and then choose the copied twrp to flash to recovery
Click to expand...
Click to collapse
You're welcome

TWRP not persistent

Hi guys,
I've just updated to newest OOS firmware wich is 5.1.2 and I'm facing a weird problem.
Every time I flash codeworks TWRP and reboot to system, the next time i try to boot to recovery it boots to the original recovery.
It's like when I flash TWRP it doesn't remain persistent. When i flash it through fastboot and straightly boot from fastboot to recoverry I succeed to get in TWRP but as soon as I reboot to system and try to boot to recovery I reach the original OnePlus recovery.
Is anyone facing the same problem ?
And also do you have any idea about what i could do to solve this problem ?
Thanks in advance for your answers !
If you don't have root or custom kernel its normal, plus you should use blu spark's twrp, its newer and more reliable.
Adnan008 said:
If you don't have root or custom kernel its normal, plus you should use blu spark's twrp, its newer and more reliable.
Click to expand...
Click to collapse
Indeed, I just needed to flash magisk to get it persistent. I'll try blu spark's one as you suggested.
Thank you very much for your answer !
Cheers !
Nothing to do with recoveries or kernel. After you do the fastboot flash recovery TWRP in fastboot, do this: "fastboot boot TWRP". I believe that's the right command. Basically after you flash it, manually boot to recovery through fastboot one time. After that it'll work from inside the phone or with the button combination with the phone off.
Jesus people are lazy these days.
First off there are official twrp versions for a reason!
Download the latest version: https://dl.twrp.me/dumpling/
Reboot into flash boot with the following command from your rom: adb reboot bootloader
With phone in fastboot mode: fastboot flash recovery 'twrp.img'
(You don't need to type out the entire file path you can just drag the file into the terminal and it'll insert the file location)
The reason you're not getting back into that recovery is because you're not booting into the recovery before you reboot into your ROM.
There is an option to boot straight into the recovery from the fastboot mode
pinnekeshaar said:
Jesus people are lazy these days.
First off there are official twrp versions for a reason!
Download the latest version: https://dl.twrp.me/dumpling/
Reboot into flash boot with the following command from your rom: adb reboot bootloader
With phone in fastboot mode: fastboot flash recovery 'twrp.img'
(You don't need to type out the entire file path you can just drag the file into the terminal and it'll insert the file location)
The reason you're not getting back into that recovery is because you're not booting into the recovery before you reboot into your ROM.
There is an option to boot straight into the recovery from the fastboot mode
Click to expand...
Click to collapse
Actually not that lazy because I used to do what you mentionned.
The thing is that a flash of Magik is needed to patch twrp. That's the step I forgot in the procedure and explained here.
So before being unpleasant, please know what you're talking about...
Cheers !

TWRP help needed

I unlocked my Nexus 7, though after a TWRP install when selecting recovery mode it stays stuck on the Google logo as if there’s no TWRP; though the command prompt said install was successful.
Any help?
mendelmusic said:
I unlocked my Nexus 7, though after a TWRP install when selecting recovery mode it stays stuck on the Google logo as if there’s no TWRP; though the command prompt said install was successful. Any help?
Click to expand...
Click to collapse
It may be incorrect sequence of steps, note:
"many devices will replace your custom recovery automatically during first boot. To prevent this, use Google to find the proper key combo to enter recovery. After typing fastboot reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install."
Try this:
Restock
run Android once
flash TWRP
immediately and directly boot TWRP
Will try that!

Wiped everything using TWRP and need help restoring.

Hi.
So I was messing around with the twrp custom recovery and (without thinking much of it) wiped everything in the advanced wipe menu :crying: (System, data, EVERYTHING)
I knew I had removed my OS and that I could just use the twrp recovery to install a new rom onto my phone BUT little did I know, when I tried to boot into the custom recovery, it would just loop the screen with the redmi logo
I am still able to boot into fastboot mode, and I have tried to flash the same twrp recovery but with no avail (It still loops the redmi logo screen)
So now I'm here to ask if there is any advice that you could give me to try and fix this problem that I have gotten myself in (I am not worried about deleting any of my personal files. I would just like to get twrp to boot so that I can install another rom)
Thanks in advance to anyone who can help me with this problem :highfive:
Hi, which rom are you trying to install? for android 9 use this recovery https://forum.xda-developers.com/re...overy-unofficial-twrp-recovery-redmi-t4002397, for android 10 this one... https://forum.xda-developers.com/showpost.php?p=82062075&postcount=7...
If what nuvulet said doesn't work, in fastboot, flash the exact same stock ROM you had before, let it boot and then flash TWRP.
nuvulet said:
Hi, which rom are you trying to install? for android 9 use this recovery https://forum.xda-developers.com/re...overy-unofficial-twrp-recovery-redmi-t4002397, for android 10 this one... https://forum.xda-developers.com/showpost.php?p=82062075&postcount=7...
Click to expand...
Click to collapse
Hi, thanks for the fast reply.
The stock android I had before I wiped everything was android 9, MIUI 11. I tried againt to flash the recovery through fast boot but (like before) when I try to boot into the recovery (by holding the volume up button as it reboots), the redmi logo keeps appearing and disappearing and doesn't go to the twrp recovery. At the current moment I don't have any OS installed (since it got deleted when I wiped everything)
Any other leads I could try?
wang1chung said:
If what nuvulet said doesn't work, in fastboot, flash the exact same stock ROM you had before, let it boot and then flash TWRP.
Click to expand...
Click to collapse
I'm not sure how I can flash the stock ROM without the twrp recovery. I had the impression that you needed twrp recovery in order to install ROMs in the first place.
If there is a method to flash a ROM using fastboot, please explain since my unexperienced self has no idea how to do this. :laugh:
Thanks for the fast reply too
Sqorpz said:
I'm not sure how I can flash the stock ROM without the twrp recovery. I had the impression that you needed twrp recovery in order to install ROMs in the first place.
If there is a method to flash a ROM using fastboot, please explain since my unexperienced self has no idea how to do this. :laugh:
Thanks for the fast reply too
Click to expand...
Click to collapse
MiFlash works through fastboot mode. It's also safer to flash with MiFlash, just make sure you have the correct ROM.
I can't find the guide right now, I'm at work
Ok, do you know adb fastboot... if not, follow this guide...
https://forum.xda-developers.com/showthread.php?t=2317790
Install usb adb drivers for RN8P if you don't have, try this for w10...
https://forum.xda-developers.com/redmi-note-8-pro/help/usb-drivers-t4035617
Download twrp for android 9 or android 10 from here...
https://forum.xda-developers.com/showpost.php?p=82115341&postcount=2
Put the recovery (*.img format) into installed adb folder...
Open cmd and navigate to inside adb folder...
Put the phone into fastboot mode (press volume- and power) connect usb and type in console...
adb devices (this start adb server)
Type...
fastboot devices (this return a device number, if not, something is wrong)
Type...
fastboot flash recovery *.img (change * for the name of the recovery file)
Disconnect the phone and press volume+ and power at the same time and now you have twrp intalled...
When start if the data is encrypted, push cancel, go to wipe, go to format data, type "yes", and confirm slide...
Now connect the phone to usb (if not recognize the phone, go to mount, and enable MTP)
Copy the rom in to internal storage for your android twrp version... search here
https://forum.xda-developers.com/redmi-note-8-pro/how-to/redmi-note-8-pro-android-10-public-t4072795
You have several versions... for eu, search in my post...
And the rest, install, select, etc. etc....
nuvulet said:
Ok, do you know adb fastboot... if not, follow this guide...
https://forum.xda-developers.com/showthread.php?t=2317790
Install usb adb drivers for RN8P if you don't have, try this for w10...
https://forum.xda-developers.com/redmi-note-8-pro/help/usb-drivers-t4035617
Download twrp for android 9 or android 10 from here...
https://forum.xda-developers.com/showpost.php?p=82115341&postcount=2
Put the recovery (*.img format) into installed adb folder...
Open cmd and navigate to inside adb folder...
Put the phone into fastboot mode (press volume- and power) connect usb and type in console...
adb devices (this start adb server)
Type...
fastboot devices (this return a device number, if not, something is wrong)
Type...
fastboot flash recovery *.img (change * for the name of the recovery file)
Disconnect the phone and press volume+ and power at the same time and now you have twrp intalled...
When start if the data is encrypted, push cancel, go to wipe, go to format data, type "yes", and confirm slide...
Now connect the phone to usb (if not recognize the phone, go to mount, and enable MTP)
Copy the rom in to internal storage for your android twrp version... search here
https://forum.xda-developers.com/redmi-note-8-pro/how-to/redmi-note-8-pro-android-10-public-t4072795
You have several versions... for eu, search in my post...
And the rest, install, select, etc. etc....
Click to expand...
Click to collapse
Yes, this is the method I used to flash the twrp recovery.
My problem was that even after installing it (using this method), i would still not be able to boot into the recovery.
However, it is fixed now. I used the Mi Flash tool in order to install the stock rom and then installed twrp after that. :good:
wang1chung said:
MiFlash works through fastboot mode. It's also safer to flash with MiFlash, just make sure you have the correct ROM.
I can't find the guide right now, I'm at work
Click to expand...
Click to collapse
I tried this method and IT WORKED!!
After installing Mi flash I was able to download the stock rom and install it through the program without any errors.
I was then able to finally boot into the OS and install twrp recovery, then install the custom rom! :laugh:
Thanks for this method. I would probably still be stuck on the Redmi logo if it weren't for this

Categories

Resources