Unbrick Recovery Fire 5. Gen - Fire Q&A, Help & Troubleshooting

I managed to brick my recovery by trying to install the TWRP_Fire_2.8.7.0_adb.img to the recovery partition. Does anyone have a stock recovery image? :angel:
I already have root permissions, so installing it should not be the problem, but a way to correctly install the recovery would also be nice...

agowa338 said:
I managed to brick my recovery by trying to install the TWRP_Fire_2.8.7.0_adb.img to the recovery partition. Does anyone have a stock recovery image? :angel:
I already have root permissions, so installing it should not be the problem, but a way to correctly install the recovery would also be nice...
Click to expand...
Click to collapse
Root is irrelevant. Without a signed image you are going nowhere. Have not seen any of those floating around.

Davey126 said:
Root is irrelevant. Without a signed image you are going nowhere. Have not seen any of those floating around.
Click to expand...
Click to collapse
Do you have a fire tablet?
Can't you simply dump that partition and write to another/my device?

Found a stock recovery by accident. There is one within the Supertool download. I flashed it and now the recovery is working again.
So may it is a bad idea to tamper with the recovery if the boot loader is locked...

agowa338 said:
Found a stock recovery by accident. There is one within the Supertool download. I flashed it and now the recovery is working again.
So may it is a bad idea to tamper with the recovery if the boot loader is locked...
Click to expand...
Click to collapse
Cool - thanks for sharing. Didn't know this was possible but thinking through it now makes sense. On some locked devices you can't touch the recovery partition but since you 'successfully' borked yours through intentional action it demonstrated some ability to manipulate the contents. Nice when it works out that way.

I don't know how the bootloader lockdown works, but I thought it is similar to uefi. So the boot process is verified by certificates or hashes. So the binaries that are loaded at boot cannot be changed.
In addition, the fastboot does not allow you to flash images.
So as by uefi if you have an booting system (live cds) you can tamper with the contents on the disk, but if you tamper with boot files, the system would not start.
So i did a dd (without backing up my current recovery...) and overwrote the recovery partition from the normal boot mode using my root access. But the recovery image didn't succeed the bootloader checks and didn't load therefore.
I guess, if you find an unprotected part of the recovery to overwrite from where a program would be called as root, it could modify the recovery on the fly...
But that's mostly unproved thoughts based on research and tampering on uefi...

Related

Flashing twrp on stock v20i

