Home > Unbrick

Unbrick Qualcomm via QFIL: Using rawprogram0.xml, patch0.xml, MBN

In this guide, we will show you the steps to unbrick your Qualcomm device using the QFIL Tool and the rawprogram0.xml, patch0.xml, and MBN files. Step into custom development and you could then flash custom ROMs, recoveries, and even gain access to the system partition by rooting the device via Magisk. However, this is just one side of the coin. Trying out these tweaks does bring in a few risks as well. In most instances, your device could end up in a bootloop or soft-bricked state.

But even in such cases, you could bring your device back to life by flashing the firmware via Fastboot Commands or Android Flash Tool. However, the real issue arises when your device gets hard-bricked, as you wouldn’t be even able to access the Fastboot/FastbootD Modes. But thanks to the Qualcomm chipset, your Pixel device (till the fifth series) comes with an underlying Emergency Download Mode. And in most instances, your device will automatically boot to this Mode as soon as it is bricked.

So with your Pixel booted to Qualcomm’s EDL Mode, you could then flash the MBN Programmer, rawprogram0.xml, and patch0.xml files using the Qualcomm Flash Image Loader (QFIL) Tool, and hence unbrick it. However, this usually proves to be easier said than done. This is because the official firmware files (Factory Image/OTA) released by Google don’t have any of these three files. So even if they have the QFIL Tool in hand, there’s not much that they could do to bring their device back to life.

So what else could be done? Well, in this guide, we will provide you with the MBN firmware file and then show you the steps to manually create the rawprogram0.xml, and patch0.xml files. We will then load all these three files to the Tool and then see if it spells out success or not. So let’s get started with the steps to unbrick your Qualcomm device using the QFIL Tool and the rawprogram0.xml, patch0.xml, and MBN files.

Unbrick Qualcomm via QFIL Tool, rawprogram0.xml, patch0.xml, and MBN File

unbrick qualcomm qfil

The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned. 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 (well, it’s already bricked, but still!) and data by performing the below steps.

STEP 1: Install Qualcomm USB Drivers

To begin with, install the Qualcomm USB drivers on your PC so that it is able to recognize the connected Pixel device in EDL Mode. So refer to our guide on How to Qualcomm HS-USB QDLoader 9008 Drivers.

unbrick qualcomm qfil

STEP 2: Verify EDL  Connection

  1. Connect your device to the PC via USB cable. Then use the Windows+X shortcut and select Device Manager from the menu that appears.
  2. After that, expand the Ports (or Other Devices) section. If your device is listed as Qualcomm HS-USB QDLoader 9008, then the connection stands successful.
    unbrick qualcomm qfil
  3. However, if it is along the lines of QHUSB_BULK with a yellow exclamation mark, then re-verify the driver installation, use the official USB cable, try using USB 2.0 Port, use a Windows 8 PC (if possible) and try other such tweaks till the connection is successfully established.

STEP 3: Download QFIL Tool

  1. Your next course of action should be to download the Qualcomm Flash Image Loader (QFIL) Tool.
  2. After that, extract it to any convenient location on your PC.
    unbrick qualcomm qfil
  3. This shall give you a few files, you need to double click on QFIL.exe to launch the tool.

STEP 4: Download Qualcomm MBN Firmware File

The MBN file contains partition images for Qualcomm devices, but as already mentioned, this file isn’t released by Google. Fortunately, we were able to get hold of the MBN File for Pixel 4A [all thanks to XDA Senior Member spaceminer] so you may grab it from the below link. We will update this section with MB files for other Qualcomm devices as and when we get hold of the same.

unbrick qualcomm qfil

This is a bundle of MBN files corresponding to various regions and carriers. So make sure to download the one that corresponds to your region and carrier.

STEP 5: Create Pixel rawprogram0.xml, and patch0.xml Files

Similar to the MBN file, Google doesn’t provide the rawprogram0.xml, and patch0.xml files as well. But what many users aren’t aware of is the fact that we could create both these files ourselves using a Python tool. So do check out the guide on How to Create rawprogram0.xml and patch0.xml files.

unbrick qualcomm qfil

STEP 6: Flash rawprogram0.xml, patch0.xml, and MBN File via QFIL and unbrick Qualcomm

  1. To begin with, connect your device via USB cable to the PC. Make sure that it is booted to EDL Mode.
  2. Next up, launch the QFIL Tool and make sure that the tool is displaying your device as Qualcomm HS-USB QDLoader 9008 with a port number in brackets.
    unbrick qualcomm qfil
  3. Now select Flat Build under Build Type.
    unbrick qualcomm qfil
  4. Then click on the Browse button next to Programmer Path under Select Programmer.
    unbrick qualcomm qfil
  5. Now navigate to the MBN file, select it, and hit Open. The file will now be loaded to the tool.
    unbrick qualcomm qfil
  6. After that, click on the Load XML button.
    unbrick qualcomm qfil
  7. Then navigate to the rawprogram0.xml file and click Open.
    unbrick qualcomm qfil
  8. Likewise, select the patch0.xml file and click Open. It will also be loaded to the tool.unbrick qualcomm qfil
  9. Now that all the files are loaded, hit the Download button and wait for the process to complete.
    unbrick qualcomm qfil
  10. Once done you will be notified of the same and your device shall boot to the OS.

That’s it. These were the steps to unbrick your Qualcomm device using the QFIL Tool and the rawprogram0.xml, patch0.xml, and MBN files. Do keep in mind that we are not in a position to share the firmware files for the QFIL or even QPST Tool for that matter. So please don’t ask for the same in the comments section. However, if you have any doubts concerning the aforementioned steps, then you are free to drop in your queries in the comments below.


Share: