Getting a mistake when I try to flash the recovery via fastboot on my Nexus 4 - General Questions and Answers

Hey. I just flashed a stock rom and re-locked the bootloader, in order to unlock it, get twrp, get a custom rom (likely lineage) and root with magisk (it seems better than superSU, no?) without any toolkit, because i want to get some knowledge about android.
I downloaded adb and fastboot, enabled USB debugging, booted my nexus 4 on bootloader mode, and I used 3 commands after opening the command prompt from the folder containing fastboot. I also downloaded the latest img of TWRP for nexus 4 and renamed it "twrp" and put it on the folder.
The 3 commands I used are : "fastboot OEM unlock", "fastboot erase recovery", "fastboot flash recovery twrp.img"
But when the phone tries to boot the recovery, I get this : puu.sh/wWTjC/6cf11a9a32.jpg
and it doesnt work ofc.
Furthermore, I can't boot the ROM, I can only boot the recovery and the bootloader. When I try to boot the Rom, i get the recovery.
can someone help me please?
thanks

Hello,
The problem is that the recovery is unable to mount the /data partition, what you need to do is repair it by the following steps
1.Go to TWRP main screen
2.Press wipe
3.press advanced wipe
4.tick data
5.press repair and change file system
6.press repair
7.wipe the arrow
NOTE: this will format the data partition
now reboot to recovery again and check if the problem is fixed

Hello, the problem is I cant reach the main menu of TWRP, after getting what I screened, my phone reboots on TWRP again, and again...
I also tried the command "fastboot boot twrp.img" and i get the same result.

where did you get the twrp from ?
i would in such case as twrp is having troubles first try to find a working version of it, and it it didn't work i would reflash to stock stock and start from scratch

I got twrp there : dl.twrp.me/mako/
i took the latest version.

Get the cwm recovery for your device, wipe data , then try reflashing the twrp recovery

It's ok, thanks

nublord said:
It's ok, thanks
Click to expand...
Click to collapse
did that help ? hopefully?

hmm, I thought it did, but i actually get the same problem, and I can't launch neither cwm nor twrp..

Once yo reinstall twrp
Go to wipe the format data to remove encryption
You can also use cwm to flash the ROM

Related

Booting only takes me to TWRP