So I came from a stock lollipop Tmobile h811 non rooted
To stock MM v20i.
Ive tried flashing twrp 3.0 for cm13, and no matter what,
I get failed: (remote unknown command at the end after it sends recovery.
Its already unlocked(bootloader)
Thanks.
[email protected] said:
So I came from a stock lollipop Tmobile h811 non rooted
To stock MM v20i.
Ive tried flashing twrp 3.0 for cm13, and no matter what,
I get failed: (remote unknown command at the end after it sends recovery.
Its already unlocked(bootloader)
Thanks.
Click to expand...
Click to collapse
Type: fastboot boot (path goes here)
You can drag and drop the twrp img into the command window. This will ensure you have the correct path
[email protected] said:
So I came from a stock lollipop Tmobile h811 non rooted
To stock MM v20i.
Ive tried flashing twrp 3.0 for cm13, and no matter what,
I get failed: (remote unknown command at the end after it sends recovery.
Its already unlocked(bootloader)
Thanks.
Click to expand...
Click to collapse
Follow this instruction
http://forum.xda-developers.com/tmobile-g4/development/stock-h811-20i-images-kdz-flashable-t3308227
mingkee said:
Follow this instruction
http://forum.xda-developers.com/tmobile-g4/development/stock-h811-20i-images-kdz-flashable-t3308227
Click to expand...
Click to collapse
That link doesn't really solve the OP's issue. I have the same issue. BUT - your link did show me that I can BOOT the .img file, I can't flash the .img file. I've verified the bootloader is unlocked by the fastboot getvar command.
I'm not sure what to do next. Installing OpenGapps causes a boot loop and the only thing I can do at this point is a factory reset with the OEM recovery since in the boot loop adb is unresponsive.
joesee said:
That link doesn't really solve the OP's issue. I have the same issue. BUT - your link did show me that I can BOOT the .img file, I can't flash the .img file. I've verified the bootloader is unlocked by the fastboot getvar command.
I'm not sure what to do next. Installing OpenGapps causes a boot loop and the only thing I can do at this point is a factory reset with the OEM recovery since in the boot loop adb is unresponsive.
Click to expand...
Click to collapse
The instruction shows how to flash recovery.img with TWRP though I have no clue how to do it.
I got that error the first time I did it, it was because of a misspelling of the command.
If you already unlocked the bootloader, while in fastboot, you only type "fastboot boot" + "path to twrp img on computer" OR instead of typing out the path, you may drag and drop the file into the command window.
Once it boots to twrp, flash twrp from within the booted img. That ensures you have permanent twrp.
If you were able to unlock your bootloader, the only thing stopping you from loading twrp is improper spelling and path to the img. Almost every error I have seen is from not following the directions.
Vseprz said:
If you already unlocked the bootloader, while in fastboot, you only type "fastboot boot" + "path to twrp img on computer" OR instead of typing out the path, you may drag and drop the file into the command window.
Once it boots to twrp, flash twrp from within the booted img. That ensures you have permanent twrp.
If you were able to unlock your bootloader, the only thing stopping you from loading twrp is improper spelling and path to the img. Almost every error I have seen is from not following the directions.
Click to expand...
Click to collapse
OK, just so I understand correctly, the proper sequence of events is to use fastboot to boot TWRP (which I can do) then, once in TWRP, I can then flash the twrp .zip file, right? Does anyone know if the LG's bootloader overwrites the recovery partition upon boot (in other words, do I have to boot straight to recovery after I flash to ensure it sticks?)
Sorry for the obtuse questions, I've got a lot of experience with Samsung flashing back in the KK and LP days, but not MM.
Thanks in advance!!
joesee said:
OK, just so I understand correctly, the proper sequence of events is to use fastboot to boot TWRP (which I can do) then, once in TWRP, I can then flash the twrp .zip file, right? Does anyone know if the LG's bootloader overwrites the recovery partition upon boot (in other words, do I have to boot straight to recovery after I flash to ensure it sticks?)
Sorry for the obtuse questions, I've got a lot of experience with Samsung flashing back in the KK and LP days, but not MM.
Thanks in advance!!
Click to expand...
Click to collapse
So you have flashed 20i which overwrites twrp with the stock recovery.
You then go through the steps for unlocking the boot loader.
After the boot loader is unlocked, you may boot into twrp with the fastboot boot command.
When that boots into twrp, flash twrp from within that to have it stick.
Have a question and maybe someone can help. Me getting carried away installed twrp from external partition. Now i cannot boot into recovery. Tried flashing using flashify and twrp manager. but flashify does not install after reboot and there is no option for h811 in twrp manager. Anyway to fix this?
Sent from my LG-H811 using Tapatalk
Vseprz said:
So you have flashed 20i which overwrites twrp with the stock recovery.
You then go through the steps for unlocking the boot loader.
After the boot loader is unlocked, you may boot into twrp with the fastboot boot command.
When that boots into twrp, flash twrp from within that to have it stick.
Click to expand...
Click to collapse
Yes, that's exactly the steps I do. I've flashed 20i. I used fastboot to boot into twrp. I then "install" the twrp zip file. Says it flashes with no issues. I then reboot the phone. Still has stock recovery.
I've confirmed my bootloader is unlocked with the fastboot getvar all. I've also tried all three versions of twrp available (.1, .2 and .3) and still doesn't work. Yet twrp works fine if I boot it.
joesee said:
Yes, that's exactly the steps I do. I've flashed 20i. I used fastboot to boot into twrp. I then "install" the twrp zip file. Says it flashes with no issues. I then reboot the phone. Still has stock recovery.
I've confirmed my bootloader is unlocked with the fastboot getvar all. I've also tried all three versions of twrp available (.1, .2 and .3) and still doesn't work. Yet twrp works fine if I boot it.
Click to expand...
Click to collapse
How did you confirm you have stock recovery? Did you use adb reboot recovery? Or did you use hardware keys to boot to it? Because if you use hardware keys you still get the initial confirm factory reset. You just have to accept then it boots to twrp.
---------- Post added at 10:44 AM ---------- Previous post was at 10:22 AM ----------
99problemz said:
Have a question and maybe someone can help. Me getting carried away installed twrp from external partition. Now i cannot boot into recovery. Tried flashing using flashify and twrp manager. but flashify does not install after reboot and there is no option for h811 in twrp manager. Anyway to fix this?
Sent from my LG-H811 using Tapatalk
Click to expand...
Click to collapse
If boot loader is unlocked you should load twrp from fastboot.
Vseprz said:
How did you confirm you have stock recovery? Did you use adb reboot recovery? Or did you use hardware keys to boot to it? Because if you use hardware keys you still get the initial confirm factory reset. You just have to accept then it boots to twrp.
---------- Post added at 10:44 AM ---------- Previous post was at 10:22 AM ----------
If boot loader is unlocked you should load twrp from fastboot.
Click to expand...
Click to collapse
Hahaha now that's funny!! I bet I've been through 50 blog posts on various sites to try to figure this out. Having successfully installed Viper I didn't want to take the chance and pass that confirm wipe factory question.
I feel like a complete tool. Seriously, thank you for taking the time to respond to me!
joesee said:
Hahaha now that's funny!! I bet I've been through 50 blog posts on various sites to try to figure this out. Having successfully installed Viper I didn't want to take the chance and pass that confirm wipe factory question.
I feel like a complete tool. Seriously, thank you for taking the time to respond to me!
Click to expand...
Click to collapse
I'm glad it all worked out! :good:
finding I have to re-flash with flashify each time
using twrp-2.8.7.1, I get only the first reboot from there with hardware keys letting me into twrp after accepting the first factory reset prompt and denying the second. After that cant do it again unless I re-flash. Same thing happens if I flash it from within twrp. Can use terminal, su, boot recovery and I am in., or ADB/fatsboot Primarily worried about a soft brick condition. H-811, v1 20i stock, unlocked bootloader and rooted. DE-bloated,
Any Ideas, Thanks
jdoebean said:
using twrp-2.8.7.1, I get only the first reboot from there with hardware keys letting me into twrp after accepting the first factory reset prompt and denying the second. After that cant do it again unless I re-flash. Same thing happens if I flash it from within twrp. Can use terminal, su, boot recovery and I am in., or ADB/fatsboot Primarily worried about a soft brick condition. H-811, v1 20i stock, unlocked bootloader and rooted. DE-bloated,
Any Ideas, Thanks
Click to expand...
Click to collapse
You drop the twrp file
In fastboot folder open command prompt and flash twrp first just rename it simply to recovery.img while in the fastboot folder
Type fastboot flash recovery recovery.img
Or just fastboot flash recovery.img
Then it should boot you into twrp
Once booting into twrp flash the supersu zip in your internal sd
Once you have root and reboot all you have to do is use flashify app and download twrp from the app and flash it Twrp sticks from there.
Sent from my LGMS631 using XDA Free mobile app

TWRP not flashing

I have been having an issue flashing TWRP. I have previously had TWRP on my Nexus 6, but I recently flashed the latest security update, and now for the life of me, I cannot get TWRP to flash.
I run fastboot flash recovery twrp-3.0.2-0-shamu.img, it says it ran OKAY, I reboot the phone, then use ADB reboot recovery but it always comes back to the stock recovery. I have done this a hundred times, and never had an issue. Anyone else seen this?
lenard_hester said:
I have been having an issue flashing TWRP. I have previously had TWRP on my Nexus 6, but I recently flashed the latest security update, and now for the life of me, I cannot get TWRP to flash.
I run fastboot flash recovery twrp-3.0.2-0-shamu.img, it says it ran OKAY, I reboot the phone, then use ADB reboot recovery but it always comes back to the stock recovery. I have done this a hundred times, and never had an issue. Anyone else seen this?
Click to expand...
Click to collapse
boot up first, remove some system apps to clear up some space, then flash again with fastboot.
simms22 said:
boot up first, remove some system apps to clear up some space, then flash again with fastboot.
Click to expand...
Click to collapse
I can't remove any system apps. I need to have root first, and I need TWRP to install root. Besides, TWRP goes on the recovery partition not the system partition.
lenard_hester said:
I can't remove any system apps. I need to have root first, and I need TWRP to install root. Besides, TWRP goes on the recovery partition not the system partition.
Click to expand...
Click to collapse
true. you are using fastboot while you are in the bootloader?
simms22 said:
true. you are using fastboot while you are in the bootloader?
Click to expand...
Click to collapse
yes. I think I figured out a way around it. my mistake was rebooting. Instead of rebooting from the bootloader, I just went to recovery mode directly from there and TWRP booted right up.
lenard_hester said:
yes. I think I figured out a way around it. my mistake was rebooting. Instead of rebooting from the bootloader, I just went to recovery mode directly from there and TWRP booted right up.
Click to expand...
Click to collapse
I think you have to rename stock recovery files or when you reboot it will reinstall stock recovery.
cajun9924 said:
I think you have to rename stock recovery files or when you reboot it will reinstall stock recovery.
Click to expand...
Click to collapse
that is true, if the op is running stock android. or you can just delete that one file in /system/.

Help! I really screwed up...

It all started when I tried to temporarily boot into the TWRP img file. It didn't work so I tried flashing the file to boot_a. Then I installed TWRP through the installer (stupidly didn't wipe the caches) and... Well. When I try to boot into System through TWRP, it gets COMPLETELY stuck at the powered by Android logo screen. No amount or combination of button holding will shut it off and I actually had to let the battery (thank you SO MUCH for non-removable batteries by the way, smartphone manufacturers >_>) drain before it would actually boot again. Rebooting it into Download mode will get it stuck in there too where every time I hold the power button and shut it off, it will just reboot right back into Download mode again. And now, here's probably the worst part. I CAN'T UNLOCK the critical partition to flash when in Download mode, so I can't use the OST tool! When I try to unlock it, it just complains that flashing unlock is not allowed even though the rest of the bootloader is completely unlocked.
TL;DR - When I power the phone up it goes straight into TWRP. Booting to System totally freezes it and the Bootloader puts it in a loop when I try to power it off. Critical partition is locked for some reason. I CAN get around the bootloader loop though and get back to TWRP by switching active slots and rebooting.
Did you flash the TWRP installer to your active boot partition or your inactive one? If you flashed it to the active one, you can't get into system anymore because TWRP is your boot partition.
If you are on Oreo, and you flashed to the inactive slot, and then patched the active slot, you have to reboot into the active slot recovery and flash the Magisk installer to disable verification of the partitions.
If you can get into the bootloader, and you still have the unlock key from nokia, do fastboot flash unlock <unlock.key>, and then fastboot oem unlock_critical. Then you should be able to flash using OST.
THMSP said:
do fastboot flash unlock <unlock.key>, and then fastboot oem unlock_critical. Then you should be able to flash using OST.
Click to expand...
Click to collapse
This unlocked it! Thank you! <3
I also did have an issue with the OST tool complaining that the updater was out of date, but changing the .mlf file and leaving it unpacked when I opened it in OST seemed to make it work perfectly. My phone is now booting just fine and back to stock!
Now I just need to solve the original problem I had. How can I install TWRP to recovery since the img file wouldn't temporarily boot last time?
EDIT: Apparently unlocking the critical partition seemed to solve the problem of the TWRP image file not temporarily booting as well!
S5Guy said:
EDIT: Apparently unlocking the critical partition seemed to solve the problem of the TWRP image file not temporarily booting as well!
Click to expand...
Click to collapse
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
THMSP said:
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
Click to expand...
Click to collapse
Yeah looks like you're right. Letting it update back to Android 9 deleted TWRP and made fastboot boot for TWRP nonfunctional again.
Wait, so can I use that TWRP boot image you specified to boot temporarily to TWRP and then run the installer zip? Or will that not work and I'll have to flash the img directly from the bootloader?
S5Guy said:
Wait, so can I use that TWRP boot image you specified to boot temporarily to TWRP and then run the installer zip? Or will that not work and I'll have to flash the img directly from the bootloader?
Click to expand...
Click to collapse
You have to flash it directly to your boot partition. fastboot boot will work for nothing (and even if it worked those images would just send you directly into the system)
THMSP said:
No, thats because you flashed back the May firmware, where fastboot boot was still working properly. It only broke after the august update. If you want TWRP on newer security patch versions, you can get it here: https://bit.ly/nokia-nb1 in the folder "Boot Images". Those images are prepatched, you can safely flash them to your active boot partition. It also contains stock images for restoring before updating.
Click to expand...
Click to collapse
Alright! fastboot flash boot_a (TWRP image) worked! Thank you so much for all the help. <333

Accidentally flashed TWRP in boot partition.

So..I was trying to unlock the bootloader using the fastboot commands. When it was all done and I was booted into TWRP, I flashed the TWRP image onto the boot partition instead of the recovery partition. Realizing my mistake seconds after, I flashed TWRP onto the recovery partition as well. Now everytime I try to boot my device, you guessed it, it opens up TWRP instead.
Previously I was using the Stock android 10 ROM with March's security update. I was wondering if there's a way to fix this? Maybe flashing the boot.img will fix this(if yes, then can one of you take a backup of yours and upload it, please?) or should I just flash Pixel experience rom and it will change the partition according to its needs?
I am kinda worried..Hopefully, the device is fixable. Thank You.
BungeeWatcher47 said:
So..I was trying to unlock the bootloader using the fastboot commands. When it was all done and I was booted into TWRP, I flashed the TWRP image onto the boot partition instead of the recovery partition. Realizing my mistake seconds after, I flashed TWRP onto the recovery partition as well. Now everytime I try to boot my device, you guessed it, it opens up TWRP instead.
Previously I was using the Stock android 10 ROM with March's security update. I was wondering if there's a way to fix this? Maybe flashing the boot.img will fix this(if yes, then can one of you take a backup of yours and upload it, please?) or should I just flash Pixel experience rom and it will change the partition according to its needs?
I am kinda worried..Hopefully, the device is fixable. Thank You.
Click to expand...
Click to collapse
"If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image."
https://twrp.me/xiaomi/xiaomimia2.html
ahenaol said:
"If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image."
Click to expand...
Click to collapse
I used
fastboot boot *path of twrp.img*
to boot twrp on my phone, i guess that is called side loading? after that, when TWRP opened up, I copied the twrp.img into my storage. After that, I was supposed to flash that image onto the recovery partition by using the sideloaded TWRP but instead I flashed it onto the boot partition. I hope that is a bit clearer..anyway, even in this case will I have to flash the stock rom before trying anything else?
BungeeWatcher47 said:
I used
fastboot boot *path of twrp.img*
to boot twrp on my phone, i guess that is called side loading? after that, when TWRP opened up, I copied the twrp.img into my storage. After that, I was supposed to flash that image onto the recovery partition by using the sideloaded TWRP but instead I flashed it onto the boot partition. I hope that is a bit clearer..anyway, even in this case will I have to flash the stock rom before trying anything else?
Click to expand...
Click to collapse
You could try flashing just the boot.img file from stock image.
BungeeWatcher47 said:
... flashed TWRP onto the recovery partition as well.....
Click to expand...
Click to collapse
What do you mean here? There is no "recovery partition" in A/B slots structure of MiA2. Or did you totally reformated partitions?
BungeeWatcher47 said:
Previously I was using the Stock android 10 ROM with March's security update. I was wondering if there's a way to fix this? Maybe flashing the boot.img will fix this(if yes, then can one of you take a backup of yours and upload it, please?)...
Click to expand...
Click to collapse
Yes, If you were on stock A 10 march (11.0.6.0), and never re-paritioned device, then you can restore OS fasboot-reflashing stock 10.0.6.0 boot image to the slot you were using previously with 11.0.6.0 (and, btw, try to remember what was and is now in the opposite slot). I've uploaded 11.0.6.0 bbot images to: https://forum.xda-developers.com/showpost.php?p=82166125&postcount=58
BungeeWatcher47 said:
... or should I just flash Pixel experience rom and it will change the partition according to its needs?
Click to expand...
Click to collapse
Sorry, I'm on stock and never went deep into nuances of custom ROMs partitioning.
Aerobatic said:
What do you mean here? There is no "recovery partition" in A/B slots structure of MiA2. Or did you totally reformated partitions?Yes, If you were on stock A 10 march (11.0.6.0), and never re-paritioned device, then you can restore OS fasboot-reflashing stock 10.0.6.0 boot image to the slot you were using previously with 11.0.6.0 (and, btw, try to remember what was and is now in the opposite slot). I've uploaded 11.0.6.0 bbot images to: https://forum.xda-developers.com/showpost.php?p=82166125&postcount=58
Sorry, I'm on stock and never went deep into nuances of custom ROMs partitioning.
Click to expand...
Click to collapse
When you try to flash a image in TWRP, it gives you multiple options on the next screen. Namely, boot, vendor, system, data, recovery. I had flashed that TWRP.img into my boot slot lmao. It messed everything up. Your stock boot images have been saving me in multiple pinches.
Hello, thats my first entry in XDA forum. I did the same mistake with my mi9 and i have no idea how to fix it. Could someone help me, i hope i didn't killed it.
... i installed the mi 9 rom --> solved the problem

Did Magisk brick my tablet?

I installed magisk on my tablet and after tablet restarted, it got stuck on this recovery screen. Reboot system now gets you back on this screen. Rebooting to bootloader gets you stuck on logo screen. Factory reset did nothing as well. Does anyone have any ideas how to get out of this?
That's just the standard Android recovery. Use fastboot to flash your unpatched boot image file and you should be up and running again.
Well, that would be a problem. I don't have this tablet's boot image backed up anywhere. Is there any other way?
How did you install Magisk? If you have access to TWRP there might be a backup in /data.
I didnt use TWRP. I installed magisk manager and then there were 2 options in menu to install, magisk and something else. I installed magisk. It restarted tablet after it finished and got me stuck in the recovery screen.
So your tablet was already rooted before you tried installing Magisk.
You most likely need to somehow install the unpatched boot image to get up and running again. If you do not have access to the device firmware to extract the boot image, or can install or boot TWRP (or any other custom recovery) to possibly get a hold of the backup boot image in /data there's probably not much you can do.
Not that I know of, at least. There might be someone that knows some way around it. What is your device?
This is what I am using: https://iiyama.com/gl_en/products/prolite-tw1023asc-b1p/
Since you were rooted previously, maybe try running adb as root (adb root) when you're in recovery and then use an adb shell to pull the backup file from /data (it's in a folder named magisk_backup_<sha1>). A remote possibility, but worth a shot.
You need to try to find the stock boot image file somehow...
I have more of these tablets, so I could maybe get this boot image from those? I just don't feel comfortable doing it if something could get messed up again.
Also why did this happen in the first place? Was I installing it wrong?
mistyright said:
I have more of these tablets, so I could maybe get this boot image from those? I just don't feel comfortable doing it if something could get messed up again.
Also why did this happen in the first place? Was I installing it wrong?
Click to expand...
Click to collapse
If they're the same firmware version you could probably use adb shell to extract the boot partition.
Very hard to say why it failed... Possibly because you were already rooted and there was a conflict. Or maybe the device just isn't compatible.

Categories

Resources