• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to stop Stock ROM overwriting the Custom Recovery?

tanmaybexe

Newbie
Mar 4, 2020
14
6
I was trying to flash a Custom Recovery(TWRP) on my Friend's phone(Realme 3) It was officialy supported by TWRP and was listed on their website so I downloaded the Custom Recovery. Then I unlocked the bootloader of his phone but yes a strange thing happened there after it asked for pressing the volume button to be pressed it unlocked the bootloader but after that there was option "Select boot type". It had three options Boot to Bootloader, Boot to recovery and last Normal boot and also there was a arrow on the bootloader option. And there were some instructions something like volume up for select and volume down to move. But I tried every button but the arrow was stuck on the bootloader option. So I connected it to my device and used the "fastboot reboot" command to restart the device after restarting at the realme logo it was saying "You are unlocked you cannot be trusted" Butafter it booted normally and the phone was Factory Reset. After this in the Developer options the OEM unlocking was grayed out saying Bootloader is unlocked. Ok so we were successful in unlocking the bootloader. After that I pasted the twrp img file in the platform tools directory and put the command adb reboot bootloader and after the device was in bootloader I used the command fastboot flash recovery name.img to flash the recovery. It said sending and then writing in my terminal after that I used the command fastboot reboot and the the key combinations(power+volume down) for the device which used to get into recovery for that phone but this time instead of going into recovery it was in the bootloader. So again I tried fastboot reboot command and this pressing the power+volume up but the phone booted normally so this time I tries adb reboot recovery but it booted into stock recovery so again I tried flashing the recovery and tried using fastboot reboot recovery but it didn't work. And yes I know that after flashing the custom recovery the phone should first boot into the recovery but as I said neither the key combinations nor the fastboot reboot recovery command so what can I do to prevent the system from overwriting? PS: Sorry for long paragraph...
 
  • Like
Reactions: MrJavi
Upvote 0
i would have done my research first before attempting anything to my phone.
.......so for all things rooting head over to xda developers

here is the guide i would use:
https://forum.xda-developers.com/realme-3/development/screen-doesnt-twrp-realme-3-t3944022

please read it before attempting to root your phone. if you have the time, i would read all of the posts within that thread. and if you have any questions, please feel free to ask it here in this forum.
Ok Thanks, now I need to call my friend to try it out....
Thanks Again @ocnbrze
 
  • Like
Reactions: ocnbrze
Upvote 0
Hmm, well it sounds like the bootloader is unlocked and the fastboot command appears to have worked. However, there are clearly some quirks to this device (being unable to boot to recovery using the key combination after unlocking is something I've not met on other devices, but seems to be a feature of this device).

So the obvious missing thing is the additional step in the thread that @ocnbrze linked: the dm_verity disabling. There are anyway other instructions in that thread that look important to take note of (especially the one about not relocking the bootloader, but also the two fastboot commands needed to get into recovery. This all seems much fussier than I'm used to). That thread is also clear that you need the latest adb/fastboot for this device. So I'd try following that guide step-by-step (but read the whole post first).
 
  • Like
Reactions: ocnbrze
Upvote 0
Hmm, well it sounds like the bootloader is unlocked and the fastboot command appears to have worked. However, there are clearly some quirks to this device (being unable to boot to recovery using the key combination after unlocking is something I've not met on other devices, but seems to be a feature of this device).

So the obvious missing thing is the additional step in the thread that @ocnbrze linked: the dm_verity disabling. There are anyway other instructions in that thread that look important to take note of (especially the one about not relocking the bootloader, but also the two fastboot commands needed to get into recovery. This all seems much fussier than I'm used to). That thread is also clear that you need the latest adb/fastboot for this device. So I'd try following that guide step-by-step (but read the whole post first).
Actually I followed all the steps from the thread given by @ocnbrze as said in that forum after flashing the twrp recovery I used the fastboot oem reboot-recovery command and the phone restarted but a few seconds after the Realme logo appeared the screen was blank...
Still as said in the guide I waited for more than 2 minutes(5 mins) for the twrp to load but it didn't load up only the blank screen and during this time the phone was still connected to my Kali so I tried the adb devices command and it listed out my device number and it was showing Recovery in front of it so as you said I was not able to install the dm_verity .zip file as twrp didn't boot up and then I use adb reboot command to start my device...
I even tried the Orange Recovery but it showed the same blank screen and here the different thing was the same adb and fastboot command didn't work here in fact the adb devices and fastboot devices command didn't even list out my device...
Now I needed to start my device so I tried random combinations and finally the volume up+power key combination worked
I used the "adb version" command on my Kali and it gave me this output:

Android Debug Bridge version 1.0.39
Version 1:8.1.0+r23-5
Installed as /usr/lib/android-sdk/platform-tools/adb

Is this the latest version?

But still I am not able to flash the recovery on my device...
And after the device booted up I used the adb reboot recovery command and again the same Realme Stock Recovery started up....
 
Last edited:
Upvote 0
you need to type "fastboot -w" first, then type "fastboot oem reboot-recovery" as stated in step 3 of the guide.
I used the fastboot -w command to wipe userdata but it gave some errror(i dont re
member what exactly it was) but it didnt succeeded because it did not match to some outputs on the forum to whom it succeeded.
And I ignored that thinking how will wiping userdata affect flashing the recovery...
Cause I have done it on one of older phone and I didnt wipe the userdata for that ..
 
Upvote 0
I used the fastboot -w command to wipe userdata but it gave some errror(i dont re
member what exactly it was) but it didnt succeeded because it did not match to some outputs on the forum to whom it succeeded.
And I ignored that thinking how will wiping userdata affect flashing the recovery...
Cause I have done it on one of older phone and I didnt wipe the userdata for that ..
well that is a very important step. without that step i'm not surprised you are having issues. never skip a step when rooting. every step is in the guide for a reason. skipping something could brick a phone. if you run into a problem stop right there and try and troubleshoot before moving to the next step.

is there any way you can either get a screen shot of the commands you entered and its error(s)?
 
Upvote 0
well that is a very important step. without that step i'm not surprised you are having issues. never skip a step when rooting. every step is in the guide for a reason. skipping something could brick a phone. if you run into a problem stop right there and try and troubleshoot before moving to the next step.

is there any way you can either get a screen shot of the commands you entered and its error(s)?
Unfortunately No bcoz my friend lives far away from me and he is coming at my home since last 2 days and now can't manage to come again....
Ok but wiping userdata with fastboot -w will wipe that partition only how can it affect flashing the recovery...
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones