Hovatek Forum MOBILE Android [Tutorial] How to create rawprogram0 & patch0 files for a qualcomm firmware
Can't login? Please, reset your password.
Hovatek is recruiting! Apply Now


[Tutorial] How to create rawprogram0 & patch0 files for a qualcomm firmware

[Tutorial] How to create rawprogram0 & patch0 files for a qualcomm firmware

Pages (5): 1 2 3 4 5 Next
X3non
X3non
X3non
Recognized Contributor
22,062
10-12-2019, 01:01 AM
#1



This is a step by step tutorial showing how to create rawprogram0.xml and patch0.xml files for a qualcomm firmware.

Requirements


Steps on how to create rawprogram0.xml and patch0.xml files for a qualcomm firmware


Follow the steps below to create rawprogram0.xml and patch0.xml files for a qualcomm firmware

  1. Extract the contents of qualcomm gpttool then copy GPT file from your firmware into the same folder as the two python scripts

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-1.jpg]

  2. Open a command prompt window (if you're using windows 10, ensure to open command prompt not powershell window). Simply click the start menu and type "CMD" then press Enter key
  3. In the CMD prompt window, change the path to the folder where the extracted files and GPT file are located by typing the command below then press Enter key
    Code:

    cd folder_location

    e.g
    cd C:\Users\X3non\Desktop\Qualcomm GPTtool

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-2.jpg]

  4. Type the command below and press Enter key (this command will process the GPT file and output the result into a new file named partition.xml)
    Code:

    GPTAnalyzer.py gpt > partition.xml

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-3.jpg]

  5. Type the command below and press Enter key (this command will process the partition.xml file created earlier on)
    Code:

    ptool.py -x partition.xml

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-4.jpg]

  6. Once successful, you'll get a created rawprogram0 screen like the one below

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-5.jpg]

  7. Check the folder for the newly created rawprogram0 and patch0 files

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-6.jpg]

  8. You will need to edit rawprogram0 file to add filenames of any missing partition using any text editor tool

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-7.jpg]

  9. You're to use the exact filename as you have in your firmware / backup. e.g if you have boot.img in your firmware then filename must be boot.img

    [Image: How-to-create-rawprogram0-and-patch0-for...ware-8.jpg]

  10. Once done, simply save and exit the text editor tool.


Credits
  • n0fate and coresvc for creating the python scripts used to achieve this
This post was last modified: 10-12-2019, 01:09 AM by X3non.
ludemon
ludemon
ludemon
Techie Member
42
14-04-2020, 02:06 PM
#2
I tried this but the process failed probably because I used the only reference to gpt files in the firmware, namely  gpt_main_32g.img and gpt_main_64g.img
Do the files have to be bin files?
X3non
X3non
X3non
Recognized Contributor
22,062
14-04-2020, 05:08 PM
#3
(14-04-2020, 02:06 PM)ludemon I tried this but the process failed probably because I used the only reference to gpt files in the firmware, namely  gpt_main_32g.img and gpt_main_64g.img
Do the files have to be bin files?

No, it doesn't have to be .bin
If you look closely at the guide, the file used was renamed to just "gpt". so filename has no effect unless you didn't specify the right file name when inputting and sending the command or that the gpt file from your firmware is somehow not supported

anyways, if you're trying to get rawprogram0 because of your htc device issue @ https://www.hovatek.com/forum/thread-32955.html ; then this guide won't do anything to help you as without the right firehose programmer file, you still WON't be able to flash through qfil or any other qualcomm flashtool
you can flash a qualcomm device if you have firehose file but don't have rawprogram0, doable using the guide @ https://www.hovatek.com/forum/thread-31476.html
ludemon
ludemon
ludemon
Techie Member
42
14-04-2020, 07:10 PM
#4
(14-04-2020, 05:08 PM)X3non
(14-04-2020, 02:06 PM)ludemon I tried this but the process failed probably because I used the only reference to gpt files in the firmware, namely  gpt_main_32g.img and gpt_main_64g.img
Do the files have to be bin files?

No, it doesn't have to be .bin
If you look closely at the guide, the file used was renamed to just "gpt". so filename has no effect unless you didn't specify the right file name when inputting and sending the command or that the gpt file from your firmware is somehow not supported

