1. Download our Official Android App: Forums for Android!

Support Recovery mode broken

Discussion in 'Android Devices' started by SeTec7, Dec 20, 2014.

  1. SeTec7

    SeTec7 Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    6
    Joined:
    Dec 20, 2014

    Dec 20, 2014
    6
    0
    15
    Male
    Hi all,

    I've been having some problems with my Nexus 5 accepting the 5.0.1 OTA update, and I'm a decent ways down the rabbit hole.
    Right now my problem is that I seem to have broken recovery mode. When my phone has the 5.0 stock recovery.img loaded, I get a "No command" error when I try to boot into recovery mode. When I load latest TWRP, I get the TeamWin loading screen, then the phone reboots normally.

    At this point, my goal is to just get the phone restored to stock 5.0, and updated to 5.0.1, preferably without losing user data. The phone is unlocked, and was previously rooted for 4.x, and I re-rooted after 5.0 was applied by using this guide:
    http://www.ibtimes.co.uk/how-root-n...ainfires-supersu-fix-modified-kernels-1471004

    If I could get stock recovery working, I think I could sideload the 5.0.1 OTA update, but something I did seems to have broken all my recovery options, and I have no idea what I did, nor how to fix it.

    Any help is greatly appreciated, thanks!
     

    Advertisement

  2. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    37,292
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    37,292
    36,036
    4,238
    Male
    IT
    Pennsylvania
    Just flash the factory images for both recovery and 5.01 and you should be golden.

    You can read up on it and get the image files here ...
    Factory Images for Nexus Devices

    Just remember you will need the latest versions of fastboot and adb or you might get some failures.
     
  3. SeTec7

    SeTec7 Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    6
    Joined:
    Dec 20, 2014

    Dec 20, 2014
    6
    0
    15
    Male
    I've been using the 5.0 factory image from that page to try to restore my recovery partition. I extracted recovery.img from the zip file and did a fastboot flash recovery recovery.img, and that's when it stopped working.

    I'm reluctant to run the flash-all script, since it runs fastboot -w update image-hammerhead-lrx21o.zip, which will wipe all my userdata.
     
  4. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    37,292
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    37,292
    36,036
    4,238
    Male
    IT
    Pennsylvania
    Do you have the latest fastboot? That might be your problem right there.
     
  5. SeTec7

    SeTec7 Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    6
    Joined:
    Dec 20, 2014

    Dec 20, 2014
    6
    0
    15
    Male
    I've been fiddling with it and after doing a flash back to stock images of recovery, boot, *and* cache (never flashed cache before), the stock recovery mode is loading now.

    Now my problem is that my Windows system doesn't think it has drivers for the recovery mode, so I can't adb sideload to it. Some Googling has found a few other people reporting issues with the driver, so it's probably not just me.
    I'm going to let the system try another OTA update and see if it works now that recovery is working again.

    Nope...it starts to update, then reports "Error".
     
  6. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    37,292
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    37,292
    36,036
    4,238
    Male
    IT
    Pennsylvania
    Windows 8.x?
     
  7. thisISjoel

    thisISjoel Android Enthusiast
    Rank:
    None
    Points:
    68
    Posts:
    412
    Joined:
    Feb 16, 2014

    Feb 16, 2014
    412
    119
    68
    Sydney
    Just manually flash all the images except user data, that's what I did to get 5.0.1
     
  8. SeTec7

    SeTec7 Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    6
    Joined:
    Dec 20, 2014

    Dec 20, 2014
    6
    0
    15
    Male
    Windows 7, 64-bit.
     
  9. lunatic59

    lunatic59 Moderati ergo sum
    Moderator
    Rank:
     #2
    Points:
    4,238
    Posts:
    37,292
    Joined:
    Jun 12, 2010

    Jun 12, 2010
    37,292
    36,036
    4,238
    Male
    IT
    Pennsylvania
    That's odd. The windows 7 drivers don't generally cause an issue. Have you tried removing them and reinstalling the generic Google drivers?
     
  10. SeTec7

    SeTec7 Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    6
    Joined:
    Dec 20, 2014

    Dec 20, 2014
    6
    0
    15
    Male
    Okay, I found out something interesting. Apparently my cache is getting corrupted when I try the OTA update. After my last post yesterday, I had to put this issue aside, and did no more work on my phone, but did try the OTA update just in case (it failed shortly after loading, as before). Today, when I went to boot into recovery mode to test this driver issue, I got "No Command" error from recovery mode, which was what happened when I made this post. I re-flashed cache from the stock 5.0 cache.img, and recovery works again. So, at least we know what's breaking my recovery mode. I wonder if the OTA update is completing it's cache install, but failing something later and not cleaning up.

    Anyway, back to the driver issue, I last played with drivers when I first started rooting my phone, over a year ago, but I'm pretty sure I used the official Google ones from the SDK. Yesterday, I downloaded the latest version of the SDK, and got the latest adb/fastboot and drivers. When I put the phone in sideload mode, Windows registers an "AOSP on HammerHead" device that is unknown. When I point it at the drivers from the latest SDK, it tells me that there's no matching drivers. If I try to manually pick a driver for "Android devices", I can pick from "Android ADB Interface", "Android Bootloader Interface", and "Android Composite ADB Interface".
    Just on a hunch I tried forcing it to Android ADB Interface, and it seems to have worked, I can now see it on adb devices.

    So now I sideload in the 5.0.1 OTA update, and it gets past Verifying Update to Installing Update and errors out when "Verifying current system" saying:
    "/system/bin/install-recovery.sh" has unexpected contents.

    Google found me this thread, which seems to indicate that something I did when re-rooting 5.0 may have caused this:
    http://forum.xda-developers.com/nex...0-1-update-t2972371/post57599552#post57599552

    The fix seems to be to re-flash the stock 5.0 system.img. Is that going to affect my userdata in any way? I assume "fastboot flash system system.img" is the way to go?
     
  11. xdrc45

    xdrc45 Android Enthusiast
    Rank:
    None
    Points:
    173
    Posts:
    739
    Joined:
    Jun 21, 2012

    Jun 21, 2012
    739
    586
    173
    Male
    Great White, MI
    Yes, fastboot flashing only the System.img will not wipe your internal storage, it will wipe the current installed systems OS that's on the device.
    Flashing the userdata.img is what wipes the internal storage or flashing the flashall.bat will wipe the internal storage as well unless you remove the "-w" from the userdata script.

    When your connected to adb in recovery mode, and type "adb devices" it will show you any devices connected in adb by a serial number, even in recovery.
    Boot to recovery, open command prompt and type -

    adb devices
    Serial # of device recovery

    It will then list any devices connected to your PC in adb mode, show the devices serial number and display that the device is in recovery mode.

    As stated above by thisISjoel, I would try and manually flash each img file separately (except for userdata.img)

    Are you on the stock 5.0 recovery. img or are you on a custom recovery like TWRP?
    Starting will 5.0+ lollipop, for the OTA to be sideloaded, the device needs to be on completely stock recovery, it cannot be sideloaded through a custom recovery.
    Also there cannot be any changes or mods to the system at all or the OTA will fail.
     
  12. SeTec7

    SeTec7 Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    6
    Joined:
    Dec 20, 2014

    Dec 20, 2014
    6
    0
    15
    Male
    Alright, I flashed system.img back to 5.0 and the OTA is successfully installing on my Nexus 5 now.

    I was on TWRP, but reverted to stock recovery when first running into this problem. See my previous post about stock recovery not working because of problems with my cache partition (??)

    I don't *need* to be rooted for any particular reason, so I can wait until the community figures out how to make OTA updating in the 5.x world work with TWRP/SuperSU/etc.

    Thanks so much for all the help, this has been quite enlightening, and I feel much better about being able to hack/fix/diagnose Android in the future.
    Forgive my verbose responses, I wanted to have everything laid out in case someone else has this problem. I know how it feels to be this guy: http://xkcd.com/979/
     
  13. GrenW

    GrenW Android Expert
    Rank:
    None
    Points:
    93
    Posts:
    799
    Joined:
    Apr 16, 2010

    Apr 16, 2010
    799
    130
    93
    UK
    TWRP works fine. Just don't use the latest version. Install version 2.8.1.0 and it will work. The latest version for many people just reboots straight into system rather than recovery.
     
Tags:

Share This Page

Loading...