So, I went through the temp root/S-off routine with WeakSauce and Firewater. Then flashed TWRP over adb. Rebooted to TWRP which asked if I wanted to install SuperSU. I said yes. Rebooted again and came back up in TWRP. Cannot boot to system. Rebooting always takes me back to recovery. Help would be much appreciated!
Oh, and I can also boot to the bootloader, if that helps.
Can you load a rom to the internal memory or on the SD card and then flash and install a new rom?
Same Here
droidmark said:
So, I went through the temp root/S-off routine with WeakSauce and Firewater. Then flashed TWRP over adb. Rebooted to TWRP which asked if I wanted to install SuperSU. I said yes. Rebooted again and came back up in TWRP. Cannot boot to system. Rebooting always takes me back to recovery. Help would be much appreciated!
Oh, and I can also boot to the bootloader, if that helps.
Click to expand...
Click to collapse
Hey man the same thing happened to me last night, i thought i bricked my phone. I personally dont think the adb method of getting twrp onto the phone is working right now. If someone knows what we are doing wrong plz let us know.
Here is how i fixed it:
1. Put phone into bootloader, put it on fastboot, plug it into computer. You will see it change to "fastboot usb"
2. Download and do this http://forum.xda-developers.com/showthread.php?t=2708686 . To do this go back to your console (terminal or cmd), navigate back to the folder with adb in it, and instead of running the adb commands just type in " fastboot flash boot M8VZWbootInsecure.img ". its easiest to put that boot img in the same folder as adb and fastboot. once that is done you just need to reboot the phone and you are golden.
3. Problem is, when you do this you can no longer get back to your recovery, you get a screen with a red triangle and exclamation mark. I thought I bricked my phone lol.
4. Doing a alternate soft reset will get the phone back to normal android ( hold down power and volume up for 10 secs)
5. to fix it complete use the flashboot method of copying over the recovery onto the phone as shown here http://teamw.in/project/twrp2/226 . This is essentially the same method as in step 2 its just copying over the twrp.img into the recovery section of the phone.
By doing this I was able to get TWRP to work and be able to boot normally to system. Hope this helps.
I think the command you run has something to do with it. "Fastboot flash boot nameofrecovery.img"
Almost certain the command has to be "fastboot flash nameofrecovery.img"
Sent from my HTC6525LVW using Tapatalk
edited to fix all my auto-correct typing mistakes.
The Stig 04 said:
I think the command you run has something to do with it. "Fastboot flash boot nameofrecovery.img"
Almost certain the command has to be "fastboot flash nameofrecovery.img"
Click to expand...
Click to collapse
My understanding is that there's two ways of getting into a custom recovery in adb:
1: "fastboot flash recovery nameofrecovery.img" this will flash over the previous recovery whatever that was. It will stick and you get into the new recovery either through hboot or a ROM's advanced power menu.
2: "fastboot boot nameofrecovery.img" this will boot into the recovery temporarily and allow you flash things. Once you reboot from that temp recovery it will boot using whatever kernel (or other .img file in this case) you have flashed into the boot partition.
The syntax for flashing is "fastboot flash <partition> <name-of-file-to-flash-to-that-partition>"
The syntax for booting an image is "fastboot boot <name-of-the-file-to-boot>"
It sounds like you mixed those 2 together and typed " fastboot flash boot nameofrecovery.img" so when you go to boot your phone now the only thing your phone sees to boot is the recovery. That's why your solution is twofold.
1: Flash the kernel to the boot partition: "fastboot flash boot nameofkernel.img" (sometimes these are just named "boot.img"). This will load the Kernel, modules, and ROM so that your phone will boot properly.
2: flash the recovery to the recovery partition: "fastboot flash recovery nameofrecovery.img" This will permanently install your custom recovery so that you can go back into it next time you want to flash ROMs, make/restore backups, etc.
You should be good to go and will likely never make THAT mistake again. Ask me how I know...
cntryby429 said:
edited to fix all my auto-correct typing mistakes.
My understanding is that there's two ways of getting into a custom recovery in adb:
1: "fastboot flash recovery nameofrecovery.img" this will flash over the previous recovery whatever that was. It will stick and you get into the new recovery either through hboot or a ROM's advanced power menu.
2: "fastboot boot nameofrecovery.img" this will boot into the recovery temporarily and allow you flash things. Once you reboot from that temp recovery it will boot using whatever kernel (or other .img file in this case) you have flashed into the boot partition.
The syntax for flashing is "fastboot flash <partition> <name-of-file-to-flash-to-that-partition>"
The syntax for booting an image is "fastboot boot <name-of-the-file-to-boot>"
It sounds like you mixed those 2 together and typed " fastboot flash boot nameofrecovery.img" so when you go to boot your phone now the only thing your phone sees to boot is the recovery. That's why your solution is twofold.
1: Flash the kernel to the boot partition: "fastboot flash boot nameofkernel.img" (sometimes these are just named "boot.img"). This will load the Kernel, modules, and ROM so that your phone will boot properly.
2: flash the recovery to the recovery partition: "fastboot flash recovery nameofrecovery.img" This will permanently install your custom recovery so that you can go back into it next time you want to flash ROMs, make/restore backups, etc.
You should be good to go and will likely never make THAT mistake again. Ask me how I know...
Click to expand...
Click to collapse
I didn't use fastboot load TWRP, I used the adb method shown on TeamWin's project page for the Verizon M8:
***********
Download - ADB / Terminal method:
Download the newest .img file from here
Download the above file. Save it to the root of your /sdcard directly (internal memory only) and rename it to twrp.img
Launch terminal emulator or connect to your computer and open an adb shell, then type the following:
su
dd if=/sdcard/twrp.img of=/dev/block/mmcblk0p43
Then reboot to complete installation.
***********
Thanks all for the other suggestions which I am about to attempt!
I had this happen to me on my Asus EeePad TF101. It seems that TWRP has a bug that prevents it from setting a "boot to system" flag on some devices, causing it to always boot to recovery.
The solution for the TF101 was to reinstall the stock boot image, which appears to align with the instructions already given. Good luck! I know the terrible feeling I had when this happened to my tablet...
Zallantor said:
Hey man the same thing happened to me last night, i thought i bricked my phone. I personally dont think the adb method of getting twrp onto the phone is working right now. If someone knows what we are doing wrong plz let us know.
Here is how i fixed it:
1. Put phone into bootloader, put it on fastboot, plug it into computer. You will see it change to "fastboot usb"
2. Download and do this http://forum.xda-developers.com/showthread.php?t=2708686 . To do this go back to your console (terminal or cmd), navigate back to the folder with adb in it, and instead of running the adb commands just type in " fastboot flash boot M8VZWbootInsecure.img ". its easiest to put that boot img in the same folder as adb and fastboot. once that is done you just need to reboot the phone and you are golden.
3. Problem is, when you do this you can no longer get back to your recovery, you get a screen with a red triangle and exclamation mark. I thought I bricked my phone lol.
4. Doing a alternate soft reset will get the phone back to normal android ( hold down power and volume up for 10 secs)
5. to fix it complete use the flashboot method of copying over the recovery onto the phone as shown here http://teamw.in/project/twrp2/226 . This is essentially the same method as in step 2 its just copying over the twrp.img into the recovery section of the phone.
By doing this I was able to get TWRP to work and be able to boot normally to system. Hope this helps.
Click to expand...
Click to collapse
Whew! Thanks!!
Not only did that save my bacon, it had the added benefit of getting me the insecure kernel which I had forgotten about since going through the whole root/S-off/unlock bootloader/insecure kernel routine with my Droid DNA quite a while back.
Zallantor said:
Hey man the same thing happened to me last night, i thought i bricked my phone. I personally dont think the adb method of getting twrp onto the phone is working right now. If someone knows what we are doing wrong plz let us know.
Here is how i fixed it:
1. Put phone into bootloader, put it on fastboot, plug it into computer. You will see it change to "fastboot usb"
2. Download and do this http://forum.xda-developers.com/showthread.php?t=2708686 . To do this go back to your console (terminal or cmd), navigate back to the folder with adb in it, and instead of running the adb commands just type in " fastboot flash boot M8VZWbootInsecure.img ". its easiest to put that boot img in the same folder as adb and fastboot. once that is done you just need to reboot the phone and you are golden.
3. Problem is, when you do this you can no longer get back to your recovery, you get a screen with a red triangle and exclamation mark. I thought I bricked my phone lol.
4. Doing a alternate soft reset will get the phone back to normal android ( hold down power and volume up for 10 secs)
5. to fix it complete use the flashboot method of copying over the recovery onto the phone as shown here http://teamw.in/project/twrp2/226 . This is essentially the same method as in step 2 its just copying over the twrp.img into the recovery section of the phone.
By doing this I was able to get TWRP to work and be able to boot normally to system. Hope this helps.
Click to expand...
Click to collapse
I was soft bricked and only able to boot into bootloader and recovery and this write up worked for me. Just wanted to say thanks.
Don't use adv/terminal way. It's writing recovery to wrong partition..
Sent from my HTC6525LVW using XDA Premium 4 mobile app
The fastboot command to flash your recovery is:
fastboot flash recovery recovery.img
where "recovery.img" is the name of your recovery.img file on your host computer. Don't use "fastboot flash boot recovery.img", as I believe this will flash your boot partition, not the recovery partition.
hanginwithdaddo said:
The fastboot command to flash your recovery is:
fastboot flash recovery recovery.img
where "recovery.img" is the name of your recovery.img file on your host computer. Don't use "fastboot flash boot recovery.img", as I believe this will flash your boot partition, not the recovery partition.
Click to expand...
Click to collapse
if you flash to anything but the recovery partition your in some trouble.
same goes for anything like this, make sure you know what that .img is and you trust it. someone could have renamed an hboot to recovery and you end up flashing an hboot to your recovery partition because someone was careless with naming of files.
So I need help... I'm stuck in a bootloader loop. And every time I try to do this fix, terminal keeps telling me this:
error: cannot open 'M8VZWbootInsecure.img'
Any ideas?
tim.ton said:
So I need help... I'm stuck in a bootloader loop. And every time I try to do this fix, terminal keeps telling me this:
error: cannot open 'M8VZWbootInsecure.img'
Any ideas?
Click to expand...
Click to collapse
are you on a mac? reboot...
---------- Post added at 08:36 AM ---------- Previous post was at 08:32 AM ----------
The Stig 04 said:
I think the command you run has something to do with it. "Fastboot flash boot nameofrecovery.img"
Almost certain the command has to be "fastboot flash nameofrecovery.img"
Sent from my HTC6525LVW using Tapatalk
Click to expand...
Click to collapse
This is incorrect.
command is:
fastboot flash recovery nameofrecovery.img
additionally, since you can boot into TWRP, have you tried sideloading a rom?
(in TWRP, go to ADVANCED, click SIDELOAD... i think you need to swipe to activate... then from terminal: adb sideload nameofROM.zip)
RBThompsonV said:
are you on a mac? reboot...
---------- Post added at 08:36 AM ---------- Previous post was at 08:32 AM ----------
This is incorrect.
command is:
fastboot flash recovery nameofrecovery.img
Click to expand...
Click to collapse
Oh yeah! Lol I knew it was something like that. Thanks!
Sent from my HTC6525LVW using Tapatalk

