• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[Guide]Extracting Stock firmware files using Huawei Update Extractor/splitupdate

Search This thread

ante0

Senior Member
Dec 28, 2009
3,207
1,577
Stockholm
There seems to be a little confusion on how to do this and I've written down how to in many posts now so I figure I'd just write it down in a little guide.

What you need:
Firmware update.zip from http://pro-teammt.ru/firmware-database/

Windows only: Huawei Update Extractor

Linux/Mac(?)/(Windows too): splitupdate perl script (requires perl)
Direct link: https://mega.nz/#!4PBknJrK!iZQDI4ti6ERmQJC6afgUGTSvHHKcm9KFz9okmwwez3I
Source: https://github.com/marcominetti/split_updata.pl/tree/f5f415262be3487de28321b49dcb69d947897bf1
(Or my 'special' version https://mega.nz/#!NS4VnL7Q!5GMn-soCf_WMW6fZANd-TDzxjQkZW2LynEQtJ_TlUdU which extracts
to the same folder as 'splitupdate' instead of 'output/', and includes a mount script (Linux only, maybe Mac?) for extraction of files of the different images)


Archive extractor of your choice (7zip, winrar, winzip and so on.)


Firmware build
First you need to determine what your current firmware is, this can be done by going to 'Settings -> System -> About Phone' on your phone. Check 'Build Number'.
Mine says:
cV9BEYr.png

BLA-L29 8.0.0.132(C636) (Replace 8.0.0. with C636 and add a B infront of 132 :eek:)
This can be translated into BLA-L29C636B132.
Now we have our current firmware!


Info on Nougat -> Oreo
As of Oreo the partitions changed a little.
'Boot' partition was split into 'ramdisk' and 'kernel'.
'Recovery' partition was split into 'recovery_ramdisk', 'recovery_vendor' and 'recovery_vbmeta', and shares the 'kernel' partition with 'ramdisk'.
The one's you probably want to flash are 'ramdisk' and 'recovery_ramdisk'. (Ramdisk is where Magisk/SuperSU goes, recovery_ramdisk is where TWRP goes)


Firmware update.zip
In this example I will be using my firmware, BLA-L29C636B132.
First start by going to http://pro-teammt.ru/firmware-database/ and enter your full firmware in the 'Enter model', click on Find Model.
ykxgVa1.png


This is what it will look like after you have searched. Locate the row that says FullOTA-MF and click on the 'update' link in that row.
When it's downloaded, open update.zip in your choice of archive manager and extract UPDATE.app to your desktop or somewhere easy to find.
RaVSqO6.png



