[GUIDE] Fix TWRP Recovery Script Loop & Unable to boot

Search This thread

Im_Mattgame

Senior Member
Oct 3, 2015
202
63
Hello! :)

This is actually a common "thing" across many devices so just because this thread is on the Oneplus 5 forum doesn't mean it won't work for your device!

So I know exactly what you're going through....

THE PROBLEM
You've flashed a Zip file, everything seemed to work fine, you pressed the reboot button.... But then... Black screen, blue LED (or something like that)....
You then try to reboot to recovery and then you see "Running Open Recovery Script" and you manage to decipher "Wiping Data", either you clean flashed your ZIP file and this is not a problem or you dirty flashed it and so you're screaming at your phone because it just wiped everything without you asking (I mean, this never happened to me or anything I'm just trying to imagine what it would look like :crying:)

You then try a few things but you're phone won't even get close to the Bootanimation and keeps trying to boot up into recovery and keeps on Wiping your data which is now non-existent.

THE FIX :fingers-crossed:

Method 1/
This is the most convenient and easiest method but it might not work for you, I'm not even entirely sure how I made it work for me... Anyway:

Once the phone has booted up into recovery and is flashing the ZIP, try the following:

WILL UPDATE AS SOON AS I FIND THE EXACT METHOD
-Taking a screenshot (Power+volume)
-Pressing the back, home and récents button as many times as you can
-Pressing the power button
Basically, for now until I'm certain on what gets you out of this script thing, press every button on the phone a few times (that's what I did)


Method 2 [FAILSAFE]/
This method will work no matter what (if your problem is the one this thread covers that is), but it's quite teedious!

Step1/ Boot into the Bootloader (Power+Volume up)

Step2/ Install ADB & Fastboot on your PC (Google)

Step3/Download Stock recovery & TWRP

Step 4/Move both files to the ADB folder for ease of access

Step5/Type in
Code:
fastboot flash recovery STOCK_RECOVERY.img
(change file name)

Step 6/Boot into this new recovery

Step 7/ Ponder for a minute at how useless it is

Step 8/Boot into Bootloader again

Step 9/Type into terminal
Code:
fastboot flash recovery TWRP_RECOVERY.img
(change file name)

Step 10/Boot into recovery and wipe everything except Internal storage

Step 11/Flash ROM again!

VOILA! :fingers-crossed:


Hope it helped, if you have any questions, feel free to ask me!
Cheers, Matt
 
  • Like
Reactions: abishek123

dragynbane222

Senior Member
Jul 2, 2012
228
102
Google Pixel 4 XL
Google Pixel 5
I had this issue when I was flashing various roms, in my case it ended up being that some of the roms were incompatible with data being formatted as ext4 (mainly oos based ones, but a few others as well) since I went full f2fs, haven't seen this issue. That might be something to consider adding, it's pretty destructive, though, as going with f2fs on /data formats /sdcard, too
 

R0iZ

Senior Member
Apr 16, 2006
174
57
45
Россия!
www.4pda.ru
I had this issue when I was flashing various roms (xXx NoLimits, ExperienceOS) on the encrypted data partition. Only FreedomOS flashing and booting ok
 

Im_Mattgame

Senior Member
Oct 3, 2015
202
63
I had this issue when I was flashing various roms, in my case it ended up being that some of the roms were incompatible with data being formatted as ext4 (mainly oos based ones, but a few others as well) since I went full f2fs, haven't seen this issue. That might be something to consider adding, it's pretty destructive, though, as going with f2fs on /data formats /sdcard, too

Ahh, that's interesting
 

Im_Mattgame

Senior Member
Oct 3, 2015
202
63
I had this issue when I was flashing various roms (xXx NoLimits, ExperienceOS) on the encrypted data partition. Only FreedomOS flashing and booting ok

I had it on my old phone once (Oneplus X) so it's not rom/device specific... And I don't think it's a bug, more a compatibility issue...
 

Fyzik753

New member
Dec 5, 2017
1
0
first method doesnt work for me (and i have not expecting it to work)
second method should work but i have a little problem, i cant boot into bootloader
can someone help me with this

phone: Doogee X5
 

aoprea

Senior Member
Nov 20, 2007
411
225
Iasi
i have a problem with instaling twrp ...
example:
phone have bootloader unlocked

flashing original 4.5.14 firmware .... all good ... boot phone ... settings ... done
reboot to bootloader ... flash twrp (or blu_spark twrp) ... done ... reboot to twrp .. all good
reboot to system ... done. poweroff (or restart)...
boot to recovery ... surprise ... original recovery ... not twrp

flash again twrp ... done ... boot to system ... reboot to recovery ... original recovery ....


saw .. what is going on ?

thanks
 

iamelton

Senior Member
Feb 10, 2011
1,825
1,466
Hong Kong
OnePlus Nord
i have a problem with instaling twrp ...
example:
phone have bootloader unlocked

flashing original 4.5.14 firmware .... all good ... boot phone ... settings ... done
reboot to bootloader ... flash twrp (or blu_spark twrp) ... done ... reboot to twrp .. all good
reboot to system ... done. poweroff (or restart)...
boot to recovery ... surprise ... original recovery ... not twrp

flash again twrp ... done ... boot to system ... reboot to recovery ... original recovery ....


saw .. what is going on ?

thanks

OxygenOS overwrites the recovery with stock one when you boot into the OS..
to avoid this, after flashing twrp, (without rebooting to system) flash SuperSU or Magisk immediately..
 

aoprea

