Google has published binary image files for users who want to restore their Nexus or Pixel device’s original factory firmware. It will be simple to return a device to its factory state if the owner has previously used the Android Open-Source Project and knows how to flash custom builds.
Google has warned users that “These files are for use only on your personal Nexus or Pixel devices and may not be disassembled, decompiled, reverse engineered, modified or redistributed by you or used in any way except as specifically set forth in the license terms that came with your device” and that it’s important to back up data to their Google account, because all files will be erased during the installation of the factory image.
After getting the fastboot tool, users will add it to their PATH environment variable, and they will set up USB access for their device. Here are the steps that must be taken in order to flash a system image:
– The appropriate system image will be downloaded from here, then users will unzip the file to a safe directory;
– The phone will be connected to PC using an USB cable;
– The device will start in fastboot mode using the adb tool (executing “adb reboot bootloader” with the device on) or using a key combo: pressing and holding Volume Up + Volume Down + Power;
– The device’s bootloader will be unlocked (running command “fastboot flashing unlock” on a Nexus 5X or 6P, after updating the fastboot tool to the latest version; or running command “fastboot oem unlock” on an older device);
– A confirmation screen will appear;
– A terminal will be opened and users will go to the unzipped system image directory;
– The flash-all script will be executed, which will install the necessary bootloader, baseband firmware(s), and OS;
– The device will reboot and users will lock the bootloader for security by starting the phone in fastboot mode and executing “fastboot flashing lock” or “fastboot oem lock” (older devices);
– This operation will wipe the data and if users will want to flash the device again, they will run fastboot oem unlock again.