Tested with Huawei Matebook X Pro (MACH-WX9) This is more or less a step by step tutorial, written 02/2021. Sadly at the moment Huawei does not ship a package in Linux Vendor Firmware Service.
Please note that you can damage ("brick") your device if something goes wrong or is done incorrectly. This is for the advanced user! I can only say that I flashed the new firmware 0.1.33 to my MACH-WX9 successfully.
dennemann.blog THX!!!
sudo apt install lshw
sudo lshw
...
description: Motherboard
product: MACH-WX9 # <=== !!!
vendor: HUAWEI
...
*-firmware
description: BIOS
vendor: HUAWEI
physical id: 0
version: 1.18
date: 08/30/2018
Side-Note: BIOS version of firmware 0.1.24 does not match the firmware version. With firmware 0.1.33 Huawei shipped also BIOS 1.33.
sudo apt install fwupd # the packager script is shipped with the fwupd package, at least with the package in Ubuntu Bionic.
sudo apt install gcab p7zip-full python3
Firmware Download URLs
- 2020 Edition (MACHC-...): https://consumer.huawei.com/en/support/laptops/matebook-x-pro-2020/
- 2019 Edition (MACHR-...): https://consumer.huawei.com/en/support/laptops/matebook-x-pro-2019/
- Pre-2019 (MACH-...): https://consumer.huawei.com/en/support/laptops/matebook-x-pro/
fwupdmgr get-devices
MACH-WX9 System Firmware
Guid: 085c293a-051a-4cc2-b0a5-0ddb7105fdbf
Important: You need to tell the packager where to find the UEFI Flash Descriptor ("FD"). The location changed since 0.1.24, now with 0.1.33 you find it like this:
7z x MateBook_X_Pro_BIOS_1.33.zip
cd MateBook_X_Pro_BIOS_1.33/
7z x MateBook_X_Pro_BIOS_1.33.zip
7z x MHIKR133.exe
7z x BIOS_1.33.exe
There it is: UEFI_FW.bin
Check, if there is an FD file layout inside:
7z l UEFI_FW.bin
Date Time Attr Size Compressed Name
------------------- ----- ------------ ------------ ------------------------
..... 19328 19328 .text
..... 608 608 UEFI_FW
..... 224 224 .xdata
..... 7521664 7521664 .reloc
..... 1456 1456 CERTIFICATE
------------------- ----- ------------ ------------ ------------------------
7543280 7543280 5 files
/usr/share/fwupd/firmware-packager --firmware-name HuaweiBIOS --device-guid 085c293a-051a-4cc2-b0a5-0ddb7105fdbf --developer-name Huawei --release-version 0.1.33 --exe ./BIOS_1.33.exe --bin ./UEFI_FW.bin --out firmware_bios_update.cab
Using temp directory ...
Extracting firmware exe
Locating firmware bin
Creating metainfo
Cabbing firmware files
Done
sudo fwupdmgr install ./firmware_bios_update.cab
Decompressing… [***************************************]
Authenticating… [***************************************]
Installing on MACH-WX9 System Firmware… ]
Scheduling… [***************************************]
An update requires a reboot to complete. Restart now? [Y|n]:
Then the system needs to be rebooted and F12 must be pressed, to choose booting the updater, which is located on the NVME (EFI Partition) in the menu.
yes,the same error for me
This one worked
firmware_packager.py --firmware-name HuaweiBIOS --device-guid --developer-name Huawei --release-version 65574 --version-format org.uefi.capsule --update-protocol number --exe ./BIOS_1.37.exe --bin ./UEFI_FW.bin --out firmware_bios_update.cab
note the --release-version parameter it is taken from
fwupdmgr get-devices
output for current version + 1, otherwise it wouldn't start the update
System Firmware:
│ │ Current version: 65573
firmware_packager.py is not installed with fwupd package, so I had to clone it from fwupd git repo (https://github.com/fwupd/fwupd) and it worked just fine specifying the full path to .py file
--version-format org.uefi.capsule
--update-protocol number
experimentally defined.
guid is for my laptop is represented with 3 values, I've taken the first one and it worked fine
There was also no "update mode" in UEFI screen, but after fwupdmgr install command the 2 disks appeared in the boot list, so I've disabled the first one, booted and seen the update progress bar.