[How-To] [Windows] Download and Flash Android 5.0 and Reroot & Recovery

spc_hicks09

Recognized Contributor
Jan 23, 2011
3,899
1,857
0
Marion, OH
www.facebook.com



NOTE: You need to be bootloader unlocked in order to flash a factory image!



Download the Lollipop Factory Image from here
https://dl.google.com/dl/android/aosp/hammerhead-lrx21o-factory-01315e08.tgz

Save the factory image to your desktop (easiest to find).

Extract the file using WinRAR, 7zip, Winzip or whatever you prefer for extracting files.

Boot your N5 into the bootloader. (Power off then press and hold Volume Down and Power Button)

Connect your phone to your PC.

Inside the folder of the factory image, double click the "flash-all.bat" NOTE: THIS WILL WIPE DATA AND INTERNAL STORAGE!!!

Wait for the command prompt to prompt you to "click any key to exit." Meaning it's finished.

First boot may take up to 10 minutes.



Download Chainfire's AutoRoot from here:
http://download.chainfire.eu/363/CF-Root/CF-Auto-Root/CF-Auto-Root-hammerhead-hammerhead-nexus5.zip

Extract zip to desktop

Ensure that you are in the bootloader and connect your phone to your PC.

Open the Auto Root folder and double click the "Root-Windows.bat" and let it run.

Phone will reboot with root, and will have SuperSU installed.


(For these steps, you must have Java installed)

Boot phone into the bootloader and connect phone to PC.

Download the adb files you need here:
http://dottech.org/downloads/adb_fastboot_and_other_tools.zip?68a68a

Extract the zip to your desktop

Download your recovery of choice. I suggest TWRP which can be found here:
http://techerrata.com/file/twrp2/hammerhead/openrecovery-twrp-2.8.1.0-hammerhead.img

Rename the recovery image to "recovery.img" and place it in the adb_fastboot_and_other_tools\adb_fastboot_and_other_tools\Android folder you just extracted.

Right click that folder and select "Open command prompt here"

In the command prompt, type the following
Code:
fastboot flash recovery recovery.img
Hit enter and let it flash recovery. You are now rooted and have TWRP installed, on Lollipop!

Note: This guide may seem a little lengthy and redundant but I posted it for a reason. This guide is broken down "barney style" for everyone out there that wants to know the EXACT steps to installing Lollipop, rerooting and reflashing recovery. This may not be the easiest or fastest method to do any of this, but it's the way I do it and it's pretty fast. If you have any questions, please post them below and I will do my best to answer them all in a timely manner. Thanks and enjoy Lollipop!!

If you do not have the Nexus 5 drivers installed, please follow the first 7 steps found here: http://www.technobuzz.net/install-nexus-5-driver-adb-fastboot-unlock-bootloader/

If I helped you out, please click the "Thanks" button to show your appreciation.


 
Last edited:

spc_hicks09

Recognized Contributor
Jan 23, 2011
3,899
1,857
0
Marion, OH
www.facebook.com
How does this differ from the sticky threads that have been up since forever?
Honestly I find most of the "sticky threads" here to be jumbled with information and may either be confusing or intimidating to newer users. This guide is broken down easier. As opposed to saying "download this zip to root." I tell them what to do with the zip as well. I clearly stated why I made a different thread at the end of this guide. I will also be a lot more active in my thread than most people are in their guides. The only way I will not respond to a question is if I physically cannot respond or I am in class.
 
Last edited:

Pyronaught

New member
Apr 2, 2008
3
2
0
I get this when running flash-all.bat

target reported max download size of 1073741824 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 1005154516 bytes
error: update package missing system.img
Press any key to exit...

After which I get the red triangle when attempting to boot to recovery, and and endless boot if I try to normal boot.
I've downloaded multiple times and multiple machines and nothing seems to work for me.
 

spc_hicks09

Recognized Contributor
Jan 23, 2011
3,899
1,857
0
Marion, OH
www.facebook.com
I get this when running flash-all.bat

target reported max download size of 1073741824 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 1005154516 bytes
error: update package missing system.img
Press any key to exit...

After which I get the red triangle when attempting to boot to recovery, and and endless boot if I try to normal boot.
I've downloaded multiple times and multiple machines and nothing seems to work for me.
When you extract the factory image file, what all files show up in that folder?

Good job and thanks for the very detailed explanations!
You're very welcome!
 

spc_hicks09

Recognized Contributor
Jan 23, 2011
3,899
1,857
0
Marion, OH
www.facebook.com
I get this when running flash-all.bat

