Howto flash stock firmware for google nexus all models
Features to note:
- download the correct version of the device, if wrong machine will be brick
- you need to download and install drivers for google nexus.
- Save all your important data
- When you do, you should prepare a good cable.
- over 90% rechargeable battery to ensure the machine does not lose power.
- when running rom absolutely do not unplug the cable if installing rom.
- Download the appropriate system image for your device below, then unzip it to a safe directory.
- Connect your device to your computer over USB.
- Start the device in fastboot mode with one of the following methods:
- Using the adb tool: With the device powered on, execute:
adb reboot bootloader
- Using a key combo: Turn the device off, then turn it on and immediately hold down the relevant key combination for your device.
- If necessary, unlock the device’s bootloader using one of the following methods:
- If you are updating a Nexus or Pixel device that is manufactured in 2015 or later (for example, a Nexus 5X, Nexus 6P, Pixel or Pixel XL device), run this command:
fastboot flashing unlock
- If you are updating an older device, run this command:
fastboot oem unlock
The target device will show you a confirmation screen. (This erases all data on the target device.)
- Open a terminal and navigate to the unzipped system image directory.
- Execute the
flash-allscript. This script installs the necessary bootloader, baseband firmware(s), and operating system.
Once the script finishes, your device reboots.