Huawei Update Extractor:
Download Huawei Update Extractor from the link above, it's attached to first post in that thread I linked to (v0.9.9.5).
Extract the zip to your desktop (Or Downloads folder).
Enter the newly created folder that should be named 'HuaweiUpdateExtractor_0.9.9.5', and run HuaweiUpdateExtractor.exe.
Start by going to the 'Settings' tab and uncheck 'Verify header checksum'.
(Something is wrong with the header of erecovery_ramdisk, also it's mispelled to erecovery_ramdis, or maybe character limit? The partition on phone is named correctly. This does not need to be unchecked on Nougat firmware)
jUYtPv6.png


Then go back to the 'Extract' tab and click on the button that says '...' and open your UPDATE.APP
03r6ZM7.png


Rightclick on the file you want to extract and click on 'Extract Selected', this will bring up a dialog where you choose where to extract to.

After this you can flash the file using fastboot. Take 'ramdisk' for example.
Make sure you have adb & fastboot installed (https://forum.xda-developers.com/showthread.php?t=2317790)
Open up a command prompt and connect phone, reboot to fastboot mode using: usb plugged in, power + vol down, release power when phone vibrates.
Or you can use the command 'adb reboot bootloader'.
Make sure phone is recognized in fastboot mode with the command: 'fastboot devices', it should show up as a fastboot device.
Next we can flash RAMDISK.img using: 'fastboot flash ramdisk RAMDISK.img'.

On Nougat you would extract 'BOOT' from UPDATE.APP and flash using:
'fastboot flash boot BOOT.img'


Linux/Mac(?)(and Windows with perl installed, I use Strawberry Perl)
First download the splitupdate zip from above.
Extract it and enter the extracted 'split' folder, open a terminal and:
'chmod +x splitupdate'
'chmod +x crc'

Now put your UPDATE.APP in the 'split' folder and open a terminal and use the following command:
'./splitupdate UPDATE.APP file_to_extract'. If you write 'file_to_extract' or anything that is or is not in the UPDATE.APP it will list all images in it.
Typing './splitupdate UPDATE.APP' will extract all files in UPDATE.APP
It will output files to the newly created 'output' folder. The filtering is not perfect. If you use './splitupdate UPDATE.APP RAMDISK', it will extract all images with RAMDISK in its name, so you will get RAMDISK.img and RECOVERY_RAMDISK.img. This is fine for me as the original script extracted everything, which takes long for the larger images.

And if you use the 'special' version:
'chmod +x simg2img'
'chmod +x mount.sh'
I edited the splitupdate script for the 'special' version just to make it easier for me as I like to check SYSTEM, VENDOR, PROCDUCT and those images for changes.
So it made it easier if it extracted directly to the root of 'split' folder instead of 'output', then I could run the mount.sh script directly.
To use mount.sh, first edit the script and replace YOUR_SUDO_PASSWORD_HERE with your password or remove 'echo YOUR_SUDO_PASSWORD_HERE | ' and input password manually when it asks.
Then simply extract SYSTEM.img (or Product, vendor, odm whichever you like) and './mount.sh SYSTEM' (yes, no extension).
This will convert SYSTEM.img to SYSTEM.raw and mount it to 'split_folder/SYSTEM/' as a loop device, it will also chmod 777 everything in SYSTEM/.



Linux ADB and Fastboot
Use google for this one. ADB usually works fine right away, Fastboot might get 'no permissions' and need to be run as sudo if it's missing udev permissions/entries.
You can make fastboot work without sudo but it's easier to google it as it might get lengthy and there are a lot of different distros of linux (I use Ubuntu)
 
Last edited:

lingarajug

Senior Member
Apr 6, 2010
468
75
Roanoke, VA
Hi ante0, i have downloaded the bla a09 8.0.0.109 c567 which is the recent update for my US mate 10 pro version, i was using hisuite to update my phone which is failing but i was able to grab the update which it down loaded and it has the following files in it, bla-a09_hw_usa( which contains update_full_BLA-A09_hw_usa, public( which contains update_data_full_public), update.zip which contains update.app and other xml files, i have already bl unlocked and rooted with supersu but i wanted to install magisk and i installed twrp and tried sideloading magisk but it fails stating boot image already modified and advised flask stock boot, so which files do i need to flash and what are the fastboot commands to do so and i was also thinking about complete bl lock just to make it look like new phone and how do i do that, please direct me, thank you.
 

lingarajug

Senior Member
Apr 6, 2010
468
75
Roanoke, VA
I think to update you'll need to:
A) Unroot your supersu.
B) Restore stock boot and restore your stock recovery with guide in OP and with the firmware files actually installed on your phone.

Then you could root oreo with magisk.

there lies my problem, i am trying to flash an updated stock firmware than the one that came with my phone, i have unrooted supersu and deleted supersu app and dont have root anymore confirmed by rootcheck apps, since my boot is already patched once magisk wont flash and advising me to flash stock boot image but i dont know which to flash as with oreo there seems to be different partitions and i dont know commands other than basic fastbbot commands to flash stuff.
 

lingarajug

Senior Member
Apr 6, 2010
468
75
Roanoke, VA
ok so i was able to flash ramdisk, recovery and system and boot back to OS ( i have earlier erased system by mistake) and i have flashed system.img from updated firmware but version still shows old one, and i am trying to use funkyhuawei erecovery method to flash the updated firmware and when i boot to erecovery to update but the update button is missing and i just have rebbot, wipe date/fr and wipe cache, so what do i need to flash and commands for it in order to make erecovery work and i have update button enabled, thank you.
 

ante0

Senior Member
Dec 28, 2009
3,207
1,577
Stockholm
ok so i was able to flash ramdisk, recovery and system and boot back to OS ( i have earlier erased system by mistake) and i have flashed system.img from updated firmware but version still shows old one, and i am trying to use funkyhuawei erecovery method to flash the updated firmware and when i boot to erecovery to update but the update button is missing and i just have rebbot, wipe date/fr and wipe cache, so what do i need to flash and commands for it in order to make erecovery work and i have update button enabled, thank you.

If you can, use the HWOTA method instead. It's free and found: https://forum.xda-developers.com/mate-10/how-to/guide-mate-10-flash-oreo-update-package-t3716814
If you can't use HWOTA and have to use Funky:
You seem to be in normal Recovery. You should see a button that says 'Download latest firmware', the one you're describing is showing buttons that are in normal Recovery.
Are you booting using Usb plugged in + vol up + power?
 

lex71

Member
Jan 22, 2014
16
0
Not sure if this is the right place but where can I find the original Huawei OS it was shipped with? I installed Lineage and want to go back to Factory.

I just want to .img file. I have only unlocked the bootloader not rooted the phone.
Lack of camera and other features means I need to get back.

Any ideas?
 
Last edited:

lingarajug

Senior Member
Apr 6, 2010
468
75
Roanoke, VA
There is no way at least for the US version to find firmwares shipped with phone until now, i figured it out by connecting phone to hisuite on PC and it showed update available and i clicked update and waited until download part of update process completed and then i went to documents folder and hisuite and the app stores the download there and it will have 3 zip files, u can copy them to a different place because once the update completes those files are deleted. Might be the same for other models if supported by hisuite.
 

dark3bod

Senior Member
Jan 5, 2015
107
8
RIYADH
can i flash everything in UPDATE.APP to go back to fully stock.
if i can what is the fastboot command for every one of them files like "fastboot flash ramdisk RAMDISK.img'?
ive mate 10 pro.
 

ante0

Senior Member
Dec 28, 2009
3,207
1,577
Stockholm
Not sure if this is the right place but where can I find the original Huawei OS it was shipped with? I installed Lineage and want to go back to Factory.

I just want to .img file. I have only unlocked the bootloader not rooted the phone.
Lack of camera and other features means I need to get back.

Any ideas?

It should say your current firmware (besides Lineage) in Settings -> (System?) -> About.

can i flash everything in UPDATE.APP to go back to fully stock.
if i can what is the fastboot command for every one of them files like "fastboot flash ramdisk RAMDISK.img'?
ive mate 10 pro.

It's better to use:
https://forum.xda-developers.com/mate-10/how-to/guide-mate-10-flash-oreo-update-package-t3716814

I'm not sure if symlinks will be set up correctly if you flash images directly. And some partitions can't be flashed from fastboot (like the erecovery ones)
 
Last edited:

Bearshare007

Member
Feb 4, 2018
22
1
It should say your current firmware (besides Lineage) in Settings -> (System?) -> About.



It's better to use:
https://forum.xda-developers.com/mate-10/how-to/guide-mate-10-flash-oreo-update-package-t3716814

I'm not sure if symlinks will be set up correctly if you flash images directly. And some partitions can't be flashed from fastboot (like the erecovery ones)

@ante0

This man is a legend.........
I would like to express my gratitude in you answering my pms and assisting to get the device up and running.
If ever am in Sweden:silly: ill definitely buy you beeeeeeeeeeeeeeeeeeeeeeers
Thanks for the patience and the help you bring to us noobs bricking these bloody Mate 9's
 
  • Like
Reactions: rickd88

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    There seems to be a little confusion on how to do this and I've written down how to in many posts now so I figure I'd just write it down in a little guide.

    What you need:
    Firmware update.zip from http://pro-teammt.ru/firmware-database/

    Windows only: Huawei Update Extractor

    Linux/Mac(?)/(Windows too): splitupdate perl script (requires perl)
    Direct link: https://mega.nz/#!4PBknJrK!iZQDI4ti6ERmQJC6afgUGTSvHHKcm9KFz9okmwwez3I
    Source: https://github.com/marcominetti/split_updata.pl/tree/f5f415262be3487de28321b49dcb69d947897bf1
    (Or my 'special' version https://mega.nz/#!NS4VnL7Q!5GMn-soCf_WMW6fZANd-TDzxjQkZW2LynEQtJ_TlUdU which extracts
    to the same folder as 'splitupdate' instead of 'output/', and includes a mount script (Linux only, maybe Mac?) for extraction of files of the different images)


    Archive extractor of your choice (7zip, winrar, winzip and so on.)


    Firmware build
    First you need to determine what your current firmware is, this can be done by going to 'Settings -> System -> About Phone' on your phone. Check 'Build Number'.
    Mine says:
    cV9BEYr.png

    BLA-L29 8.0.0.132(C636) (Replace 8.0.0. with C636 and add a B infront of 132 :eek:)
    This can be translated into BLA-L29C636B132.
    Now we have our current firmware!


    Info on Nougat -> Oreo
    As of Oreo the partitions changed a little.
    'Boot' partition was split into 'ramdisk' and 'kernel'.
    'Recovery' partition was split into 'recovery_ramdisk', 'recovery_vendor' and 'recovery_vbmeta', and shares the 'kernel' partition with 'ramdisk'.
    The one's you probably want to flash are 'ramdisk' and 'recovery_ramdisk'. (Ramdisk is where Magisk/SuperSU goes, recovery_ramdisk is where TWRP goes)


    Firmware update.zip
    In this example I will be using my firmware, BLA-L29C636B132.
    First start by going to http://pro-teammt.ru/firmware-database/ and enter your full firmware in the 'Enter model', click on Find Model.
    ykxgVa1.png


    This is what it will look like after you have searched. Locate the row that says FullOTA-MF and click on the 'update' link in that row.
    When it's downloaded, open update.zip in your choice of archive manager and extract UPDATE.app to your desktop or somewhere easy to find.
    RaVSqO6.png



    Huawei Update Extractor:
    Download Huawei Update Extractor from the link above, it's attached to first post in that thread I linked to (v0.9.9.5).
    Extract the zip to your desktop (Or Downloads folder).
    Enter the newly created folder that should be named 'HuaweiUpdateExtractor_0.9.9.5', and run HuaweiUpdateExtractor.exe.
    Start by going to the 'Settings' tab and uncheck 'Verify header checksum'.
    (Something is wrong with the header of erecovery_ramdisk, also it's mispelled to erecovery_ramdis, or maybe character limit? The partition on phone is named correctly. This does not need to be unchecked on Nougat firmware)
    jUYtPv6.png


    Then go back to the 'Extract' tab and click on the button that says '...' and open your UPDATE.APP
    03r6ZM7.png


    Rightclick on the file you want to extract and click on 'Extract Selected', this will bring up a dialog where you choose where to extract to.

    After this you can flash the file using fastboot. Take 'ramdisk' for example.
    Make sure you have adb & fastboot installed (https://forum.xda-developers.com/showthread.php?t=2317790)
    Open up a command prompt and connect phone, reboot to fastboot mode using: usb plugged in, power + vol down, release power when phone vibrates.
    Or you can use the command 'adb reboot bootloader'.
    Make sure phone is recognized in fastboot mode with the command: 'fastboot devices', it should show up as a fastboot device.
    Next we can flash RAMDISK.img using: 'fastboot flash ramdisk RAMDISK.img'.

    On Nougat you would extract 'BOOT' from UPDATE.APP and flash using:
    'fastboot flash boot BOOT.img'


    Linux/Mac(?)(and Windows with perl installed, I use Strawberry Perl)
    First download the splitupdate zip from above.
    Extract it and enter the extracted 'split' folder, open a terminal and:
    'chmod +x splitupdate'
    'chmod +x crc'

    Now put your UPDATE.APP in the 'split' folder and open a terminal and use the following command:
    './splitupdate UPDATE.APP file_to_extract'. If you write 'file_to_extract' or anything that is or is not in the UPDATE.APP it will list all images in it.
    Typing './splitupdate UPDATE.APP' will extract all files in UPDATE.APP
    It will output files to the newly created 'output' folder. The filtering is not perfect. If you use './splitupdate UPDATE.APP RAMDISK', it will extract all images with RAMDISK in its name, so you will get RAMDISK.img and RECOVERY_RAMDISK.img. This is fine for me as the original script extracted everything, which takes long for the larger images.

    And if you use the 'special' version:
    'chmod +x simg2img'
    'chmod +x mount.sh'
    I edited the splitupdate script for the 'special' version just to make it easier for me as I like to check SYSTEM, VENDOR, PROCDUCT and those images for changes.
    So it made it easier if it extracted directly to the root of 'split' folder instead of 'output', then I could run the mount.sh script directly.
    To use mount.sh, first edit the script and replace YOUR_SUDO_PASSWORD_HERE with your password or remove 'echo YOUR_SUDO_PASSWORD_HERE | ' and input password manually when it asks.
    Then simply extract SYSTEM.img (or Product, vendor, odm whichever you like) and './mount.sh SYSTEM' (yes, no extension).
    This will convert SYSTEM.img to SYSTEM.raw and mount it to 'split_folder/SYSTEM/' as a loop device, it will also chmod 777 everything in SYSTEM/.



    Linux ADB and Fastboot
    Use google for this one. ADB usually works fine right away, Fastboot might get 'no permissions' and need to be run as sudo if it's missing udev permissions/entries.
    You can make fastboot work without sudo but it's easier to google it as it might get lengthy and there are a lot of different distros of linux (I use Ubuntu)
    1
    I think to update you'll need to:
    A) Unroot your supersu.
    B) Restore stock boot and restore your stock recovery with guide in OP and with the firmware files actually installed on your phone.

    Then you could root oreo with magisk.
    1
    My phone was bricked because of Lineage OS, and i unbricked with this guide. Read my post first.

    You bricked your device because you don't know what you are doing,not because of this guide.Oh,and i thought KangRom was responsible for bricking you device....anyone else to blame ?
    1
    It should say your current firmware (besides Lineage) in Settings -> (System?) -> About.



    It's better to use:
    https://forum.xda-developers.com/mate-10/how-to/guide-mate-10-flash-oreo-update-package-t3716814

    I'm not sure if symlinks will be set up correctly if you flash images directly. And some partitions can't be flashed from fastboot (like the erecovery ones)

    @ante0

    This man is a legend.........
    I would like to express my gratitude in you answering my pms and assisting to get the device up and running.
    If ever am in Sweden:silly: ill definitely buy you beeeeeeeeeeeeeeeeeeeeeeers
    Thanks for the patience and the help you bring to us noobs bricking these bloody Mate 9's
    1
    Im now on lineage os. I didnt flash twrp and magisk. Can i only flash stock system.img to get fully stock. Or i have to flash ramdisk and boot first before system.img

    System.img is enough, as that's all you flashed with lineage