[Help] Nexus 5 stuck in boot loop, not power button problem

Hello everyone,
I am asking for help because my Nexus 5 stuck into bootloop suddenly. My phone is unrooted, bootloader in locked state, as I have never flashed any ROM in my phone. I am not keen on getting the files in my phone back but just want to use the phone again. I have tried many methods to restore my phone but still, I failed. I can go to fastboot and recovery mode. However, my phone is still in locked state, I could not flash any factory image into it using Nexus root toolkit nor put any rom files to sdcard. and I couldn't unlock the boot loader as it is in a boot loop. Do anyone got any ideas to save my phone, please help me.
P.s. I have already tried the following methods:
Method1 ( Failed because my phone is in locked state, cannot push any ROMs into it.)
-setup ADB, connect phone while its in recovery to adb.
-Download a rom for your phone (you can head over to XDA to look for rom and download one you like). Just download it to your pc.
-Connect your phone to pc using USB.
-Open cmd and enter the command adb push PathAndNameOfROMFile.zip /sdcard/. This will push the rom file you downloaded above to sdcard.
-Wipe your system, dalvic cache, cache and data (recommended, but not necessary if you downloaded same rom as previously installed on your phone).
-Reboot.
Method2 ( Failed because my phone is in locked state)l, cannot write any ROMs into my phone)
Semi-Case 2:
-There is some problem flashing some specific part.
-In this case, you can try flashing manually.
-Run these commands One by One in cmd/terminal (replace C:/ with path to where you extracted the official factory ROM archive):
fastboot flash bootloader C:/image-hammerhead-xxxx/bootloader.img
fastboot reboot-bootloader
fastboot flash radio C:/image-hammerhead-xxxx/radio.img
fastboot reboot-bootloader
fastboot flash system C:/image-hammerhead-xxxxx/system.img
fastboot flash userdata C:/image-hammerhead-xxxxx/userdata.img
(Note: this command will wipe your device (including /sdcard), EVEN if your bootloader is already unlocked.)
fastboot flash boot C:/image-hammerhead-xxxx/boot.img
fastboot flash recovery C:/image-hammerhead-xxxx/recovery.img
(Skip the above command if you dont want to flash stock recovery and are sure that your current recovery is not corrupt).
Fastboot erase cache
-This will manually flash everything. Hopefully this time it should be fine.
If you can get into recovery try wiping your cache from there. Try more than once if it doesn't work the first time.
Sent from my SHIELD Tablet using Tapatalk
frenziedfemale said:
If you can get into recovery try wiping your cache from there. Try more than once if it doesn't work the first time.
Sent from my SHIELD Tablet using Tapatalk
Click to expand...
Click to collapse
I have tried that for a few times, but a flashing recovery mode android logo appears after I wiped the cache.
Unfortunately you may have to unlock your bootloder and reflash the firmware. Not that difficult but will wipe your phone so you will lose any photos or data that you may have on it.
frenziedfemale said:
Unfortunately you may have to unlock your bootloder and reflash the firmware. Not that difficult but will wipe your phone so you will lose any photos or data that you may have on it.
Click to expand...
Click to collapse
Thank you for your advice, I don't mind losing the data. I have tried unlocking the bootloader but when my phone is unlocked using Nexus Root Toolkit, it goes into boot loop and become locked again when I goes into fastboot mode.

