[REF][How To] Return to STOCK Recovery (IF rooted) and sideload OTA

Search This thread

KidJoe

Inactive Recognized Contributor
Aug 23, 2008
3,208
1,560
Thorndale/Romansville, PA
By now, with all the OTA's, unless you are brand new to the 2013 X, you know you have to have stock recovery on your phone for an OTA Update or Soak Test to install, and your system can't be modified too much or it will fail the pre-flash validation checks built into the OTA.zip. (i.e. there is a manifest file that checks for specific files and their check sums before it will flash the ota).

If you have an unlocked bootloader, and rooted by flashing a 3rd party recovery (like TWRP, CWM, Philz, etc) and installing SuperSU, you likely didn't put stock recovery back on your phone.

IF you are close enough to stock (like I am... stock, unlocked, rooted, with adfree, wifi tether for root, greenify, Quick boot, and a few other apps that require root), you can just flash stock recovery and take the OTA.

The steps in this post help you do that, or get ready to do that, in case you are not near your PC when an OTA comes, of if you just don't want to use your PC.

NOTE: If you have changed too much of stock that the OTA fails, please see -> [FAQ] How to prepare for and take an OTA update (All Carriers)

NOTE: the following worked when updating 4.4 to 4.4.2, and 4.4.2 to 4.4.4 on my VZW Dev Edition X. Since Lollipop has not yet been released for my phone, I can't test this yet.

Note: If you have flashed your phone with another carrier's ROM, or have only flashed "parts" of your phone, these steps may not work!! Or they may cause you to brick!
NOTE: If your Bootloader version does NOT match the one for your phone's software version, taking an OTA could brick your phone!

You must have an Unlocked Bootloader and be rooted for these steps to work:

Obtain the STOCK Moto Recovery image, and TWRP image, for your phone:

  1. On you phone, go App Drawer -> Settings... Make note of what is listed under System Version, and Android Version.
  2. Visit one of the sites listed in -> http://forum.xda-developers.com/moto-x/general/info-tip-web-sites-official-leaked-roms-t2923347 and obtain the EXACT same ROM/SBF file that is currently on your phone. Download the ZIP to your PC.
  3. Unzip or extract the RECOVERY.IMG file from the SBF ZIP file.
  4. Download the latest TWRP Recovery from -> http://teamw.in/project/twrp2/234 (under the Download-Fastboot heading)
  5. the latest SuperSU from -> http://download.chainfire.eu/supersu or the latest CWM / TWRP / MobileODIN installable ZIP from http://forum.xda-developers.com/showthread.php?t=1538053

Flashing Recovery
  1. Place your stock recovery.img, the latest TWRP img, and the latest SuperSU.zip in your phone's DOWNLOAD folder.
  2. Install Rashr.
  3. On your phone, launch Rashr.
  4. Scroll down and select other from storage
  5. Browse and select your stock recovery
  6. When it completes, pick the option to reboot to stock recovery.
  7. Your device should reboot and display the Motorola logo and then the Android in distress (logo with Exclamation mark)
    Press and hold the VOL UP key for 10-15 seconds. While still holding the VOL UP key tap and release the POWER key. You should be in Stock recovery now.
  8. Reboot your phone as normal.
To reflash TWRP or other custom recovery, as long as you are still rooted, you can repeat the same steps, selecting your custom recovery in step 5.

How to SIDE LOAD an OTA.ZIP via this process

If your carrier has started the push of the OTA ZIP for your phone, but you haven't received it, and you've found the correct OTA ZIP posted online and would like to flash it, the following steps can be used...
  1. Download the OTA ZIP file (usually named as BLUR_XXX.XXX.XXX.zip, where XXX.XXX.XXX is the build number the ZIP will update) to your phone's /SDCard
  2. Perform steps 1-7 under Flashing Recovery above to flash STOCK recovery onto your phone, and reboot into Stock Recovery.
  3. Use the Vol Down key to scroll to Apply Update From SDCard, and press the Power key to select.
  4. Use Vol Down key to scroll to your OTA zip file, and press Power to select.
  5. The install will begin by verifying the update package, then verifying files on your phone match.
  6. If the install fails, it will be reported on the screen, along with why. (usually because you have modified system files, or are not on the correct ROM version). You need to fix these errors and try again.
  7. If verifications are successful, the patching process steps will begin. This may take several minutes.
  8. Your phone should report Script Succeeded and Install from sdcard Complete.
  9. Ensure Reboot System Now is highlighted, and press the Power key to reboot the phone.
  10. The initial reboot may take longer than a regular reboot.
    Note: You will see Android Is Upgrading or Optimizing screen during the boot process, that is normal.
  11. After the update install process is complete, use Rashr to flash TWRP (again, other from storage and pick your TWRP). When prompted, reboot into recovery (so twrp sticks). When in TWRP, select reboot to system.
If you lost root, reboot into TWRP recovery and install SuperSU.zip

How to Root with unlocked bootloader...

If you unlocked your bootload by getting the code from Moto, after taking the OTA you may root by following ->http://forum.xda-developers.com/moto-x/general/how-to-how-to-root-5-1-unlocked-t3140217 NOTE: while the thread is titled for 5.1, it works on older Android versions as well.
 
Last edited:

ks73417

Senior Member
Jan 1, 2011
62
6
Atlanta, GA
Good post. Can I use the same process on MotoX 2014 pure? I have turned Moto OTA to get rid of constant "update available" notification, if I turn that back on, do you know where the OTA zip file is downloaded (i'm thinking cache )
 

KidJoe

Inactive Recognized Contributor
Aug 23, 2008
3,208
1,560
Thorndale/Romansville, PA
Good post. Can I use the same process on MotoX 2014 pure? I have turned Moto OTA to get rid of constant "update available" notification, if I turn that back on, do you know where the OTA zip file is downloaded (i'm thinking cache )

Yes, the OTA zip is usually stored in /cache (at least is is on the 2013 X, and my past Moto phones). it is usually named for the rom it is upgrading, not what the upgrade takes you to.

I don't see why this wont work on the 2014 X, as it did on older motos too.
 
  • Like
Reactions: ajsonofgod

ajsonofgod

Senior Member
Mar 18, 2015
263
24
28
Bhopal
Brother i got Motorola updates services update today. I will try your method once there will be available ota. And can you tell me how to backup my whole rom?

Sent from my XT1052 using XDA Free mobile app
 

KidJoe

Inactive Recognized Contributor
Aug 23, 2008
3,208
1,560
Thorndale/Romansville, PA
Brother i got Motorola updates services update today. I will try your method once there will be available ota. And can you tell me how to backup my whole rom?

Sent from my XT1052 using XDA Free mobile app
In TWRP you can make a nandroid backup. I've never done it. I haven't had need because I run stock. If I need to reflash, I just reflash the same SBF I've been running.
 
  • Like
Reactions: ajsonofgod

ejlmd

Senior Member
Jan 11, 2009
238
33
Northern New Jersey
I followed the instructions in the OP to return to stock recovery, then applied the OTA update Blur_Version.213.44.1.ghost_row.Retail.en.US, but am failing with this message
/system/etc/install-recovery.sh has unexpected contents
I haven't knowingly modified any system files, although I am rooted. Any thoughts about what this error might mean and how to resolve it?
 

KidJoe

Inactive Recognized Contributor
Aug 23, 2008
3,208
1,560
Thorndale/Romansville, PA
I followed the instructions in the OP to return to stock recovery, then applied the OTA update Blur_Version.213.44.1.ghost_row.Retail.en.US, but am failing with this message
/system/etc/install-recovery.sh has unexpected contents
I haven't knowingly modified any system files, although I am rooted. Any thoughts about what this error might mean and how to resolve it?
What ROM is on you phone to start with? On your phone go App Drawer -> Settings -> About.. tell me the Android Version, System Version and Build Number. Also what model X do you have?

213.44.1.ghost_row.Retail.en.US is an XT1053 4.4.4 update file for the XT1053 if I'm not mistaken. It is meant to be applied to a 4.4.3 stock rom, and it might apply to a 4.4.2 stock rom..

The OTA file will fail its pre-flash validation checks if you are not on the intended stock rom.
 
  • Like
Reactions: ejlmd

ejlmd

Senior Member
Jan 11, 2009
238
33
Northern New Jersey
What ROM is on you phone to start with? On your phone go App Drawer -> Settings -> About.. tell me the Android Version, System Version and Build Number. Also what model X do you have?

213.44.1.ghost_row.Retail.en.US is an XT1053 4.4.4 update file for the XT1053 if I'm not mistaken. It is meant to be applied to a 4.4.3 stock rom, and it might apply to a 4.4.2 stock rom..

The OTA file will fail its pre-flash validation checks if you are not on the intended stock rom.

Thank you. I'm embarrassed that I didn't perform sufficient due diligence. I am already on the same system version as the update (213.44.1.ghost_row.Retail.en.US ), which I mistakenly thought was to get to Lollipop from 4.4.4.
 
  • Like
Reactions: Casteleugim

KidJoe

Inactive Recognized Contributor
Aug 23, 2008
3,208
1,560
Thorndale/Romansville, PA
Thank you. I'm embarrassed that I didn't perform sufficient due diligence. I am already on the same system version as the update (213.44.1.ghost_row.Retail.en.US ), which I mistakenly thought was to get to Lollipop from 4.4.4.
Yeah, OTA Update files are often named including the version the phone must be on, not the version it takes the phone to.
 

Smash2Bash

Senior Member
Sep 10, 2012
500
147
Cleveland
Do I need to uninstall xPosed & GravityBox before I sideload L ? I guess, Kitkat version of xposed worn't work in L anyway.
It's ABSOLUTELY BEST you avoid the update............but....

If you can't, it is highly recommended that you clean flash it...kind of the only choice. Flash the 4.4.4 Brazilian stock ROM. And install the update from recovery. You can reroot after adding TWRP back.
 

ajsonofgod

Senior Member
Mar 18, 2015
263
24
28
Bhopal
I am also on stock rom 4.4.4. But i dont have this rom on my pc for reflashing. Please provide link for download or some info related to it

Sent from my XT1052 using XDA Free mobile app
 

KidJoe

Inactive Recognized Contributor
Aug 23, 2008
3,208
1,560
Thorndale/Romansville, PA
Do I need to uninstall xPosed & GravityBox before I sideload L ? I guess, Kitkat version of xposed worn't work in L anyway.
As explained elsewhere... Xposed makes changes to /system which cause OTA updates to fail their pre-flash validation checks.

It is recommended to boot to TWRP and install /SDcard/Android/data/de.robv.android.xposed.installer/files/Xposed-Disable-Recovery.zip then uninstall XPosed.

You will also need to undo any changes to /system or other parts the the OTA tries to validate before installing, or else it will fail.

You are correct that a newer version of Xposed is needed.

You may also want to wait on trying the 5.0.2 Leaks because if they are an early limited early test version, rather than a soak which is nearly ready to be pushed to all, you could be stuck on this version until an SBF leaks.
 
  • Like
Reactions: azu89 and robertocd

agus1105

New member
Sep 30, 2014
1
0
Update

Does anyone know how to return to stock recovery for lollipop? New update came up today but I have TWRP.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    By now, with all the OTA's, unless you are brand new to the 2013 X, you know you have to have stock recovery on your phone for an OTA Update or Soak Test to install, and your system can't be modified too much or it will fail the pre-flash validation checks built into the OTA.zip. (i.e. there is a manifest file that checks for specific files and their check sums before it will flash the ota).

    If you have an unlocked bootloader, and rooted by flashing a 3rd party recovery (like TWRP, CWM, Philz, etc) and installing SuperSU, you likely didn't put stock recovery back on your phone.

    IF you are close enough to stock (like I am... stock, unlocked, rooted, with adfree, wifi tether for root, greenify, Quick boot, and a few other apps that require root), you can just flash stock recovery and take the OTA.

    The steps in this post help you do that, or get ready to do that, in case you are not near your PC when an OTA comes, of if you just don't want to use your PC.

    NOTE: If you have changed too much of stock that the OTA fails, please see -> [FAQ] How to prepare for and take an OTA update (All Carriers)

    NOTE: the following worked when updating 4.4 to 4.4.2, and 4.4.2 to 4.4.4 on my VZW Dev Edition X. Since Lollipop has not yet been released for my phone, I can't test this yet.

    Note: If you have flashed your phone with another carrier's ROM, or have only flashed "parts" of your phone, these steps may not work!! Or they may cause you to brick!
    NOTE: If your Bootloader version does NOT match the one for your phone's software version, taking an OTA could brick your phone!

    You must have an Unlocked Bootloader and be rooted for these steps to work:

    Obtain the STOCK Moto Recovery image, and TWRP image, for your phone:

    1. On you phone, go App Drawer -> Settings... Make note of what is listed under System Version, and Android Version.
    2. Visit one of the sites listed in -> http://forum.xda-developers.com/moto-x/general/info-tip-web-sites-official-leaked-roms-t2923347 and obtain the EXACT same ROM/SBF file that is currently on your phone. Download the ZIP to your PC.
    3. Unzip or extract the RECOVERY.IMG file from the SBF ZIP file.
    4. Download the latest TWRP Recovery from -> http://teamw.in/project/twrp2/234 (under the Download-Fastboot heading)
    5. the latest SuperSU from -> http://download.chainfire.eu/supersu or the latest CWM / TWRP / MobileODIN installable ZIP from http://forum.xda-developers.com/showthread.php?t=1538053

    Flashing Recovery
    1. Place your stock recovery.img, the latest TWRP img, and the latest SuperSU.zip in your phone's DOWNLOAD folder.
    2. Install Rashr.
    3. On your phone, launch Rashr.
    4. Scroll down and select other from storage
    5. Browse and select your stock recovery
    6. When it completes, pick the option to reboot to stock recovery.
    7. Your device should reboot and display the Motorola logo and then the Android in distress (logo with Exclamation mark)
      Press and hold the VOL UP key for 10-15 seconds. While still holding the VOL UP key tap and release the POWER key. You should be in Stock recovery now.
    8. Reboot your phone as normal.
    To reflash TWRP or other custom recovery, as long as you are still rooted, you can repeat the same steps, selecting your custom recovery in step 5.

    How to SIDE LOAD an OTA.ZIP via this process

    If your carrier has started the push of the OTA ZIP for your phone, but you haven't received it, and you've found the correct OTA ZIP posted online and would like to flash it, the following steps can be used...
    1. Download the OTA ZIP file (usually named as BLUR_XXX.XXX.XXX.zip, where XXX.XXX.XXX is the build number the ZIP will update) to your phone's /SDCard
    2. Perform steps 1-7 under Flashing Recovery above to flash STOCK recovery onto your phone, and reboot into Stock Recovery.
    3. Use the Vol Down key to scroll to Apply Update From SDCard, and press the Power key to select.
    4. Use Vol Down key to scroll to your OTA zip file, and press Power to select.
    5. The install will begin by verifying the update package, then verifying files on your phone match.
    6. If the install fails, it will be reported on the screen, along with why. (usually because you have modified system files, or are not on the correct ROM version). You need to fix these errors and try again.
    7. If verifications are successful, the patching process steps will begin. This may take several minutes.
    8. Your phone should report Script Succeeded and Install from sdcard Complete.
    9. Ensure Reboot System Now is highlighted, and press the Power key to reboot the phone.
    10. The initial reboot may take longer than a regular reboot.
      Note: You will see Android Is Upgrading or Optimizing screen during the boot process, that is normal.
    11. After the update install process is complete, use Rashr to flash TWRP (again, other from storage and pick your TWRP). When prompted, reboot into recovery (so twrp sticks). When in TWRP, select reboot to system.
    If you lost root, reboot into TWRP recovery and install SuperSU.zip

    How to Root with unlocked bootloader...

    If you unlocked your bootload by getting the code from Moto, after taking the OTA you may root by following ->http://forum.xda-developers.com/moto-x/general/how-to-how-to-root-5-1-unlocked-t3140217 NOTE: while the thread is titled for 5.1, it works on older Android versions as well.
    3
    Thanks for the info... And can you provide the instructions to get complete stock to receive ota?

    Sent from my XT1052
    Sure, already posted the link in this thread, plus its in my signature...

    [FAQ] How to prepare for and take an OTA update (All Carriers) Hint: Post 1 explains some background and whys.. Post 2 has the hows..
    2
    What is complete stock???

    Sent from my XT1052
    Well, like you flashed TWRP, rooted, and only installed apps like Root Explorer, Wifi Tether For Root, etc.. things that use root access, but do NOT make any changes... Apps like that don't cause the OTA's pre-flash validation checks to fail.

    While BigTinCan's Adfree changes the hosts file, it too does not cause interfere with what the pre-flash validation checks.

    Once you start doing things like installing Xposed, Busybox, using Xposed modules, modifying your build.prop, DELETING "bloat", mixing parts of roms or flashing the leaks, etc.. you are no longer completely stock, or close enough to stock and the pre-flash validations will fail causing the OTA to not install... In those situations, just flashing stock recovery (what the OP is about) will NOT be enough... Hence the thread in my signature about preparing to take the OTA...

    that is why these last few posters in this thread are having issues, because they vary enough from stock which will cause more than just Stock Recovery to be flashed in order to take the OTA.
    2
    update fails? then try mfastboot system.img ...

    I had similar problem to those mentioned -i'm starting from an unlocked rooted 1053 de. I flashed back to stock recovery, then it kept 'almost' updating but reverting to 4.4.4. I was really dreading a clean reset, so on a whim I decided to go ahead and mfastboot the system to clean it up. After that, smooth sailing. I'm guessing that ANY difference from the stock system file will make the OTA error out. I have never used Xposed, but did have adblock which I think made minor additions to the system folder. anyway, this worked for me so i wanted to share. good luck!
    2
    Do I need to uninstall xPosed & GravityBox before I sideload L ? I guess, Kitkat version of xposed worn't work in L anyway.
    As explained elsewhere... Xposed makes changes to /system which cause OTA updates to fail their pre-flash validation checks.

    It is recommended to boot to TWRP and install /SDcard/Android/data/de.robv.android.xposed.installer/files/Xposed-Disable-Recovery.zip then uninstall XPosed.

    You will also need to undo any changes to /system or other parts the the OTA tries to validate before installing, or else it will fail.

    You are correct that a newer version of Xposed is needed.

    You may also want to wait on trying the 5.0.2 Leaks because if they are an early limited early test version, rather than a soak which is nearly ready to be pushed to all, you could be stuck on this version until an SBF leaks.