anyways, if you're trying to get rawprogram0 because of your htc device issue @ https://www.hovatek.com/forum/thread-32955.html ; then this guide won't do anything to help you as without the right firehose programmer file, you still WON't be able to flash through qfil or any other qualcomm flashtool
you can flash a qualcomm device if you have firehose file but don't have rawprogram0, doable using the guide @ https://www.hovatek.com/forum/thread-31476.html
Thanks again X3non for your response.
I'm beginning to get the impression that I'm on a lost cause with this phone (o_o)
You mentioned previously that I could try other 8994 programmer files listed on this forum and elsewhere and I did find one called just 8994.mbn on GitHub so was going to try that if I could create the xml files from appropriate firmware. I see that your gpt file is about 65.5 Mb so is that the size of file that I should be looking for in the firmware, and what is it likely to be called?
X3non
X3non
X3non
Recognized Contributor
22,062
15-04-2020, 09:49 AM
#5



(14-04-2020, 07:10 PM)ludemon Thanks again X3non for your response.
I'm beginning to get the impression that I'm on a lost cause with this phone (o_o)
You mentioned previously that I could try other 8994 programmer files listed on this forum and elsewhere and I did find one called just 8994.mbn on GitHub so was going to try that if I could create the xml files from appropriate firmware. I see that your gpt file is about 65.5 Mb so is that the size of file that I should be looking for in the firmware, and what is it likely to be called?

use any firehose file you find with the guide @ https://www.hovatek.com/forum/thread-31476.html
my gpt file was made by backing up the firmware (this usually dumps the full partition as it is not the contents, what this means is if the contents is only e.g 10mb but the size of the partition is 65mb, then what you'll get as backup is 65mb)

in the case of my gpt file, it's contents really only amounts to 4kb, the rest is filled with 00s (in hex view). so filesize doesn't count, filename does
ludemon
ludemon
ludemon
Techie Member
42
18-04-2020, 09:13 AM
#6
(15-04-2020, 09:49 AM)X3non my gpt file was made by backing up the firmware (this usually dumps the full partition as it is not the contents, what this means is if the contents is only e.g 10mb but the size of the partition is 65mb, then what you'll get as backup is 65mb)
Can I use a firmware backup from a working 10 evo? If so what is the preferred method of doing a backup?
X3non
X3non
X3non
Recognized Contributor
22,062
18-04-2020, 09:51 PM
#7
(18-04-2020, 09:13 AM)ludemon Can I use a firmware backup from a working 10 evo? If so what is the preferred method of doing a backup?

any firmware backup method for qualcomm other than using adb will require a firehose programmer file
This post was last modified: 18-04-2020, 10:03 PM by X3non.
sbacham
sbacham
sbacham
Newbie
1
25-08-2020, 04:44 AM
#8
I am getting this error.

Looking for  partition.xml
        ----------------------------------------
        Searching  C:\Users\cnu\Desktop\Qualcomm GPTtool

        **Found partition.xml (40 bytes)
Traceback (most recent call last):
  File "C:\Users\cnu\Desktop\Qualcomm GPTtool\ptool.py", line 2197, in <module>
    ParseXML(XMLFile)  # parses XMLFile, discovers if GPT or MBR
  File "C:\Users\cnu\Desktop\Qualcomm GPTtool\ptool.py", line 948, in ParseXML
    root = ET.parse( XMLFile )
  File "C:\Python27\lib\xml\etree\ElementTree.py", line 1176, in parse
    tree.parse(source, parser)
  File "C:\Python27\lib\xml\etree\ElementTree.py", line 653, in parse
    parser.feed(data)
  File "C:\Python27\lib\xml\etree\ElementTree.py", line 1623, in feed
    self._raiseerror(v)
  File "C:\Python27\lib\xml\etree\ElementTree.py", line 1487, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0

C:\Users\cnu\Desktop\Qualcomm GPTtool>
This post was last modified: 25-08-2020, 04:45 AM by sbacham.
X3non
X3non
X3non
Recognized Contributor
22,062
25-08-2020, 02:58 PM
#9
(25-08-2020, 04:44 AM)sbacham I am getting this error.
...

create a new thread for your device issue by clicking "Ask Question" at the top
in the new thread, post a link to the gpt file you are using
potraco
potraco
potraco
Newbie
1
24-09-2020, 01:58 PM
#10



Hi, can anybody re-upload the Qualcomm GPTtool to somewhere else? mega.nz is simply blocked by every browser and there is no way to download it. Thanks
Pages (5): 1 2 3 4 5 Next
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram