HMDSW

HMDSW, stands for the firmware developed by Wingtech, Huaqin, Longcheer and SUGE, is the firmware format used by HMD Device Kit.

Despite these firmwares aren't developed by FIH Mobile, they still use the firmware build version format by FIH Mobile.

Structure
Except Unisoc PAC, most of HMDSW firmware is packed with 3-layer of zip.

First layer: user-images zip (Store) + rom.json (deflate) (user-images zip) Second layer: user-update zip (Store) + critical_partitions (deflate) + fastboot binary (deflate) (user-update zip) Third layer: non-critical partitons, like boot.img, dtbo.img, NON-HLOS.bin, system.img, vbmeta.img, vendor.img

Each layers have signature by HMD Global, therefore HCTSW homebrews cannot be used by HMD Device Kit. On newer phones came with Android 10, non-critical partitions are all in the second layer and packed as entire super.img.

Wingtech and SUGE
HMDSW_[actual_codename]-[FIH_Firmware_build_version_excluding_FIH_Project_Code]_[flavor].zip

Huaqin
HMDSW_[actual_codename]-[FIH_Firmware_build_version_excluding_FIH_Project_Code]_[flavor]_[fusestatus]_DeviceKit.zip

Longcheer
HMDSW_[phone_model]-[Alt_build_version_excluding_FIH_Project_Code]_devicekit_[flavor].zip

Sprocomm
Devices with Unisoc SoC: HMDSW_[actual_codename]-[Alt_build_version_excluding_FIH_Project_Code]_[flavor].pac

Explanation
actual_codename: The actual codename of the phone, e.g. panther, ironman.

phone_model: The phone model used on marketplace but doesn't contain dot, e.g. Nokia62, Nokia72.

FIH_Firmware_build_version_excluding_FIH_Project_Code: The firmware build version used by FIH Mobile, but doesn't contain FIH project code. e.g. 1200-0-00WW-B01

Alt_build_version_excluding_FIH_Project_Code: The altered firmware build version display format. e.g. 00WW_1_200_B01

flavor: Which kind of device is the firmware targeted. e.g. user, dev.

fusestatus: If the firmware will blow the secure boot fuse or not. e.g. SecBoot.

HMDSW firmware packages naming scheme by HCT
HMDSW_[FIH_Firmware_Build_Version]_[SKUID]_[Android_OS_Version]_[Android_Security_Patch_Level]_[ODM_name]_[ODM_codename].full.[compress_method].[sha256_checksum].[extensionname]

Explanation
FIH_Firmware_Build_Version: The firmware build version used by FIH Mobile. See FIH Firmware Build.

SKUID: Default SKUID used for this firmware. For more details, see SKUID.

Android_OS_Version: Which Android OS version is included with this build. For Android 8.x or older, it's shown just like 8.1.0 or 7.1.1. For Android 9, it's only shown as 9 or 10.

Android_Security_Patch_Level: Which Android OS version is included with this build, and the format is YYYYMMDD, e.g. 20180905.

ODM_name: About the phone made by which ODM.

ODM_codename: The codename used by ODM.

compress_method: How the package is compressed, currently all of sorted firmwares use LZMA2 compress method. But for the firmwares specific for Unisoc devices, it will be indicated as PAC.

sha256_checksum: The SHA-256 checksum, safe and mainstream checksum method, but the con is it will make the filename really long.

extensionname: The package format, currently all of sorted firmwares use 7z.

About rom.json
The rom.json is descriptor of what partitions the HMD Device Kit or other compatible flasher will handle.

Typical example of rom.json:

{   "Device_ID": "[used by ODM]", "SKU_ID": "00WW", "Rom_Version": "[used by ODM]", "Android_Version": "10",

"Rom_Path": "[HMDSW_FW_NAME]-images.zip", "Rom_Size": "[size-in-byte]", "SHA-256": "[sha256-checksum]", "Require_FDR": false, //"System_Zip": "empty_Update.zip", "System_Zip": "[third-layer-zip].zip",

"Requires": { },

"Pre_Partitions": { "vbmeta_system": "vbmeta_system.img", "super": "super.img", //"abl": "abl.elf", },

"Required_Reboot_Partitions" : { //"partition": "gpt_both0.bin" },

"Post_Partitions" : { // second bootloader, resources power manager, audio/sensors dsp. "xbl": "xbl.elf", "xbl_config": "xbl_config.elf", "tz": "tz.mbn", "rpm": "rpm.mbn", "hyp": "hyp.mbn", "dsp": "dspso.bin", "abl": "abl.elf", "qupfw": "qupv3fw.elf", // tz       "cmnlib": "cmnlib.mbn", "cmnlib64": "cmnlib64.mbn", "keymaster": "km4.mbn", "devcfg": "devcfg.mbn", "uefisecapp": "uefi_sec.mbn", ///"pmic": "pmic.elf", /*m528 donot have the file pmic.elf*/ "bluetooth": "BTFM.bin", ///"mdtpsecapp": "mdtpsecapp.mbn", ////"metadata": "metadata.img",/* it should relate with userdata*/ //"mdtp": "mdtp.img", "dtbo": "dtbo.img", "boot": "boot.img", "imagefv": "imagefv.elf", "recovery": "recovery.img", "modem": "NON-HLOS.bin", //add the leaking partition for androidQ "vbmeta": "vbmeta.img", //"apdp": "apdp.mbn", "logfs": "logfs_ufs_8mb.bin", "storsec": "storsec.mbn", //"elableinfo": "elableinfo.img",

// should not been updated after leave factory. // "persist": "persist.img",

// the modem efs. should NEVER been updated after leave factory. // "fsg": "fs_image.tar.gz.mbn.img",

// not used, should disable it in our proj. // "mdtp": "mdtp.img",

// these images are packed into update.zip @{ // "boot": "boot.img" // dtbo means devicetreeblob // "dtbo": "dtbo.img", // "system": "system.img" // "vendor": "vendor.img" // recovery is not present while A/B update enabled // "recovery": "recovery.img" // vbmeta means vendor/boot meta data // @}

//"abl": "abl.elf",

///"splash": "splash.img", /*[odm codename] donot have the file pmic.elf*/

// S"userdata": "userdata.img",  /*the customer can select*/ // not present while A/B update enabled. // "cache": "cache.img", }, }