Senior Member
Nov 20, 2007
411
225
Iasi
OxygenOS overwrites the recovery with stock one when you boot into the OS..
to avoid this, after flashing twrp, (without rebooting to system) flash SuperSU or Magisk immediately..

thanks ... solved with install magisk

ps. I was accustomed with samsung phones where this does not happen...
 

zauberwild

New member
Sep 21, 2019
4
2
Hi, I hope there's somebody who can help me with this.
I think, method could help me, but when I try to flash the recovery, I get this message:

Code:
target reported max download size of 535822336 bytes
sending 'recovery' (27525 KB)...
OKAY [  0.914s]
writing 'recovery'...
(bootloader) Image size exeeded partition limits
(bootloader) Preflash validation failed
FAILED (remote failure)
finished. total time: 0.954s

Any Ideas to solve this?
 

safouen

New member
Sep 28, 2019
1
0
OxygenOS overwrites the recovery with stock one when you boot into the OS..
to avoid this, after flashing twrp, (without rebooting to system) flash SuperSU or Magisk immediately..

i have op5
i don't know what should i do - i install magisk and twrp - is it in the twrp i do that i wipe and i flash rom
but i find the some problem open and after boot i don't found the twrp and my recovery return to official recov

please help
my phone without root is worthless
 

abishek123

New member
May 30, 2021
1
0
Hello! :)

This is actually a common "thing" across many devices so just because this thread is on the Oneplus 5 forum doesn't mean it won't work for your device!

So I know exactly what you're going through....

THE PROBLEM
You've flashed a Zip file, everything seemed to work fine, you pressed the reboot button.... But then... Black screen, blue LED (or something like that)....
You then try to reboot to recovery and then you see "Running Open Recovery Script" and you manage to decipher "Wiping Data", either you clean flashed your ZIP file and this is not a problem or you dirty flashed it and so you're screaming at your phone because it just wiped everything without you asking (I mean, this never happened to me or anything I'm just trying to imagine what it would look like :crying:)

You then try a few things but you're phone won't even get close to the Bootanimation and keeps trying to boot up into recovery and keeps on Wiping your data which is now non-existent.

THE FIX :fingers-crossed:

Method 1/
This is the most convenient and easiest method but it might not work for you, I'm not even entirely sure how I made it work for me... Anyway:

Once the phone has booted up into recovery and is flashing the ZIP, try the following:




Method 2 [FAILSAFE]/
This method will work no matter what (if your problem is the one this thread covers that is), but it's quite teedious!

Step1/ Boot into the Bootloader (Power+Volume up)

Step2/ Install ADB & Fastboot on your PC (Google)

Step3/Download Stock recovery & TWRP

Step 4/Move both files to the ADB folder for ease of access

Step5/Type in
Code:
fastboot flash recovery STOCK_RECOVERY.img
(change file name)

Step 6/Boot into this new recovery

Step 7/ Ponder for a minute at how useless it is

Step 8/Boot into Bootloader again

Step 9/Type into terminal
Code:
fastboot flash recovery TWRP_RECOVERY.img
(change file name)

Step 10/Boot into recovery and wipe everything except Internal storage

Step 11/Flash ROM again!

VOILA! :fingers-crossed:


Hope it helped, if you have any questions, feel free to ask me!
Cheers, Matt
You saved me bro my life is your from now thankyou love u♥
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hello! :)

    This is actually a common "thing" across many devices so just because this thread is on the Oneplus 5 forum doesn't mean it won't work for your device!

    So I know exactly what you're going through....

    THE PROBLEM
    You've flashed a Zip file, everything seemed to work fine, you pressed the reboot button.... But then... Black screen, blue LED (or something like that)....
    You then try to reboot to recovery and then you see "Running Open Recovery Script" and you manage to decipher "Wiping Data", either you clean flashed your ZIP file and this is not a problem or you dirty flashed it and so you're screaming at your phone because it just wiped everything without you asking (I mean, this never happened to me or anything I'm just trying to imagine what it would look like :crying:)

    You then try a few things but you're phone won't even get close to the Bootanimation and keeps trying to boot up into recovery and keeps on Wiping your data which is now non-existent.

    THE FIX :fingers-crossed:

    Method 1/
    This is the most convenient and easiest method but it might not work for you, I'm not even entirely sure how I made it work for me... Anyway:

    Once the phone has booted up into recovery and is flashing the ZIP, try the following:

    WILL UPDATE AS SOON AS I FIND THE EXACT METHOD
    -Taking a screenshot (Power+volume)
    -Pressing the back, home and récents button as many times as you can
    -Pressing the power button
    Basically, for now until I'm certain on what gets you out of this script thing, press every button on the phone a few times (that's what I did)


    Method 2 [FAILSAFE]/
    This method will work no matter what (if your problem is the one this thread covers that is), but it's quite teedious!

    Step1/ Boot into the Bootloader (Power+Volume up)

    Step2/ Install ADB & Fastboot on your PC (Google)

    Step3/Download Stock recovery & TWRP

    Step 4/Move both files to the ADB folder for ease of access

    Step5/Type in
    Code:
    fastboot flash recovery STOCK_RECOVERY.img
    (change file name)

    Step 6/Boot into this new recovery

    Step 7/ Ponder for a minute at how useless it is

    Step 8/Boot into Bootloader again

    Step 9/Type into terminal
    Code:
    fastboot flash recovery TWRP_RECOVERY.img
    (change file name)

    Step 10/Boot into recovery and wipe everything except Internal storage

    Step 11/Flash ROM again!

    VOILA! :fingers-crossed:


    Hope it helped, if you have any questions, feel free to ask me!
    Cheers, Matt