How to flash back to stock recovery from TWRP via adb? - T-Mobile LG G2

I've never needed to use adb, but I don't have access to the screen (not functional) and need to flash tbe recovery and rom back to stock. Possible? Thanks.

Related

[Q] How to dump stock recovery

I'm getting ready to flash CM7 onto my NS4G, but I want to backup the stock recovery before I start in case I want to revert back to pure stock. I know that there are placed where I can download other people's recovery dumps, but I'd really like to create my own.
Does anyone know how to get a recovery dump of the stock recovery. My issue comes in the fact that dumping recovery seems to require root, but rooting the NS is done by unlocking the bootloader and flashing the recovery. It's a catch 22, I can't backup the recovery without rooting but I can't root without flashing the recovery.
Any tips?
In a terminal:
dd if=/dev/mtd/mtd3 of=/sdcard/recovery.img
If you cat /proc/mtd it will output the value (partition) of all your mtd's. It will tell you what each is. Very handy i think.
snandlal said:
In a terminal:
dd if=/dev/mtd/mtd3 of=/sdcard/recovery.img
Click to expand...
Click to collapse
The trouble is that running dd requires root. I'm not aware of a root exploit for the Nexus S 4G 2.3.5. The current method to root the phone is to unlock it, flash ClockworkMod recovery, and flash superuser.
I accidentally solved my own problem. I gave up on trying to find a way to backup the stock recovery and I just moved forward with loading CM7. However, in the process I discovered a way to backup the full un-rooted stock system, including the stock recovery.
Here are the steps I took (more detailed steps on CyanogenMod wiki):
1. Unlock the phone using "fastboot oem unlock" (this did a factory reset, including the SD/USB memory)
2. Rebooted into the bootloader
3. Installed ClockworkMod Recovery using "fastboot flash recovery recovery-clockwork-3.1.0.1-crespo4g.img" while in the bootloader
4. Without leaving the bootloader I selected Recovery. This launched ClockworkMod Recovery.
5. Used ClockworkMod Recovery to run a NAND backup.
I can't fully explain this, but the backup included the stock recovery. When I restarted the phone and launched recovery again it still had my stock recovery image installed. The only way I can explain this is that "fastboot flash recovery" only flashed ClockworkMod temporarily while I was in the bootloader, I'm not sure how that works.
After flashing CM7 I used ROM Manager to install ClockworkMod Recovery again, and using that method caused it to stick. However, restoring my stock backup does in fact flash me back to stock recovery.
Long story short, I was able to get a clean backup of non-rooted stock. If I want to go back to pure stock for warranty or other reasons I only have two steps to take:
1. Restore my stock backup
2. Lock the bootloader
Check for /system/etc/install-recovery.sh delete or change permissions to 000. When booted to OS,it will rewrite over custom recovery
agasser said:
Long story short, I was able to get a clean backup of non-rooted stock. If I want to go back to pure stock for warranty or other reasons I only have two steps to take:
1. Restore my stock backup
2. Lock the bootloader
Click to expand...
Click to collapse
And Samsung can still read out the phone's files to see the bootloader was unlocked IF they wish to
agasser said:
I can't fully explain this, but the backup included the stock recovery. When I restarted the phone and launched recovery again it still had my stock recovery image installed. The only way I can explain this is that "fastboot flash recovery" only flashed ClockworkMod temporarily while I was in the bootloader, I'm not sure how that works.
Click to expand...
Click to collapse
Your NANDroid backup does contains CWM recovery. The reason you get the stock recovery after reboot is because of the /system/etc/install-recovery.sh script. (see what snandlal said above)
I think CM7 does not include that script in their ROM.

stock i1920T

i tried to put custom rom on sns but i decided to just keep it stock i want to put the original recovery that it came with so i can update in the future is it possible to update even if the bootloader is unlocked?
problem:i flashed an image but couldnt use adb with my pc.
is there a image where i can just use fastboot to flash without using adb? i was using a recovery that required me to use adb to erase some kind of sh? was stuck on that. so if theres a recovery thats doesnt need to use adb? i have a recovery but i cant flash a rom.
Are you still rooted ?
It is rooted.
If you are on stock rom already, then you can do a search using root explorer or like adao file manager for install-recovery and find it and return its name to install-recovery.sh I assume this is what you changed previously ALTHOUGH if you have CWM installed then you can probably ( and easier...ly ) just find the stock image of your phone and flash it. I just did this this morning to my phone actually..
the image for i9020T can be found here http://forum.xda-developers.com/showthread.php?t=1062777&highlight=stock+i9020t
some quick searching can probably find some other images for the different models.
once you flash one of those you may have to use fastboot to lock the bootloader back up.
"fastboot oem lock" command when connected to your phones bootloader
ive flash the zip but everything is still the same ive tried to flash with cwm v2.5.1.8 i thinks somehow this version of cwm doesnt work because i cant flash anything with this i also tried to look for install recovery.sh on adao file explorer but couldnt find it. if you can help me out would be very appreciated.
Pop out the batter of your device and tell me the model number i902......
What version of clockwork do you have?
you could try to download rom manager from the marketplace and use that to flash clockwork again. once you have done that try flashing the stock img for your model phone.. flashing zips from cwm should work.... although watch your screen when you do it see if it throws any errors

[q] how to boot recovery on ics

I9023 cannot boot recovery after upgrade to ics
Are you rooted??? If yes, you can use rom manager to reflash CWM, other options is to fastboot flash recovery from your computer... Because probably what happened is that you use a stock rom to update and recovery went back to stock, and if nothing of this works please provide more details...
Sent from my Full Android on Crespo using Tapatalk
ICS default recovery is not work, you should flash it by youself
use adb
if you can connect thru adb and assuming that you have a valid recovery you can use the following:
"adb reboot recovery"
that should get you to recovery afik this will work with stock or cwm recovery.
If you don't have a valid recovery you will have to flash one (possibly thru adb if you can't get it going any other way)
Cheers
BR

Question on updating to CM-10.2 from stock 4.1.2

I flashed CWM in odin,but when i boot up into CWM it boots the stock recovery.Also,do i need to flash the bootloader and radio if coming from 4.1.2? I must be getting old..I did it on my last relay,but i don't remember how.Do i have to flash the bootloader first?
Thanks
The 4.1.2 stock image apparently has code within its start up routine to overwrite a custom recovery if one is detected at boottime. After flashing with ODIN, did you reboot into the system, or did you directly boot into CWM? If you're on 4.1.2 stock, there will be no need to update the bootloader or modem, you're on the latest. Try flashing CWM, and then immediately booting into recovery. You can also delete the files Stock calls to reflash the recovery from the image once you're able to get in via CWM, and utilize adb.
Magamo said:
The 4.1.2 stock image apparently has code within its start up routine to overwrite a custom recovery if one is detected at boottime. After flashing with ODIN, did you reboot into the system, or did you directly boot into CWM? If you're on 4.1.2 stock, there will be no need to update the bootloader or modem, you're on the latest. Try flashing CWM, and then immediately booting into recovery. You can also delete the files Stock calls to reflash the recovery from the image once you're able to get in via CWM, and utilize adb.
Click to expand...
Click to collapse
Yes,i booted into the system,then restarted into CWM...I'll try reflashing,and booting right into recovery and let you know,Thanks for the reply!
Yep,that did it...Got it up and running..Thanks again Magamo..

Twrp's terminal emulator for booting in recovery

can we use commands in terminal emulator of new twrp to temporary boot in to stock recovery .. to receive ota? We don't need pc then ...?
sandeep101 said:
can we use commands in terminal emulator of new twrp to temporary boot in to stock recovery .. to receive ota? We don't need pc then ...
Click to expand...
Click to collapse
You mean the command line inside of twrp? If you installed twrp you don't have the stock recovery no more, so you can't do that.
sandeep101 said:
can we use commands in terminal emulator of new twrp to temporary boot in to stock recovery .. to receive ota? We don't need pc then ...?
Click to expand...
Click to collapse
Even if you could boot stock recovery from TWRP, you still wouldn't be able to apply the OTA because in general you can't apply stock OTA updates on a rooted device that has custom recovery.
To apply stock updates you need stock recovery and an unmodified system partition. This means you can't have root, can't have TWRP and can't have other custom mods that modify system such as Xposed. Basically, your device needs to be back on full umodified stock and then you can apply updates.
Sent from my SM-S903VL using Tapatalk
Thanks for reply...What if I restore my system image and boot partition backup in twrp , download update , reboot back in twrp .... Hotboot/ boot in to stock recovery ... Then? Update is going to replace twrp .. that's where the boat sinks i guess ,..?
sandeep101 said:
Thanks for reply...What if I restore my system image and boot partition backup in twrp , download update , reboot back in twrp .... Hotboot/ boot in to stock recovery ... Then? Update is going to replace twrp .. that's where the boat sinks i guess ,..?
Click to expand...
Click to collapse
No, you can't have TWRP flashed on the device when you apply the update, even if were possible to boot stock recovery from TWRP because even though you'd be "booting" stock recovery, TWRP is still what would actually be on the device.
An option would be to get a copy of your stock recovery in .img format or in .zip format and then unroot your device and uninstall SuperSU then boot to TWRP then flash the stock recovery like you would a ROM, then go back to homescreen in TWRP then tap reboot, reboot recovery, this will boot into stock recovery, then apply the update in stock recovery, after you update you'll have to reflash TWRP provided that the update doesn't lock your bootloader. If it does you'll have to unlock it before flashing TWRP again.
Sent from my SM-S903VL using Tapatalk

Categories

Resources