Oneplus one not installing TWRP after COS13.1 update

I reset my Oneplus one and installed the COS13.1 update.... But now after installing I'm not able to flash twrp through fastboot... Even tho it shows successful on the PC, it wing boot into TWRP
Go to the developer options (tapping on the build number first ofcourse) and then go to the option: "update Cyanogen-recovery". set it to off.
I think that should do it. Haven't installed the update yet, but there is an option like that in the normal CM-13.
edit:
If that doesn't work you can try to flash it through flashify (requires root). If that still doesn't work you can also boot TWRP through fastboot and then install the IMG through TWRP itself (like updating your recovery)
You can boot TWRP via fastboot with using the boot command instead of the flash command:
fastboot boot "image.img"
Still showing that it's failed
Could you boot TWRP without flashing via fastboot? Because if you can do that it means that the system is automatically reflashing the stock recovery at startup.
How did you installed (tried to install) the recovery?
fastboot?
Follow this. TWRP 3.0.2 can be installed this way. 2.8.6 sometimes doesn't.
1. Turn off option to Update Cyanogen Recovery from Developer Options.
2. Flash Recovery via fastboot, the put command to clear cache from fastboot only. DONT REBOOT NOW.
3. Disconnect phone and turn it off.
4. Try booting to recovery. If it fails, dont worry let the phone boot normally then try again. It should work.

Moto g xt1033 black screen

My Moto G won't startup,the screen turns black after the Motorola symbol.I've tried to flash some ROMs,tried to upgrade the bootloader(to some recent version,i think) to 41.1A.
Everything i do in Fastboot seems to work fine,but,when i try to use the feature,it continues the same.I've flashed TWRP recovery,but when i try to use it,the standard recovery open,if i do "fastboot erase userdata" and "fastboot erase cache" the console says its ok, but nothing has been erased.
Everything i try to do,won't work.I thought there was a problem with battery,cause i let it discharge fully,but now i'm seeing that is firmware problem.
I've tried everything on the internet,nothing worked.
I suppose you have an unlocked bootloader, right? If not, unlock it.
I had the problem with the stock recovery popping again after flashing TWRP. The solution is going to recovery exactly after flashing TWRP:
0.- Download TWRP again just to discard the possibility of a bad download.
1.- Boot the phone into fastboot mode.
2.- Flash the recovery .img file
PHP:
(mfastboot flash recovery twrp_file.img)
see if it says "OK" in the computer's console. In the phone screen a pink text line should appear saying something like "file size mismatch OK".
3.- Without rebooting the phone, press vol- button until "Recovery" option is selected. After a couple minutes the TWRP screen will appear and will ask for permission for modify your filesystem.
If you reboot the phone before going into TWRP, stock recovery will be re-installed and TWRP will be lost.
moralesnery said:
I suppose you have an unlocked bootloader, right? If not, unlock it.
I had the problem with the stock recovery popping again after flashing TWRP. The solution is going to recovery exactly after flashing TWRP:
0.- Download TWRP again just to discard the possibility of a bad download.
1.- Boot the phone into fastboot mode.
2.- Flash the recovery .img file
PHP:
(mfastboot flash recovery twrp_file.img)
see if it says "OK" in the computer's console. In the phone screen a pink text line should appear saying something like "file size mismatch OK".
3.- Without rebooting the phone, press vol- button until "Recovery" option is selected. After a couple minutes the TWRP screen will appear and will ask for permission for modify your filesystem.
If you reboot the phone before going into TWRP, stock recovery will be re-installed and TWRP will be lost.
Click to expand...
Click to collapse
Thx for reply,
Yes,i've unlocked bootloader.
Yesterday i've tried to flash a custom recovery using
PHP:
mfastboot flash boot twrp_file.img
Worked once,the next time i booted my phone,it booted normally.
When i've gained acess in the custom recovery,i tried to copy a cm12 ROM to phone's memory,but,without sucess,the progress doesnt moved a bit.
I Will try the way you Said and Post the results here :fingers-crossed:
moralesnery said:
I suppose you have an unlocked bootloader, right? If not, unlock it.
I had the problem with the stock recovery popping again after flashing TWRP. The solution is going to recovery exactly after flashing TWRP:
0.- Download TWRP again just to discard the possibility of a bad download.
1.- Boot the phone into fastboot mode.
2.- Flash the recovery .img file
PHP:
(mfastboot flash recovery twrp_file.img)
see if it says "OK" in the computer's console. In the phone screen a pink text line should appear saying something like "file size mismatch OK".
3.- Without rebooting the phone, press vol- button until "Recovery" option is selected. After a couple minutes the TWRP screen will appear and will ask for permission for modify your filesystem.
If you reboot the phone before going into TWRP, stock recovery will be re-installed and TWRP will be lost.
Click to expand...
Click to collapse
Again,i've tried to flash TWRP recovery,the message "Missmatched partition size OK" appears in the phone,when i try to open Recovery,the Android logo appears with a !.
I don't know what to do,nothing works , even if i don't reboot the phone,the stock recovery had been re-installed.

