In this tutorial, we will show you the steps to restore your Pixel or Pixel XL device to stock firmware via Fastboot and hence unbrick it. The demise of Nexus bought in a new family in the form of the Pixel series. And the first two members of this family painted a perfect picture as to what the future beholds. Not much focusing on the hardware aspects or the looks of this device, you get a beast when it comes to the software side. In that regard, the cleanest stock Android experience is on the cards.
Furthermore, while the camera didn’t have the surprising factor, but the signs were still there nevertheless. Then there was something for the tech enthusiasts as well and it continues right till this date. Right from flashing Custom ROMs to installing a custom recovery like TWRP, the possibles knew no bounds. Along the same lines, the ability to gain administrative rights by rooting the device was right at the top of the priority list.
However, all these tweaks come with a few uninvited risks as well. If you miss up any step or flash an incorrect custom binary, then a boot-loop or soft brick was always around. And if you are stuck in any of these two situations, then this guide will help you out. Given here are the steps to restore your Pixel or Pixel XL device to stock firmware via Fastboot commands and unbrick it. Follow along for the detailed instructions.
- Fix Android stuck in Recovery Mode: No Command screen
- How to Fix TWRP Error 7 (While Flashing Custom ROM via TWRP)
- How to Install OTA Updates in Rooted Android Device
- Patch Stock Boot Image via Magisk and Flash it using Fastboot
Restore Pixel/XL to Stock Firmware via Fastboot | Unbrick it
Before we list out the instructions steps, there are a few prerequisites that you need to go through. Make sure you checkmark all these requirements before proceeding with the steps. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
STEP 1: Prerequisites
- First and foremost, you need to have an unlocked bootloader. This is something that all our readers might already have done, otherwise, they might not have landed here.
- Next up, download and install the Android SDK Platform Tools on your PC. This will provide you with the necessary ADB and Fastboot binaries.
- Finally, download the stock firmware for your device (these are the complete factory images and not the OTA file because OTAs wouldn’t work in this current scenario)
- Pixel (sailfish): 10.0.0 (QP1A.191005.007.A3, Dec 2019)
- Pixel XL (marlin): 10.0.0 (QP1A.191005.007.A3, Dec 2019)
That’s it. You may now proceed with the steps to restore Pixel or Pixel XL to stock firmware via Fastboot and unbrick it.
STEP 2: Extract Pixel Stock Firmware
To begin with, extract the contents of the Pixel ZIP firmware. Once you do so, you should get a bootloader.img file, three flash files, a radio.img file and a compressed folder.
This second compressed folder will have other image files such as the modem, system, vendor, boot, etc. You should not extract this ZIP file.
Now there are two different approaches that you take while flashing the firmware. You could either use the flash-all script that will automatically flash all the files. But if that doesn’t work out, then you could manually flash the IMG files to its partition. We have shared both these methods in-depth, refer to the one that meets your requirements.
- How to Fix FAILED (remote: unknown command) Error
- How to Extract payload.bin and get the stock boot image file
- Fix: pip is not recognized as an internal or external command
- Detailed Steps to Fix adb is not recognized Error
STEP 3A: Restore Pixel/XL to Stock Firmware via Flash-All Script
I inspected this Fastboot Firmware and the flashing file consists of a command that will wipe off all the data on your device. As of now, your device is stuck in Fastboot (kind of), hence a device backup is not possible. Fret Not. I will show you how to modify that flash file and remove the command responsible for device formatting. This way you will be able to flash the stock ROM on your Pixel or Pixel XL device, without losing any data!
- To do so, download an advanced Text Editor such as Notepad++.
- Then head over to the extracted Fastboot ROM and there you should see the flash-all.bat file.
- Right-click on it and select Edit with Notepad++.
- When the file opens, you should see the fastboot -w keyword. The -w in this command wipes off all the data, so just delete that alphabet, save the file and that’s it. Your data won’t be wiped now!
- So if the line was:
fastboot -w update image-sailfish-nde63h.zip
- It will transform to:
fastboot update image-sailfish-nde63h.zip
- Once you have made this change and saved the file, move all the contents of the extracted Fastboot ROM to the platform-tools folder. That is, move the bootloader.img file, three flash files, a radio.img file and the compressed folder inside platform-tools.
- Now boot your Pixel device to Fastboot Mode. For that, power it off. Then press and hold the Volume Down + Power buttons until you see the Android Logo, as shown in the below image.
- Once booted to Fastboot, connect it to PC via USB cable.
- Then head over to the platform-tools folder where you have placed the Fastboot ROM files. Type in CMD in the folder’s address bar and hit Enter. This will launch the Command Prompt window.
- Windows users should execute the below command to begin the flashing process:
- This flash file will come into action and would flash the required files on its own. Your device might reboot a couple of times in between the process, this is completely normal.
- Once done, your device should reboot to the OS. If it doesn’t, then use the hardware key combinations or the below command:
That’s it. These were the steps to restore Pixel/XL to Stock Firmware via Flash-All Script. This was the automated method and should do its job most of the time. And if it worked out for you, then you may skip the below STEP 3B and move over to STEP 4. However, if you are facing any issue or two, then you could manually flash these files as well. Here are the required fastboot commands for the same.
- Fix Mi Account Authorization | Unbrick Xiaomi | EDL Mode
- Disable DM-Verity or Android Verified Boot without TWRP
- How to Update Magisk ZIP and Magisk Manager (without TWRP)
- Everything About Magisk- Manager, Modules, and More
STEP 3B: Restore Pixel/XL to Stock Firmware via Fastboot Commands
- To begin with, make sure that all the ROM files (including the ZIP file) are placed inside the platform-tools folder.
- Then type in CMD in the folder’s address bar and hit Enter. This will launch the Commnd Prompt window.
- Now execute the below commands in the CMD window to manually flash the individual stock firmware files. Copy-paste the first command, hit Enter, copy-paste the second one and so on. After flashing each image file, we will be rebooting your device to bootloader (via fastboot reboot-bootloader command). This is an important step and shouldn’t be skipped. The last command (fastboot reboot) will boot your device to the OS:
fastboot flash bootloader <bootloader image file name>.img fastboot reboot-bootloader fastboot flash radio <radio image file name>.img fastboot reboot-bootloader fastboot update <image zip file name>.zip fastboot reboot
That’s it. With this you have successfully restored Pixel/XL to Stock Firmware via Fastboot Commands and unbricked it. Let’s now move onto the final step.
STEP 4: Relock Bootloader
The fourth and final step requires you to relock the bootloader on your Pixel device. Here are the steps for the same:
- Connect your device to PC via USB cable and boot it to Fastboot Mode.
- For that, you could use the hardware key combinations or execute the below command in the CMD window (make sure to enable USB Debugging)
adb reboot bootloader
- Once booted to Fastboot Mode, type in the following command to relock the device’s bootloader
fastboot flashing lock
- You may now get a prompt on your device. use the Volume Keys to select Yes and hit the Power key to comfirm the selection.
- Your device should now reboot to the OS. If it doesn’t, then use the power key to do so or execute the below command:
With this, we conclude the guide on how to restore your Pixel or Pixel XL device to stock firmware via Fastboot and unbrick it. If you still have any queries, do let us know in the comments section below.
- [GUIDE] Flash ROMs/Magisk/TWRP/Kernels on A/B Partition Devices
- Everything About Magisk- Manager, Modules and More
- Best Magisk Modules of 2020 [PART-1]
- Fix Magisk Module Bootloop without TWRP Recovery
1 thought on “Restore Pixel/XL to Stock Firmware via Fastboot | Unbrick it”
Thank you for this article. It saved my bacon (and my phone). Very clearly written and concise without missing out any important details. I had attempted to install Lineage 18.1 using some rather tortuous instructions on a variety of websites, but ended up bricking my phone. I think I’ll stick with stock Android!