Procedure
As we mentioned earlier, installing a factory image will completely wipe everything from your device, including its internal storage contents, so make sure to backup everything you need to your computer or the cloud before proceeding.
- Download the appropriate factory image and extract the contents of the downloaded .tgz archive. If the extracted file is itself a .tar file, extract its contents again and you?ll get a folder.
- Put your device into bootloader mode by powering it off, pressing and holding both volume up and volume down buttons, and powering it back on using the power button.
- Connect your device to your computer via USB
- From the folder containing the extracted files, run the flash-all.bat file by double-clicking it. If you are on Linux or Mac, run the flash-all.sh script from a Terminal window using ./flash-all.sh
- Let the installation process run, making sure not to disconnect the device from your computer or interrupt the process before it finishes.
- That?s all there is to it ? your device should now be running Android 4.4 KitKat. Enjoy!