• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Recovery mode broken

SeTec7

Lurker
Dec 20, 2014
6
0
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!
 
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.
 
Upvote 0
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".
 
Upvote 0
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?
 
Upvote 0
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.
 
Upvote 0
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/
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones