[Guide] [Lollipop] Reverting to stock recovery after rooting - G 2014 General

In order to root Lollipop, you have to flash a custom recovery such as TWRP. The issue is how to revert back to stock recovery for OTA updates.
Fortunately, it's relatively simple and doesn't require downloading a recovery image from some shady third-party hosted website -- the stock recovery installation is still there on your phone!
Tools required:
A root-enabled file manager, such as Root Browser or Ghost Commander
Depending on the abilities of your file manager, a terminal program, such as Terminal Emulator
(Optional) Flashify, to backup your stock recovery for the future
1. Using your favorite file manager, rename /system/recovery-from-boot.bak to /system/recovery-from-boot.p
note: depending on the file manager, you might need to remount system as read/writeable first
2. execute (with root privileges) the shell script /system/bin/install-recovery_original.sh
if you use Root Browser as your file manager, you can execute this script as root directly. Otherwise go to the terminal app and type:
cd /system/bin
su
./install-recovery_original.sh
This will install the stock recovery.
3. Reboot into recovery to make sure it worked
4. (Optional) Backup the stock recovery using flashify. Now you'll be able to revert to stock recovery in the future without going through all these steps!

Seriously said:
In order to root Lollipop, you have to flash a custom recovery such as TWRP. The issue is how to revert back to stock recovery for OTA updates.
Fortunately, it's relatively simple and doesn't require downloading a recovery image from some shady third-party hosted website -- the stock recovery installation is still there on your phone!
Tools required:
A root-enabled file manager, such as Root Browser or Ghost Commander
Depending on the abilities of your file manager, a terminal program, such as Terminal Emulator
(Optional) Flashify, to backup your stock recovery for the future
1. Using your favorite file manager, rename /system/recovery-from-boot.bak to /system/recovery-from-boot.p
note: depending on the file manager, you might need to remount system as read/writeable first
2. execute (with root privileges) the shell script /system/bin/install-recovery_original.sh
if you use Root Browser as your file manager, you can execute this script as root directly. Otherwise go to the terminal app and type:
cd /system/bin
su
./install-recovery_original.sh
This will install the stock recovery.
3. Reboot into recovery to make sure it worked
4. (Optional) Backup the stock recovery using flashify. Now you'll be able to revert to stock recovery in the future without going through all these steps!
Click to expand...
Click to collapse
I currently have KitKat installed (4.4.4), rooted, unlocked bootloader & TWRP installed on my XT1063 and unable to receive OTA updates. I've checked your proposed method. There's no "install-recovery-original.sh" file in system/bin rather there's a shortcut of the file "install-recovery.sh" this shortcut points to "/system/etc/install-recovery.sh". My question is that if i execute this file "install-recovery.sh" will it restore stock recovery? I've the backup file placed at the location mentioned by you and i've already renamed it to "recovery-from-boot.p".

uetian2k3f said:
I currently have KitKat installed (4.4.4), rooted, unlocked bootloader & TWRP installed on my XT1063 and unable to receive OTA updates. I've checked your proposed method. There's no "install-recovery-original.sh" file in system/bin rather there's a shortcut of the file "install-recovery.sh" this shortcut points to "/system/etc/install-recovery.sh". My question is that if i execute this file "install-recovery.sh" will it restore stock recovery? I've the backup file placed at the location mentioned by you and i've already renamed it to "recovery-from-boot.p".
Click to expand...
Click to collapse
yup. the filename is different on lollipop.

Seriously said:
yup. the filename is different on lollipop.
Click to expand...
Click to collapse
Thanks! I'll give it a try.

This looks great. So now we can go flashing custom recoveries and then be able to revert to stock anytime, without relying on "shady third-party hosted websites". Good find :good:

Not working
I got an error ..see in attached images..i got both files

super hat funktioniert.

not working
it tells me finished executing script file
exit value:127
stdout:
null
stderr:
/system/bin/install-recovery_original.sh[17]:/system/etc/install-recovery-2.sh: not found
can somebody help me
Thank you
nvm i figured out how to do it
i downloaded the stock firmware on my pc and took the recovery.img and put it in my internal storage, flashed it using flashify and backed it up

Please, I need the original recovery in format "img" to flash with fastboot, can anyone upload? Thanks in advance!

mufasa2001 said:
nvm i figured out how to do it
i downloaded the stock firmware on my pc and took the recovery.img and put it in my internal storage, flashed it using flashify and backed it up
Click to expand...
Click to collapse
And now you can have OTA updates?

svendsvin said:
And now you can have OTA updates?
Click to expand...
Click to collapse
Only if you are unrooted and on stock firmware without any changes too.
Sent with somewhat

Related

2.3.4 Update resets CW back to stock recovery

I have a Nexus S(I9023) and used the full Rom to update from 2.3.3 KB3 GRI54 to the 2.3.4 KD1 GRJ22 version, except I can't get my clockworkmod recovery to stick, I unlocked the bootloader and flashed the recovery with clockworkmod 3.0.2.5, and installed the superuser file, except each time I boot into the OS, and then boot back into recovery, the clockworkmod is gone, and I'm stuck with the stock recovery again.
What I did was the following procedure:
Odin flashed back to stock 2.3.3 - KB3 - GRI54
installed the full update 2.3.4 with the recovery
unlocked bootloader
flashed clockworkmod recovery 3.0.2.5
installed superuser
reboot
checked if superuser app was installed successfully - yes
reboot to recovery
And to my surprise the clockworkmod recovery was gone, and I was stuck with the stock recovery again.......
How do you make the CW stick and not have it reverted to the stock recovery?
There is a script that resets it. Been like that for a while. Look in the root threads on how to make it permanent
Sent from my Nexus S
Matridom said:
There is a script that resets it. Been like that for a while. Look in the root threads on how to make it permanent
Sent from my Nexus S
Click to expand...
Click to collapse
Tried looking in the Root threads, but can't find the solution, the funny thing is that I never had this before, only started after updating to 2.3.4.
There's a file in the system's /etc folder named install-recovery.sh. You need Root Explorer to rename it in order to prevent further installs. Mount the "etc" directory as writable using Root Explorer and rename the file (to for example: install-revocery.sh.old).
This will prevent the stock recovery from being installed in the future...
pullermann said:
There's a file in the system's /etc folder named install-recovery.sh. You need Root Explorer to rename it in order to prevent further installs. Mount the "etc" directory as writable using Root Explorer and rename the file (to for example: install-revocery.sh.old).
This will prevent the stock recovery from being installed in the future...
Click to expand...
Click to collapse
Yep. Also if you use this method you will still have to flash CWM one more time after you do what this poster says (the script runs when the phone boots) .
Sent from my Nexus S using XDA App
I had same problem..it worked for me..now should I back up that Tom so I don't gotta do it again??
Sent from my Nexus S using XDA App
pullermann said:
There's a file in the system's /etc folder named install-recovery.sh. You need Root Explorer to rename it in order to prevent further installs. Mount the "etc" directory as writable using Root Explorer and rename the file (to for example: install-revocery.sh.old).
This will prevent the stock recovery from being installed in the future...
Click to expand...
Click to collapse
Thanks for the solution, I did what you described, and things are working now
You just saved me a lot of frustration........
RISHI-O said:
Thanks for the solution, I did what you described, and things are working now
You just saved me a lot of frustration........
Click to expand...
Click to collapse
Guides for rooting had the solution for this problem.Dont frustrate just search )
Sent from my Desire HD using Tapatalk

CWM not sticking on 9020a after official 4.0.4

I can flash it, it works as it should until I reboot the phone. Once I reboot, the stock recovery comes back. Ive seen threads about deleting a couple files, but not sure if I should be doing that. any ideas on what I may be doing wrong?
blackhemi4x4 said:
I can flash it, it works as it should until I reboot the phone. Once I reboot, the stock recovery comes back. Ive seen threads about deleting a couple files, but not sure if I should be doing that. any ideas on what I may be doing wrong?
Click to expand...
Click to collapse
Stock restores the install-recovery.sh file in /system/etc. This prevents recover mods from "sticking." After you root, load up your favorite root file explorer and delete/rename that file in /system/etc/ . Then, reflash recovery and you're golden.
belyle said:
Stock restores the install-recovery.sh file in /system/etc. This prevents recover mods from "sticking." After you root, load up your favorite root file explorer and delete/rename that file in /system/etc/ . Then, reflash recovery and you're golden.
Click to expand...
Click to collapse
Thanks
Just tried that, but my root explorer is not allowing write access.
Flashed superuser again, same thing....
I starting from scratch again, 4.0.4 is getting installed as I type.
Ill try rooting again and getting my root explorer to delete that file and try again
for some reason my cwm recovery is sticking and its causing my play store to stay on 3.4.7
Any ideas on why the recovery is sticking I didn't even touch the install-recovery.sh
Infact all I did was get the stock image from google flash that
then flash cwm to gain root and install superuser
after that my stock recovery just won't come back, any ideas?
Flash the newest version of su.zip
albundy2010 said:
Flash the newest version of su.zip
Click to expand...
Click to collapse
I got the latest version 3.0.7 it still won't work, I've tried so many different methods including manually flashing the stock recovery but that doesn't help with updating the play store either
---------- Post added at 04:36 PM ---------- Previous post was at 04:35 PM ----------
blackhemi4x4 said:
Thanks
Just tried that, but my root explorer is not allowing write access.
Flashed superuser again, same thing....
I starting from scratch again, 4.0.4 is getting installed as I type.
Ill try rooting again and getting my root explorer to delete that file and try again
Click to expand...
Click to collapse
to allow write access you just have to press "remount as R/W" in Root Explorer
There are different versions of 3.0.7. You should have efghi version.
Also as the other poster said you have to use root explorer the correct way if you're not doing so.
Thanks, its the little things that get me. I had the wrong 3.0.7. Got the efghi and all problems solved. time for a nandroid and mod this thing.
Is there a working circle bat mod for stock 404
Same issue
I had the same issue when I upgraded to 4.0.4.
I used the ADB shell to remount \system as R/W and was then able to rename my install-recovery.sh. After that I installed CWM and it sticks properly.
just download ROM manager from the market and install the newest CWM from the manager, it will stick. That's how I got it to stick
PhoenixIce22 said:
I had the same issue when I upgraded to 4.0.4.
I used the ADB shell to remount \system as R/W and was then able to rename my install-recovery.sh. After that I installed CWM and it sticks properly.
Click to expand...
Click to collapse
I had the same issue, rename the install-recovery.sh and manage to get CWM to stick.
Here's a fix recovery.zip just flash in cwm and it will stick.http://db.tt/B1vOd9K4 I didn't make it, just sharing it.

root 4.2.2. without flashing customer recovery

