Unbrick Qualcomm Devices

How to Unbrick Qualcomm Devices

Here you will learn how to create rawprogram0.xml & patch0.xml files to Unbrick Qualcomm Devices. There are a plethora of tweaks, you have to try out onto your smartphones. 

Luckily, in case you guys have a device with the Qualcomm chipset, then there is a handy way out. You can boot your device to the Emergency Download Mode & flash the MBN firmware file using the Qualcomm Flash Image Loader (QFIL) Tool.

When you do this then your device will end up in Fastboot Mode & from then onwards, you can also flash the firmware by using the device-specific tools or using the Fastboot Commands. But the MBN file isn’t just needed for the QFIL Tool. It needs you guys to have the rawprogam0 & patch0 XML files. However, more often than not, you would not locate these files just inside the stock firmware. Let’s create both files on our own! Let’s view the steps to create rawprogram0.xml & patch0.xml files & unbrick Qualcomm devices as well.

Way to Create rawprogram0.xml & patch0.xml files & Unbrick Qualcomm Devices

Install Python

First of all, install Python on your computer. We require a version 2.x. Install it from its official site. And proceed with on-screen instructions in order to install it. But in case you guys have the newest 3.x version installed, then don’t uninstall it from your device, rather download version 2.x in a separate directory.

Here we need a lower build of Python on account of the tool that we are ready to use isn’t compatible with the newest version. But in this case, for some reason, you guys don’t want to download the older build of Python. Make some modifications to the tool & make it compatible with the new Python. 

Download Qualcomm GPT Tool

Download this tool from its official website. Extract it inside the same folder where you guys have installed Python. Therefore, both files of the GPT Tool (GPTAnalyzer & PTool) are inside the Python folder.

Get GPT.Bin from Stock Firmware

After downloading the Qualcomm GPT Tool, now you have to download the stock firmware for your device. Extract it to any suitable location. Copy the GPT.bin file simply from the extracted firmware folder & then send it to the Python folder. The GPT file will probably be named either primaryGPT.bin, gpt_backup0.bin, gpt_main0.bin, or gpt_both0.bin.

Also see: How to Root Nokia Device via Magisk

In some cases, the firmware probably has the “backup0, main0, and both0” three GPT files. Select the ‘main’ file. Likewise, there could be a number of instances of the GPT main file. Therefore you guys should select the one that has 0 in its name. It is suggested to select the gpt_main0.bin file.

Create rawprogram0.xml and patch0.xml Files

  1. First of all, you have to go to Python’s installation directory. Ensure that the gpt_main0.bin, GPTAnalyzer, & PTool files are available there.
  2.  You have to open this folder’s address bar, then write down in CMD, and press Enter. Doing this will set up the Command Prompt.
  3. Write in the below-mentioned command in the CMD window in order to extract the partition.xml file just from the gpt_main0.bin file.
    GPTAnalyzer.py gpt.bin > partition.xml
  4. Use the below-listed command for creating rawprogram0.xml & patch0.xml files via the partition XML file:
    ptool.py -x partition.xml
  5. Now both these files are created and they are also located in Python’s installation directory itself
  6. You probably use these files, with the other firmware files, & flash them through the QFIL Tool in order to unbrick your device.

Well, guys that all was just about how to create the rawprogram0.xml & patch0.xml files & then use them to unbrick your Qualcomm device. In case you have any questions related to the above-mentioned guide, do let us know in the comments section below. We will try to get back to you with an easy fix as soon as possible.

Leave a Reply Cancel reply