target reported max download size of 1073741824 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 1005154516 bytes
error: update package missing system.img
Press any key to exit...

After which I get the red triangle when attempting to boot to recovery, and and endless boot if I try to normal boot.
I've downloaded multiple times and multiple machines and nothing seems to work for me.
You need to flash the files manually. Follow these steps:

Found these steps here: http://www.androidpolice.com/2014/1...-0-factory-images-heres-how-to-get-around-it/
 
  • Like
Reactions: tapukakababa

bracketologist

Senior Member
Jul 4, 2010
65
3
0
I get this when running flash-all.bat

target reported max download size of 1073741824 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 1005154516 bytes
error: update package missing system.img
Press any key to exit...

After which I get the red triangle when attempting to boot to recovery, and and endless boot if I try to normal boot.
I've downloaded multiple times and multiple machines and nothing seems to work for me.
I ran into the same problem. You'll need to extract the img files from the embedded update zip file and flash them separately. The instructions that I followed are in the following link:
http://www.androidpolice.com/2014/1...-0-factory-images-heres-how-to-get-around-it/

The bootloader and radio flashed fine before the error, so I followed the steps after that.
 
Last edited:

Pyronaught

New member
Apr 2, 2008
3
2
0
Well I'll be.
I actually followed these steps before, but it didn't change anything. So this time I decided to flash 4.4 cleanly back to it and try this process and it finally took.

Thanks for the help, and Android Police for having an article on this only a few hours after it was released.
 
  • Like
Reactions: spc_hicks09

punkmetalska

Member
Feb 3, 2012
23
2
0
So I got the "not enough memory" thing while updating to lollipop, but when I rebooted my phone, it seemed like lollipop installed just fine. Should I reflash the update?
 

spc_hicks09

Recognized Contributor
Jan 23, 2011
3,899
1,857
0
Marion, OH
www.facebook.com
So I got the "not enough memory" thing while updating to lollipop, but when I rebooted my phone, it seemed like lollipop installed just fine. Should I reflash the update?
I would suggest the same thing and just flash all the images separate. Since your phone seems fine though, I would just leave it be. Did you check the baseband and everything to make sure all the images flashed right? Check your storage too if you have the 32gb version.

Sent from my Nexus 5 using Tapatalk
 

chronostorm

Senior Member
Dec 4, 2008
131
7
0
I would suggest the same thing and just flash all the images separate. Since your phone seems fine though, I would just leave it be. Did you check the baseband and everything to make sure all the images flashed right? Check your storage too if you have the 32gb version.

Sent from my Nexus 5 using Tapatalk
I have the 32gb version and mine ended up with only 12.55 gb. How can I fix this? Should I just reflash?

[EDIT] did a quick look around. Seems like doing a factory reset should make it ok. I'll report back after that's done :)

[EDIT again] factory reset worked!
 
Last edited:
  • Like
Reactions: spc_hicks09

punkmetalska

Member
Feb 3, 2012
23
2
0
I would suggest the same thing and just flash all the images separate. Since your phone seems fine though, I would just leave it be. Did you check the baseband and everything to make sure all the images flashed right? Check your storage too if you have the 32gb version.

Sent from my Nexus 5 using Tapatalk
My baseband version is M8974A-2.0.50.2.21. Dunno if that's correct or not. My storage is fine, since I have the 16GB version, and I have 12.55GB available.
 

spc_hicks09

Recognized Contributor
Jan 23, 2011
3,899
1,857
0
Marion, OH
www.facebook.com
My baseband version is M8974A-2.0.50.2.21. Dunno if that's correct or not. My storage is fine, since I have the 16GB version, and I have 12.55GB available.
Sounds like you're good then. I wouldn't worry about it unless you start having issues. Then I would just manually flash the files.

Sent from my Nexus 5 running stock Lollipop, using Tapatalk.
 
  • Like
Reactions: punkmetalska

jb0ne

Senior Member
Dec 7, 2011
490
65
0
And if I don't want to wipe data?

What are the ramifications of editing the flash-all.bat (which I assume is like previous ones) and remove the "fastboot -w flash userdata userdata.img" or something similar. That's how I've always updated, I really don't want to blow away my whole phone just to upgrade the ROM. I either take that out of the .bat or just run the individual fastboot commands myself. I'd like to keep my things as they are. Would that be any different from wiping it and going back and restoring with TiBu? Seems like it would be quicker to dirty flash...but nobody is talking about it.