Need help needed with fastboot(loop)

I've decided to upgrade to OOS11 stable and patch the boot before going into the rom. What I did was:
1. Flash latest TWRP (3.5.2_9-0)
2. Reboot to recovery
3. Flash ONLY OOS11 boot.img
4. Flash TWRP again
5. Install Magisk and Kirisakura-R 1.1.1 kernal (for f2fs support)
6. Reboot to recovery
Here I was going to do the same on other partition but TWRP failed to boot and screen kept flashing but I noticed that ADB was connected so I rebooted to fastboot and flash stock boot I've previously extracted from stock ROM. Now I face another problem, phone doesn't boot anywhere else but fastboot.
I've tried a few stuff to get it back.
# There were some cases where the phone won't boot with bootloader unlocked and stock boot so I managed to patch boot.img with Magisk using an emulator and then flash it.
# Tried booting into TWRP but phone phone would get stuck in "Fastboot mode" screen with fastboot still connected (And taking commands from PC).
# Tried flashing TWRP to boot partition which worked previously but this time the problem stayed and kept booting into fastboot.
A few more points that I should mention,
# I've backed up my entire phone using TWRP so I can unbrick it if I somehow manage to get into TWRP
# I don't have the backup on my computer. It's on the phone.
I absolutely can't lose those data. Yeah, mistake on my side for not backing up on my computer but to my defense, this never happened before so I let my guard down this time.
What options do I have left? Any hint would be appreciated. Thanks for reading

Categories

Resources