Good morning guys,
I see a lot of threads here about rooting 4.2.2, but in all of them it is recommended to root the phone by installing zip archive from a custom recovery.
I don't want to change stock recovery - is there any way to root it by flashing img from adb? I did it in this way on 4.2.1, by installing CF-Auto-Root-mako-occam-nexus4.img file from adb.
Can anyone advice how to get root without flashing custom recovery?
I have to ask,....why would you NOT want a custom recovery? What is the point in using a crippled stick recovery?
From my Evo LTE, yup.
Look at this How to thread in the general section, I copied and pasted relevant information. I kept a custom recovery and didn't try this method, but it says it will not flash a custom recovery.
E. Optional -- Root
If you want to get root access follow the steps below. (And no, this will not flash a custom recovery, and not, it will not make you "not stock".) Unlocked bootloader required. See steps above.
1) Download (to your computer) the latest version of CWM (from here) or TWRP (from here) for your device;
2) Rename the file to customrecovery.img, and make sure it is in the same directory as your fastboot.exe file;
3) Download (to /sdcard on your device) the latest version of either ChainsDD's Superuser (not currently working), or Chainfire's SuperSU;
4) Restart your device in fastboot mode and plug into computer;
5) Open a command prompt in the directory mentioned above and type: fastboot boot customrecovery.img
6) Wait for it to boot;
7) Navigate the menus the recovery menu on your device and select an option like "update zip from sdcard". Find the zip that you downloaded, and apply it.
8) Reboot. Done.
You can flash custom recovery via fastboot, use it to install su.zip and when you will choose restart after that, you will have question about you want custom recovery permanently or not, if you choose no then after restart you will have stock recovery
scottspa74 said:
I have to ask,....why would you NOT want a custom recovery? What is the point in using a crippled stick recovery?
From my Evo LTE, yup.
Click to expand...
Click to collapse
I want to make installing of future OTA as simple as possible. So I will get root and freeze all the system apps i don't want to be run, but when OTA comes I will be able to install it and will not receive any error messages which i had during this OTA.
It seems like this is a good solution:
5) Open a command prompt in the directory mentioned above and type: fastboot boot customrecovery.img
Click to expand...
Click to collapse
Do i understand correctly that this boots customer recovery on my phone from PC hard drive, but doesn't flash it to the phone? So, I'm able to install root.zip from it, but when i reboot the phone I don't have a custom recovery.
You can do as i mentioned in my post before or you can use as well command mentioned by ketjr81: fastboot boot nameofrecovery.img in both cases you will have had stock recovery after restart
Thank you guys, you have solved my issue. Now i have to find a ZIP with root to flash.
fatum2002 said:
Thank you guys, you have solved my issue. Now i have to find a ZIP with root to flash.
Click to expand...
Click to collapse
you find it in thread mentioned by ketjr81

[Q] No access to recovery

Hello,
I plan to install a custom rom, and for that I followed all the tutorials on the web without success.
Using Acer recovery install, whatever the chosen recovery I get the error "recovery verified failed", and flashing the stock 4.03 recovery I have bugdroid lying.
Using AfterOta, it freezes at step 3/5 and Blackthund3r, it stuck stage two..
I have a bootloader and ICS 4.0.3 OTA maj.
If someone has an idea, I'd be grateful
Thanks !
babysugar said:
Hello,
I plan to install a custom rom, and for that I followed all the tutorials on the web without success.
Using Acer recovery install, whatever the chosen recovery I get the error "recovery verified failed", and flashing the stock 4.03 recovery I have bugdroid lying.
Using AfterOta, it freezes at step 3/5 and Blackthund3r, it stuck stage two..
I have a bootloader and ICS 4.0.3 OTA maj.
If someone has an idea, I'd be grateful
Thanks !
Click to expand...
Click to collapse
Rooted?
Yes? use AcerRI to install any recovery.
Download thor200240/digetx CWM 1.7.3.zip here
Copy zip to SD card
Reboot to recover.
Install from zip file > Choose file from SD Card
Select the zip and install.
Reboot to recover if u see CWM 1.7.3 ur set.
Full Backup
Save your cpuid (In your CWM folder on your sd card inside the backup files u just made. Should be a text file named uid.txt or cpuid.txt.)
Copy any compatible rom onto your SD card
Wipe data, cache and dalvik
Flash your rom the same way u installed the .zip file.
Thank you for your response.
Yes, I'm rooted and I already tried Acer Recovery Install without success...
I get "recovery verified failed" (in red)...
tried all the recoveries in ARI?
use adb to install the zip then.
shadowmikeshadow said:
tried all the recoveries in ARI?
use adb to install the zip then.
Click to expand...
Click to collapse
I tried all the recovery... And I don't know how to use adb :s can you quickly explain ?
use the platformer tool link below to use adb so u dont need sdk.
Follow instructions on platformer tool download page to set up your adb
open command prompt and navigate to your platformer
cmd commands:
view available directories: dir
change directory: cd (cd desktop (forward directory example) / cd .. (up directory example))
Use this guide to install with adb
cwm: here
platformer: here
Ok, I'll try later because I can't now and I tell you !
Thanks !!
make sure your rooted too, that could be causing the issue with ari..
download root checker from play store its free
shadowmikeshadow said:
make sure your rooted too, that could be causing the issue with ari..
download root checker from play store its free
Click to expand...
Click to collapse
I already checked, I'm rooted
Having the same issue.
I will also look into adb tool because I'm in the same boat. I did pretty much the same thing and am also stuck with the same error message and can't access the Recovery mode.
shadowmikeshadow said:
make sure your rooted too, that could be causing the issue with ari..
download root checker from play store its free
Click to expand...
Click to collapse
I don't understand.
I put the recovery on sdcard with adb, and next ? How should I install it ?
Follow this guide here
but use the recovery from the zip in earlier post.

