WarningI do not take any responsibility whatsoever in the unlikely event that your device gets bricked. By following these instructions, you agree to take full responsibility of the consequences.
Step 1: Initial Setup
On your Mac, head into System Preferences and select Keyboard > Shortcuts > Services. Find the “New Terminal at Folder” in the settings and check the box. This enables us to launch Terminal in a specific folder.
On your Nexus 5, enable USB Debugging by opening Settings > About Phone and tapping “Build number” seven times. You will be prompted and ‘Developer Options’ will be enabled after your seventh tap in Settings right above ‘About Phone’. Go in and check “USB debugging”.
Step 2: Download FilesDownload the Nexus 5 Stock OTA considering your Build number is KTU84Q. File size should be around 502 MB.
Head over to Android Developers and Download the Android SDK for Mac as well, which should be a good 320 MB.
Step 3: Device Check
Connect your Nexus 5 via USB and extract the Android SDK archive, and navigate to the sdk > platform-tools folder.
Place the Stock OTA archive in this folder and rename it to something simple like “ota.zip”.
Go back to the sdk folder, right-click on the platform-tools folder and select “New Terminal at Folder”. This will launch Terminal for that folder.
Type the below and Terminal will return your device as a string of alphanumeric characters. This means you are okay to move ahead with installation.
Step 4: Installation
Reboot to the bootloader by typing the below. Your Nexus should now reboot to a screen which shows the Android laying down with its lid open.
Use the Volume buttons to select Recovery and press the Power button to accept. Your device will now boot into Recovery which will show the same Android laying down with its lid open. Except this time the Android is smaller and there is a Red Exclamation warning icon on it.
Open the Recovery Menu by holding the Power button and pressing Volume Up. Use the Volume buttons to select “Apply Update from ADB” and press the Power button to accept. You will now see a message “Now send the package you want to apply to the device with adb sideload …”.
Type the below and you will see a percentage progress of your file being sent to your handset. Now sit and wait while Lollipop is being installed. The entire process will take anywhere from 5-10 minutes.
./adb sideload ota.zip
Reboot the device when you are presented with the option and you are done.
ImportantPlease note that the first boot will take over 5 minutes and an additional 5-10 minutes will be taken for your apps to optimise.
As compared to flashing the ROM, using this method will make sure you don’t lose the data on your phone
That’s it. You are done! Do share your feedback/experience in the comment section below.