Home > Pixel Series

Restore Pixel 3/3 XL/3a/3a XL to Stock Firmware via Fastboot | Unbrick it

In this comprehensive guide, we will show you the steps to restore Pixel 3/3 XL/3a/3a XL to Stock Firmware via Fastboot Commands and hence unbrick it. Well, not everyone might echo these thoughts, but there are concrete reasons to fanboy a particular product. And when it comes to the Android ecosystem, one shouldn’t look any further than the Pixel devices. When you are guaranteed the purest Android experience plus the fastest OS upgrades, there isn’t much to complain about.

Then the fact that it has among the best camera out there [GCam Collections], and one cannot ask for much. Further extending it to the custom development, and the perks are literally endless. Once you have unlocked the device’s bootloader, you have opened the floodgates to a plethora of customizations. These include the ability to flash custom ROMs, a custom recovery like TWRP, or even gaining access to the system partition. The last one, in simpler terms, could be spelled out as rooting your device. [DON’T MISS: How to Root Pixel 3, 3 XL, 3a, 3a XL Android 11 without TWRP].

Once you do so, you could flash a custom kernel, install Magisk ModulesXposed Framework, install Substratum Theme Engine, etc. However, on the flip side, all this might result in a few issues as well. If not done correctly, then your device might end up in a bootloop or bricked device. Fortunately, there exist some pretty nifty workarounds to rectify these issues. Given here are the steps to restore Pixel 3/3 XL/3a/3a XL to Stock Firmware via Fastboot Commands and hence unbrick these devices. Follow along for the detailed instructions.



Restore Pixel 3/3 XL/3a/3a 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 to tick-mark all these requirements before proceeding ahead. 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

These are the latest version at the time of publishing this guide. To check for newer builds, head over to Google’s Factory Images page. With that said, you may now proceed with the steps to restore Pixel 3/3 XL/3a/3a XL to stock firmware via Fastboot and unbrick it.

STEP 2: Extract Pixel 3/3 XL/3a/3a XL Stock Firmware

To begin with, extract the contents of the Pixel 3/3 XL/3a/3a XL ZIP firmware. Once you do so, you should get a bootloader.img file, three flash files, a radio.img file and a compressed folder.

pixel 3a stock rom flash all file

This second compressed folder will have other image files such as the modem, system, vendor, boot, etc. You should not extract this ZIP file. This is because we would be flashing this ZIP file as it is.pixel 3a vbmeta boot sysyem img files

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. 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.



STEP 3A: Restore Pixel 3/3 XL/3a/3a XL 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 3/3 XL/3a/3a XL device, without losing any data!

  1. To do so, download an advanced Text Editor such as Notepad++.
  2. Then head over to the extracted Fastboot ROM and there you should see the flash-all.bat file.
  3. Right-click on it and select Edit with Notepad++.
    edit pixel flash all file
  4. 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 and the hyphen, save the file and that’s it. Your data won’t be wiped now!
    pixel 3a flash all file stock firmware
  5. So if the line was:
    fastboot -w update image-sargo-rp1a.201105.002.zip
  6. It will be changed to:
    fastboot update image-sargo-rp1a.201105.002.zip
  7. 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.
  8. 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 screen as shown in the below image.
    pixel 3 fastboot mode unbrick
  9. Once booted to Fastboot, connect it to PC via USB cable.
  10. 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.
  11. Windows users should execute the below command to begin the flashing process:
    flash-all.bat
  12. 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.
  13. Once done, your device should reboot to the OS. If it doesn’t, then use the hardware key combinations or the below command:
    fastboot reboot

That’s it. These were the steps to restore Pixel 3/3 XL/3a/3a 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.

STEP 3B: Restore Pixel 3/3 XL/3a/3a XL via Fastboot Commands

  1. To begin with, make sure that all the ROM files (including the ZIP file) are placed inside the platform-tools folder.
  2. Then type in CMD in the folder’s address bar and hit Enter. This will launch the Command Prompt window.
    command-prompt-adb
  3. 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 3/3 XL/3a/3a 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 3/3 XL/3a/3a XL device. Here are the steps for the same:

  1. Connect your device to PC via USB cable and boot it to Fastboot Mode.
  2. 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
  3. Once booted to Fastboot Mode, type in the following command to relock the device’s bootloader
    fastboot flashing lock
  4. You may now get a prompt on your device. Use the Volume keys to select Yes and hit the Power key to confirm the selection.
  5. 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:
    fastboot reboot

With this, we conclude the guide on how to restore your Pixel 3/3 XL/3a/3a 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.


Share:
  • same as me bro,i also got result like you today 🙁

  • You are a genius.. Thanks for this great work

  • Hi,
    I’m using Pixel 3 XL, last week my phone decided to not to boot. The battery was flat initially, when i charged it back, it stuck at fastboot mode with device state says “error!”

    I tried your method, but seems like i cant pass the bootloader, my phone bootloader is locked before it broken. Can you advise?

    This is the error from CMD;

    C:\Users\bsmabuba\Downloads\P3XL\platform-tools>flash-all.bat
    Sending ‘bootloader_b’ (8517 KB) OKAY [ 0.316s]
    Writing ‘bootloader_b’ FAILED (remote: ‘error getting device locked state No Response’)
    fastboot: error: Command failed
    Rebooting into bootloader OKAY [ 0.050s]
    Finished. Total time: 0.051s

    Sending ‘radio_b’ (71452 KB) OKAY [ 1.819s]
    Writing ‘radio_b’ FAILED (remote: ‘error getting device locked state No Response’)
    fastboot: error: Command failed
    Rebooting into bootloader OKAY [ 0.048s]
    Finished. Total time: 0.052s

    ——————————————–
    Bootloader Version…: b1c1-0.3-7065185
    Baseband Version…..: g845-00166-210105-B-7062333
    Serial Number……..: 89WY6RV3P
    ——————————————–
    extracting android-info.txt (0 MB) to RAM…
    Checking ‘product’ OKAY [ 0.069s]
    Checking ‘version-bootloader’ OKAY [ 0.059s]
    Checking ‘version-baseband’ OKAY [ 0.059s]
    Setting current slot to ‘b’ FAILED (remote: ‘error getting device locked state No Response’)
    fastboot: error: Command failed
    Press any key to exit…