Now there are a couple of caveats. The first is that your bootloader must be unlocked. It’s not a big deal to unlock it, but the only issue with that is that your device will be wiped clean as in you will lose all your data.
The first thing you want to do is install the android SDK if you haven’t already. You only really need ADB and Fastboot (if you’re unlocking) so you can skip the entire Android SDK and Download and install Minimal ADB and Fastboot instead, which will give you just the necessary files.
Note: If you go the route of installing the full SDK, ADB and Fastboot will be in the C:\program files (x86)\android\android-sdk\platform-tools folder. If you use Minimal ADB and Fastboot, you can choose the directory you want.
The next thing you want to do is download the appropriate system image for your device from Google. Make sure to grab version 5.0, which is the last download for each device. The downloaded file has tgzas its extension and inside it is a tar file. The best thing do is install 7 Zip since it can handle both extensions. Once it’s installed on your Windows machine, follow these steps:
1) Open the 7 Zip File Manager and navigate to the folder that you saved the tgz file in.
2) Double click on the tgz file.
3) Double click on it again and after a bit, the tar file will appear.
4) Double click on it to show the contents. Now you want to click on extract to extract all the contents to C:\program files (x86)\android\android-sdk\platform-tools (if you installed the full SDK) or whatever directory ADB and Fastboot are installed in.
Now you need to make sure USB debugging is enabled. If the Developer Options aren’t showing in theSettings on your device, follow these steps…..
1) Tap on About Phone and find the Build Number.
2) Tap on the Build Number 7 times and the Developer Options will appear on the main page of the Settings.
3) Tap on the Back key to see the Developer Options.
4) Tap on Developer Options.
5) Check to enable USB Debugging
Before you connect your device to the USB port on your desktop / laptop, you want to make sure you have the appropriate drivers installed. You can grab them here Since you’re working with a Nexus device, you specifically want the Google USB Drivers.
Now connect your device and you are ready to flash the Zip file that you extracted earlier. Note: You might get a pop up box on your device stating what the computer’s RSA Key is. Just check Always allow from this computer and tap on OK
If you’re device isn’t unlocked, follow these instructions below.
1) Open the Command Prompt in Windows and navigate to the folder that ADB and Fastboot are installed in. Again, if you installed the full SDK, it’s in the C:\program files (x86)\android\android-sdk\platform-tools folder. Just type cd\program files (x86)\android\android-sdk\platform-tools. If it’s somewhere else, just navigate to it. Note: To make things easier so you don’t have to type out long directories, you can also paste it by pressing ALT and the Space Bar, then choose Edit, followed by Paste.
2) Assuming you device is already connected to your computer via USB and USB Debugging is enabled, you need to start it in fastboot mode. Follow one of the two methods below.
A) Type adb reboot bootloader
B) Turn your device off, then turn it back on while holding down the relevant key combinations for your device. For many devices it’s Volume Up + Volume Down + Power. You can see what your device's key combinations are here.
3) Type fastboot oem unlock to unlock you device. As a final warning, this step will erase everything on your device. If your device isn’t recognized, see the bottom of this post for further instructions.
4) Type flash-all to install the bootloader, baseband firmware(s), and operating system. If you instead get a missing system.img error, then go to the bottom of this post for further directions.
5) This process could take several minutes so it’s important not to power off or disconnect the device. Once it’s finished, your device will reboot and Lollipop will be installed. If you instead get a missingsystem.img error, then go to the bottom of this post for further directions.
6) You can opt to re-lock the bootloader if you wish, but assuming you will do this again, you might want to leave it unlocked so you don’t have to perform a factory reset again. If you do want to re-lock, just follow Step 2 above and change Step 3 to fastboot oem lock. That’s it.
If you’re device is already unlocked and you don’t want to do a factory reset, follow these instructions below.
1) Open the Command Prompt in Windows and navigate to the folder that ADB and Fastboot are installed in. Again, if you installed the full SDK, it’s in the C:\program files (x86)\android\android-sdk\platform-tools folder. Just type cd\program files (x86)\android\android-sdk\platform-tools. If it’s somewhere else, just navigate to it. Note: To make things easier so you don’t have to type out long directories, you can also paste it by pressing ALT and the Space Bar, then choose Edit, followed by Paste.
2) Assuming you device is already connected to your computer via USB and USB Debugging is enabled, you need to start it in fastboot mode. Follow one of the two methods below.
A) Type adb reboot bootloader
B) Turn your device off, then turn it back on while holding down the relevant key combinations for your device. For many devices it’s Volume Up + Volume Down + Power. You can see what your device's key combinations are here.
3) You will need to edit the flash-all.bat file that you extracted from the factory image. You extracted it to the directory that both ADB and fastboot reside in. Just open it with any simple text editor such as WordPad. You will see a line that starts with “fastboot -w update……..” Just remove the -w from this line. The -w flag wipes your data, so removing it will obviously stop that from happening.
4) Type flash-all to install the bootloader, baseband firmware(s), and operating system. If you instead get a missing system.img error, then go to the bottom of this post for further directions.
5) This process could take several minutes so it’s important not to power off or disconnect the device. Once it’s finished, your device will reboot and Lollipop will be installed.
If you get a missing system.img error in Step 4, then follow these instructions in place of Step 4….
You will need to extract all the files in the .zip file (extracted from the tgz/tar file). The file name probably begins with “image.” There should be a bunch of .img files. On top of this, you already have bootloader and radio .img files in the same directory. Just make sure all the .img files (from the update.zip) and the ones that were already extracted are in the same directory as ADB and fastboot. Now you are going to flash each .img file separately…..
Note: If you don’t have either one of the bootloader or radio .img files, don’t worry, not all devices need them
**You must go in this exact order
1) type fastboot flash bootloader [name of your file].img
2) type fastboot flash radio [name of your file].img
3) type fastboot reboot-bootloader
4) type fastboot flash recovery recovery.img
5) type fastboot flash boot boot.img
6) type fastboot flash system system.img
If your device is a Nexus 9, then also issue this command - fastboot flash vendor vendor.img
Lastly, if you want, you can wipe the cache with this command - fastboot flash cache cache.img
I know this may seem daunting, but it’s not that hard at all. If I can do it, you can!!
I hope this guide helped you, and please let me know if I missed anything.
———————————————————————————–
If your computer doesn’t recognize your device, than you do not have the appropriate drivers installed. Make sure that you installed the Google USB Driver that I mentioned earlier. If you still have an issue, follow these steps….
1) On your Windows desktop, Go to your Control Panel then Device Manager.
2) You should see Android Phone under Other Devices with a Yellow ! mark on it.
3) Right click on it and choose update driver
4) Choose browse my computer, then Let me pick from a list.
5) Select Android ADB Interface.
6) You should hopefully now be good to go.
















