When Android Keep Booting Into TWRP Recovery

Nick216ohio

Senior Member
Sep 8, 2014
892
174
0
Thousands of android users having this problem, when you install custom ROM and then you try to reset your phone; it keep rebooting into TWRP recovery (not system), even after you flash your ROM again.

So here's the solution:
Seems to happen a lot with people. Could others chime in on this solution?

Sent from my LGE LG-H830 using XDA Labs
 
  • Like
Reactions: OldHemp

OldHemp

Member
May 21, 2017
21
6
0
Seems to happen a lot with people. Could others chime in on this solution?
I got my phone less than 24 hrs ago and have dealt with this the entire time. Not only do I get stuck in recovery but when I do use the terminal code to get out of it, I get stuck in reboots after any ROM installation. I have seen many users having both issues and find it hard to believe there hasn't been some kind of fix. I know not all are caused by the same thing but many I'm sure are.
 

4r44444

Senior Member
Jul 13, 2014
763
202
73
Boot to TWRP recovery, open Terminal inside TWRP and type:

dd if=/dev/zero of=/dev/block/platform/soc/624000.ufshc/by-name/misc
dd if=/dev/zero of=/dev/block/platform/soc/624000.ufshc/by-name/fota


Than reboot.

(May in rare causes loose TWRP but u will get out loop - be patient takes sometimes 7 Minutes+ for boot up the ROM)



Worked for me.

Actually, you shouldn't use the above commands unless the following command doesn't work. That used to be the recommended method of getting out of TWRP, but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for). But anyways try to use the following to get out of TWRP bootloops:

Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
 
Last edited:

jeffsga88

Senior Member
Jan 5, 2016
835
655
113
Boot to TWRP recovery, open Terminal inside TWRP and type:

dd if=/dev/zero of=/dev/block/platform/soc/624000.ufshc/by-name/misc
dd if=/dev/zero of=/dev/block/platform/soc/624000.ufshc/by-name/fota


Than reboot.

(May in rare causes loose TWRP but u will get out loop - be patient takes sometimes 7 Minutes+ for boot up the ROM)

Worked for me.
Actually, you shouldn't use the above commands unless the following command doesn't work. That used to be the recommended method of getting out of TWRP, but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for). But anyways try to use the following to get out of TWRP bootloops:

Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
 

Ducter

Senior Member
Jan 10, 2009
1,888
1,225
143
Actually, you shouldn't use the above commands unless the following command doesn't work. That used to be the recommended method of getting out of TWRP, but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for). But anyways try to use the following to get out of TWRP bootloops:

Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Worked for me as well, funny thing was I almost didn't search thoroughly and was going to enter the other commands.
 
  • Like
Reactions: YotamJo and RJamesS

p0lle

Member
Sep 30, 2016
8
0
0
Actually, you shouldn't use the above commands unless the following command doesn't work. That used to be the recommended method of getting out of TWRP, but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for). But anyways try to use the following to get out of TWRP bootloops:

Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
I got in that Bootloop by doing a Factory Reset with Root and TWRP. Formatting and Flashing the LG-H85020D-Flashable.COMPLETE.zip just ended in TWRP again.
Your Command fixed that issue!
 

Arkanius84

Member
Oct 22, 2014
8
0
0
Actually, you shouldn't use the above commands unless the following command doesn't work. That used to be the recommended method of getting out of TWRP, but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for). But anyways try to use the following to get out of TWRP bootloops:

Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
Thank you jeffsga88 your code worked! :)
 

nitkam

Member
Feb 11, 2018
7
1
0
recovering from dding into soc devices...

@4r44444 , @jeffsga88, Thanks for the guidance here. I could get out of the TWRP recovery boot loop with the dd dumps to soc devices. You have saved my phone from bricking. Cheers for your great help and guidance to the community !!!
@jeffsga88 Where is this guide for fixing the misc parition properly? ""but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for)""
 
  • Like
Reactions: 4r44444

Nimueh

Recognized Contributor
May 19, 2012
2,908
2,187
198
@jeffsga88 Where is this guide for fixing the misc parition properly? ""but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for)""
The permanent fix is in the same thread as the temporary one, specifically THIS post ;)
 

BahnStormer

Senior Member
Nov 4, 2012
84
14
0
London
@4r44444

@jeffsga88 Where is this guide for fixing the misc parition properly? ""but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for)""
Yeah - be careful with this - I did this and bricked mine - it went from unable to boot into Android to unable to boot fullstop... eventually managed to get it restored to factory (using LGUP), but MAC addresses all reset to 0's on every reboot - so now need to run macchanger on every boot...
 

thebst

Member
Feb 13, 2007
14
0
0
Actually, you shouldn't use the above commands unless the following command doesn't work. That used to be the recommended method of getting out of TWRP, but it was realized that using the first command wipes your misc partition and then you end up with a Mac address that changes in every reboot (there is a temp fix for this I have a guide for). But anyways try to use the following to get out of TWRP bootloops:

Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
I tried this command after flashing lineage rom on my Nexus 5x. After flashing the rom, you initially see the Lineage logo, but it never boots, it just goes on into recovery. I flashed the rom 2 times, but same effect. After this I tried the command up here from the terminal, but nothing changes. Every time I reboot, it just boots back into TWRP. What do I have to do if this command does not work? Anyone have an idea? I saw the other commands in this thread, but it seems like most people don't think it's wise to execute those, so i'm just asking to be sure.

I also tried restoring the original backup of the phone I made in the first place before flashing lineage, but that just ends up in a bootloop where I end up in a screen with the google logo and the unlock sign. I followed these instructions to the letter, but somehow the phone is now bricked.. https://wiki.lineageos.org/devices/bullhead/install
 
Last edited:

thebst

Member
Feb 13, 2007
14
0
0
So, no ideas here? I frantically tried getting the phone to boot into the bootloader, and after I don't know how many reboots it finally responded to my holding the vol down button, and got into the bootloader. From there I was able to flash back the entire phone to factory settings (I did not want to risk having to try over and over again to get it into the bootloader) and I'll keep it at that for now. I'm pretty experienced with custom roms on several Nexus 4, 5 and Galaxy Note II, but I've never had anything like this after flashing a rom.
 

mark_mcmurphy

New member
Aug 31, 2015
4
2
0
Worked like magic the first time around. Thank you so much your your skills and sharing it :)

Code:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/misc bs=256 count=1 conv=notrunc
[/QUOTE]
 

BlueFlame4

Retired Recognized Developer
Mar 10, 2011
1,864
4,398
0
29
Dresden, Germany
FYI: If you run into these problems when using a MediaTek powered device, replace the of= path with

Code:
/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/para

Enjoy!
 
Last edited:
  • Like
Reactions: YotamJo