Google usually pulls the factory images just before the OTA (Over-the-air) update comes to your device so if you want to keep your device fresh, this is a nice guide how to actually do that.
What do you need:
- Factory image (update) - check here for your device
- Fully functional ADB drivers (this is important)
- Java Development Kit (included in Android SDK)
- Android SDK
Firstly open the SDK->Platform-tools, hold shift+right click and select open in command prompt. This will automaticlly "cd" the path.
Secondly, connect your Android device to your PC. Be sure USB debugging is enabled in dev options.
Now, check if the ADB recognizes your device by typing adb devices. You should see a "code" - that's an ID of your Nexus phone. Now you're ready to flash.
- Put the update package in package-tools folder
- Type in command prompt color 0a to change the color. (You don't really have to do that ^_^)
- Get your Nexus into bootloader mode by typing adb reboot bootloader.
- Select recovery and proceed.
- If you see Android with exclamation mark, press VolumeUP+Power at the same time.
- Apply update from ADB
- Now type-in to command prompt: adb sideload <NameOfTheUpdate.zip>
- You're done!
- If your update's called AndroidHackz.zip, you type in: adb sideload AndroidHackz.zip.
- If you're using custom recovery, type adb reboot recovery instead of bootloader.
- Cannot update? Check your drivers: type adb reboot bootloader and then adb devices to see if your device is recongize-able in recovery mode.
- How to get drivers? Open Android SDK, scroll down to find Google USB Drivers and install them.
Hope this helps!