Restore Google Pixel XL to Stock / Flash Factory Images
This guide shows how to restore Google Pixel XL to stock and unbrick it by flashing Google’s factory images with fastboot. The Pixel and Pixel XL were manufactured by HTC, but Google designed them and sells them as Google phones, so the official factory images come straight from Google.
Warning: Follow every step carefully and in order, and do it at your own risk. Unlocking the bootloader and flashing the factory images wipes the phone’s data unless you change the flash script as explained below. If anything is unclear, ask before you start.
Why Restore Your Pixel XL to Stock
If you have been experimenting with your Pixel XL, you are probably familiar with resetting the phone, booting into the bootloader and recovery mode, and flashing factory images. Sooner or later you may run into problems such as overheating, random reboots, hanging and lag, Wi-Fi and network issues, a bootloop or a soft brick. Knowing how to reset the Pixel XL and restore it to stock lets you fix these problems yourself.
Prerequisites to Restore Google Pixel XL to Stock
Take care of these preparations before you flash the factory images:
- Unlock the bootloader. Use the Pixel and Pixel XL bootloader unlock guide (droidviews.com). Verizon Pixel XL owners can use the Verizon Pixel XL bootloader unlock guide (droidviews.com). Rooting the Verizon model can cause problems on certain firmware versions, so choose the factory image carefully. Unlocking the bootloader and restoring to stock wipes the phone, so back up your apps and data first.
- Download the factory image for the Google Pixel XL (codename marlin) from the Google factory images page (developers.google.com).
- Optional: keep your apps and data. Flashing the factory images normally wipes the phone. To avoid that, install Notepad++, open the flash-all.bat file from the factory image package and remove the -w from the script.
- Enable Developer options. Go to Settings > About phone > Build number and tap it 7 times. Then go back to Settings > Developer options and enable USB debugging and OEM unlocking.

- Install Minimal ADB and Fastboot on your computer using the Minimal ADB and Fastboot Setup guide (droidviews.com). Allow the installer to create a desktop shortcut, and note the folder where it is installed, because you will need it later.

- Install the Google USB driver. Get the latest Google USB driver (developer.android.com) and install it as described in the Nexus 5 factory image guide (droidviews.com).
- Charge the Pixel XL to at least 70%.
Steps to Flash Factory Images on Google Pixel XL
Once the preparations above are done, you can start flashing.
Step 1: Copy the factory image to the ADB folder
Copy the downloaded factory image ZIP package (in this example marlin-nde63l-factory-71a65e7e.zip) to the Minimal ADB and Fastboot installation folder you noted earlier.
Step 2: Extract the package
Extract the contents of the ZIP file into the same folder. The fastboot folder should then look like this:
Step 3: Boot into bootloader mode
Turn off the phone and boot it into bootloader mode: press and hold Volume Down + Power until you see the screen shown below.
Step 4: Connect the phone
Connect the Pixel XL to your computer with the stock USB cable and wait a few seconds so the device drivers can install.
Step 5: Open Minimal ADB and Fastboot
Launch Minimal ADB and Fastboot from the desktop shortcut. If you did not create the shortcut, open Windows Start menu > All Programs > Minimal ADB and Fastboot. A command window opens.
Step 6: Check the connection
Run the following command to make sure the phone is connected. The command window shows a code (serial number) for your device.
fastboot devices
The original guide uses adb devices here, but adb does not list a phone that is in bootloader mode. Use fastboot devices while the phone is on the bootloader screen.
Step 7: Run the flash script
Type the following command in the command window and press Enter:
flash-all.bat
Step 8: Wait for the flash to finish
The installation starts and the command window shows the output of each process, similar to this:
C:\Program Files (x86)\Minimal ADB and Fastboot>flash-all.bat target reported max download size of 536870912 bytes sending 'bootloader_a' (32820 KB)... writing 'bootloader_a'... (bootloader) Valid bootloader version. rebooting into bootloader... < waiting for any device > target reported max download size of 536870912 bytes sending 'radio_a' (57048 KB)... writing 'radio_a'... rebooting into bootloader... < waiting for any device > target reported max download size of 536870912 bytes archive does not contain 'recovery.img' archive does not contain 'vendor_other.img' wiping userdata... Creating filesystem with parameters: Size: 26663190528 Block size: 4096 Blocks per group: 32768 Inodes per group: 8192 Inode size: 256 Journal blocks: 32768 Label: Blocks: 6509568 Block groups: 199 Reserved block group size: 1024 Created filesystem with 11/1630208 inodes and 146354/6509568 blocks -------------------------------------------- Bootloader Version...: 8996-012001-1608281716 Baseband Version.....: 8996-012511-1609150631 Serial Number........: xxxxxxxxxxxxxx -------------------------------------------- checking product... checking version-bootloader... checking version-baseband... sending 'boot_a' (26481 KB)... writing 'boot_a'... erasing 'system_a'... sending sparse 'system_a' 1/3 (523506 KB)... writing 'system_a' 1/3... sending sparse 'system_a' 2/3 (524279 KB)... writing 'system_a' 2/3... sending sparse 'system_a' 3/3 (512303 KB)... writing 'system_a' 3/3... erasing 'system_b'... sending sparse 'system_b' 1/4 (517263 KB)... writing 'system_b' 1/4... sending sparse 'system_b' 2/4 (514150 KB)... writing 'system_b' 2/4... sending sparse 'system_b' 3/4 (516790 KB)... writing 'system_b' 3/4... sending sparse 'system_b' 4/4 (96127 KB)... writing 'system_b' 4/4... erasing 'vendor_a'... sending 'vendor_a' (234277 KB)... writing 'vendor_a'... Setting current slot to 'a'... erasing 'userdata'... sending 'userdata' (138957 KB)... writing 'userdata'... rebooting... finished. total time: 128.109s Press any key to exit...
Step 9: Reboot the phone
When you are asked to press a key, do so. The phone reboots automatically.
After the Flash
The first boot after restoring the phone to stock can take about 5-8 minutes, so wait patiently until the welcome screen appears. Complete the initial setup and the phone is ready to use. Your Google Pixel XL is now restored to stock with the factory images.
More Google Pixel Guides (droidviews.com)
- How to Install Stock Firmware on Google Pixel and Unbrick It
- How to Root Google Pixel XL
- Root and Install TWRP on Google Pixel XL
- How to Turn Pixel’s “App Shortcuts” into Home Screen Icons
Related Guides
- 15 Seconds ADB Installer v1.4.3
- How To Unlock Bootloader, Install Custom Recovery, and Root Google Pixel C
FAQ
Will flashing the factory images erase my data?
Yes, by default. The flash-all.bat script wipes user data, and unlocking the bootloader also wipes the phone. Removing -w from flash-all.bat keeps your data during the flash, but back up first either way.
Can I use factory images for a different Pixel model?
No. Download only the factory image for the Pixel XL, codename marlin. Images for another model can leave the phone unable to boot.
The command window does not show my phone. What should I do?
Make sure the phone is in bootloader mode, use fastboot devices rather than adb devices, reinstall the Google USB driver and try another USB cable or port.
How long does the first boot take?
About 5-8 minutes. Do not interrupt it.
Source: this guide was originally published on droidviews.com (http://www.droidviews.com/restore-google-pixel-xl-to-stock-flash-factory-images/).
https://droid-developers.com/restore-google-pixel-xl-stock-flash-factory-images/https://droid-developers.com/wp-content/uploads/2016/11/restore-google-pixel-xl-to-stock.jpghttps://droid-developers.com/wp-content/uploads/2016/11/restore-google-pixel-xl-to-stock-150x150.jpgHow ToSoftware FixFlash Factory Images,Restore Google PixelThis guide shows how to restore Google Pixel XL to stock and unbrick it by flashing Google's factory images with fastboot. The Pixel and Pixel XL were manufactured by HTC, but Google designed them and sells them as Google phones, so the official factory images come straight from Google. Warning:...Fahim MahmudFahim Mahmud[email protected]AdministratorDroid-Developers

e5gtof
x8hcyr
ueql42