Enable SU4TL-49 Stock Tethering + Back to Stock for OTA

DISCLAIMER - It usually goes without saying, but if you screw up your phone, don't blame me, blame yourself. I am not responsible for data loss, bricking, etc. As always, back up your data before doing anything.
As has already been mentioned by @jcase and @TheSt33v, taking the OTA will not affect an unlocked bootloader. However, unless you have a pure stock system partition, the OTA will not install. These instructions will work only if you're on a slightly modified stock SU4TL-44 ROM. If you're on another ROM (CM12/13, etc), you can follow the instructions posted in TheSt33v's thread.
Step 0: (optional, not tested, may not work) If you've installed xposed, uninstall any modules and flash the uninstaller located here through TWRP. More uninstall info may be found here.
Step 1: If rooted, use the SuperSU app to fully unroot, then reboot.
Step 2: Flash SU4TL-44_Tether_Stock_Restore.zip from TWRP. (restores build.prop to stock).
Step 3: Flash stock recovery through fastboot.
Step 4: Take OTA
Step 5: Flash TWRP through fastboot.
Step 6: Flash SU4TL-49_Tether_Enable.zip through TWRP
Done!
If you're going to do a full system restore via the xml (curtesy of @Tomsgt, aka RootJunky), after you've done so you can begin at step 4. Just make sure you backup all your data (downloads, photos, etc). I'm in no way responsible for anything you may inadvertently do to your phone!
And as a refresher, for those who may not remember how to flash a recovery. Just make sure both the fastboot executable and the recovery.img file are in the same folder
Windows
Code:
fastboot flash recovery file_name.img
Mac/Linux
Code:
./fastboot flash recovery file_name.img
I've also included the SU4TL-49 restore file for anyone who wants it. This simply reverts back to the stock build.prop
Alternatively, you can install the stock recovery image through TWRP by selecting Install, selecting Install Image, selecting the stock recovery image file that you've downloaded and selecting recovery.
Also, this flashable zip will get you back to 100% SU4TL-44 stock (except for the recovery menu. It doesn't touch that) and not wipe any of your data: http://forum.xda-developers.com/droid-turbo/development/rom-su4tl-44-100-stock-t3320815
TheSt33v said:
Alternatively, you can install the stock recovery image through TWRP by selecting Install, selecting Install Image, selecting the stock recovery image file that you've downloaded and selecting recovery.
Click to expand...
Click to collapse
I had no idea you could flash the stock recovery from within TWRP. It never fails, you learn something new every day.
Sent from my XT1254 using XDA-Developers mobile app
If I have already taken the OTA update and re-rooted my phone with SuperSU, would I be able to simply flash TWRP an then the SU4TL-49_Tether_Enable.zip? Or would I have to disable root first.
Thanks
iloveamp said:
If I have already taken the OTA update and re-rooted my phone with SuperSU, would I be able to simply flash TWRP an then the SU4TL-49_Tether_Enable.zip? Or would I have to disable root first.
Thanks
Click to expand...
Click to collapse
This mod does not require root, just an unlocked bootloader so you can flash TWRP, then install the patch through TWRP.
And if you're rooted, you can install TWRP via Flashing.
I'm sorry I'm new here, but could this method work on this [ROM][6.0.1][Stock][Odexed]MPG24.107-70.2 Brazilian 6.0.1 for XT1254[TWRP Flashable] ROM? thanks.

Categories

Resources