Re: Updating my Nexus 5 to Android Lollipop
It's different whether you want to take the over the air or flash it from computer. OTA lets you keep all your data (unless something goes wrong), flashing from your computer must fully wipe the phone.
Always backup everything first. I use Rerware My Backup Pro, I like it way better than Titanium. Costs a few bucks.
I will assume that you definitely want to be rooted after updating to Lollipop.
As always, attempting the following will be at your
own risk.
For OTA, the basic steps are:
1. Fully uninstall root (SuperUser). I think Busybox should be too, if you have it installed.
2. Reflash stock recovery from your computer to the N5. Get the factory images from
HERE. At this point you want the factory image for the version you are
already on, which you stated is 4.4.2, located under "Hammerhead - Nexus 5". You would extract everything out of the .tgz file, extract out the .zip file inside, find the file called recovery.img. That's the stock recovery for your phone. You would fastboot flash it to your phone using the fastboot command [fastboot flash recovery recovery.img], thus returning to the stock recovery that "should" be on your 4.4.2 N5. You must do this step because when the OTA update attempts to reboot into recovery to flash itself, if expects to find Android's stock recovery. If the OTA reboots to recovery and finds TWRP, then the update fails, it corrupts TWRP, and it breaks root.
NOTE: I cannot remember whether you must relock your bootloader now or not. Sorry, it's been awhile since I've done this... but try step 3 first, and if it fails, you may need to relock your bootloader through fastboot.
3. Take that OTA update!
4. Reflash TWRP to your N5 from your computer. Probably best to read up a bit and make sure the most recent version of TWRP is not experiencing any weird bugs.
5. Copy Superuser flashable .zip back to your N5 and flash it through TWRP.
That should be it!
If you want to flash Lollipop from your computer with a full device wipe (I prefer full wipe for these kinds of things), instruction can be found on the factory image link I posted above.
Back up everything first! The basic process would be to download the Lollipop factory image, extract all contents into a folder (the .tgz works just like a .rar or .zip file), and the double click the flash-all.bat to automatically update every partition; the Nexus 5 just has to have an unlocked bootloader, it must be booted into fastboot mode, and must be connected to usb. I don't think the phone requires any more prep than that! As long as those requirements are met the computer will just flash over all the updates. Pretty simple, but comes at the cost that it does a full wipe and update for every partition. There are more guides out there for this method if you need them. Matter of fact, I just found
THIS ONE from Jerry Hildenbrand.
I am certainly not an expert, and invite others to correct or add in if they know something I'm missing.
Good luck!