Restore Google Pixel 2 and Pixel 2 XL to Stock Firmware

A detailed step by step guide on how to restore your Google Pixel 2 and Pixel 2 XL to complete stock firmware. Google has always kept it easy for the users and developers to unlock the bootloader of their devices. Along those same lines, the steps to unlock the bootloader of Pixel 2 and Pixel 2 XL are also fairly simple. With developer friendly devices like the Google Pixel lineup, it is pretty hard not to play around with your device. A working TWRP Recovery for Pixel 2 and Pixel 2 XL is already available and it is only a matter of time before Root and Magisk are made available for the device. The thing with messing around with your device is that you do not always get the desired results!

Restore Google Pixel 2 and Pixel 2 XL to Stock Firmware

Once root access is available, the gates to customization open! There are a lot of audio mods, custom ROMs, Magisk Modules available and it is sort of tough to not try them out on your device. The thing with root access is that you make one wrong move and you have a brick in your pocket.

In this guide, we will tell you how to return your Google Pixel 2 and Pixel 2 XL to complete stock firmware in case you have bricked your device or just want to go back to full stock. The process is actually pretty easy: Google has all the necessary Pixel 2 and Pixel 2 XL Factory images available for download and all you have to do is simply flash the firmware via fastboot! Sounds a bit complex, let us explain it to you.

Prerequisites

Necessary Downloads : Pixel 2 [XL] Factory Images

Before proceeding with the tutoral, we need make sure we have the necessary factory image files. Thankfully, you can download all the necessary files staright from Google servers.

Warning: Make sure you download the right file for your device model/carrier. Flashing a wrong file might render the device unbootable.

Android Version 8.0.0 Unlocked Telstra Fido, Rogers Verizon
Google Pixel 2 (walleye) Download Download Download Download
Google Pixel 2 XL (taimen) Download Download Download Download

 

Steps to Flash Stock Firmware on Pixel 2 and Pixel 2 XL

Follow the below steps carefully.

Step 1: Extracting Factory Image

Extract the downloaded Pixel 2 [XL] factory image zip file. For example, if you have downloaded the file ‘walleye-opd1.170816.010-factory-63083164.zip’ > Unzip it.

Step 2: Placing the files on the right directory

Copy the contents of the extracted zip file to the folder where ADB and Fastboot are installed. Most probably this will be C:\adb‘ folder orC:\Minimal ADB and Fastboot‘ folder. 

Step 3: Boot your Pixel 2 in Bootloader Mode

  • Power off the device completely.
  • Press and hold the Volume Down + Power button altogether until you see the bootloader screen.

Step 4: Connect your device to PC via USB cable.

Step 5: [Optional] Only if you want to Preserve Internal Storage Data:

Flashing stock firmware will completely wipe your device, your data included. But luckily, we have a workaround to not let that happen.  Follow the instructions in this step, if you want to retain all the data even after flashing stock image on your Pixel 2 [XL].

  1. Download and Install Notepad++ on your PC.
  2. Go to the folder where you have copied the extracted factory image files.
  3. Look for a file named flash-all.bat > Right click on it > select Edit with Notepad++’.
  4. The Notepad++ will open the batch script file in editable text format. In that, we are going to remove a small line to make sure our data is preserved after flashing.
  5. Look for the following line for the Pixel 2 [walleye]:
    fastboot -w update-image-walleye-xxx.xxxxxx.xxx.zip

    For the Pixel 2 XL [taimen]:

    fastboot -w update-image-taimen-xxx.xxxxxx.xxx.zip

    Note: ‘xxx.xxxxxx.xxx’ in the above simply represents the build version number. Restore-Stock-Firmware-on-Google-Pixel-2

  6. In the above line, remove the ‘-w’. This is the fastboot flag responsible for erasing the userdata and cache partitions. Removing this will prevent the script from erasing your data.
  7. After making the changes, do not forget to save your changes!

Step 6: Flashing Stock Firmware on Google Pixel 2 and Pixel 2 XL

Here comes the easy part. All there is left to do now is flashing the stock firmware on your Pixel 2 and Pixel 2 XL and Returning them to stock. To do this, go to the folder where ABD is installed [the folder where you have copied the factory image files] and double click on the flash-all.bat script file. Once you open it, a command window is open and the flashing process will be taken care automatically. Within a couple of minutes, the flashing process will complete.

Step 7: Locking the Pixel 2 and Pixel 2 XL Bootloader

This is again optional: If you wish to lock your bootloader:

  1. Make sure your device is in fastboot mode.
  2. Open command window inside the ADB Folder: Hold down Shift Key > Right Click > Select ‘Open Command window here’.
  3. Simply execute the below command at the command prompt window: fastboot flashing lock
  4. The device will prompt you with a confirmation message. relocking-bootloader-Pixel-2Use the Volume buttons to highlight ‘Yes’ and press the Power button to make the selection and lock the bootloader.
  5. Done!

Congratulations, you have successfully flashed stock firmware on your Pixel 2 and Pixel 2 XL and completely returned it to stock!

Need help? Drop a comment below!

Leave a Comment