Version file format - galaxy4public/hkmcavn-tools GitHub Wiki

In each firmware distribution for GEN5W a version file is included at the top of the downloaded firmware file hierarchy. This article describes the format of the version file.

A sample version file from 2022 KIA Sportage (only first 5 lines are shown since they demonstrate all of the variants needed for this article)

$ head -5 NaU/2022_Sportage_AU/2022_Sportage_AU.ver
+|22Q1|NQ5.AUS.S5W_L.001.001.221223|KM|2022_Sportage_AU|1485|1
2022_Sportage_AU|.lge.upgrade.xml|14|1674057719|17538|1
2022_Sportage_AU|.whatsnew.tar.gz|14|-2122836011|67618258|1
2022_Sportage_AU|AppUpgrade|14|1609378704|4641492|1
2022_Sportage_AU\HU\firmware|update.tar.gz|14|600857331|55460389|1

The file is a text file with each line representing one particular object (in most cases, a corresponding file). The file starts with a header line followed by one or more lines describing each file in the firmware distribution. Each line (including the header) consists of multiple fields separated by |. It is unknown whether the firmware code could handle an escaped | in the path name, therefore it is not advisable to introduce this character into the path names.

The header line contains seven fields:

Field Sample value Description
Marker + All observed version files had + in this field, which suggests it is a marker for the header line
Map Version 22Q1 Version of the Navigational Data included in the firmware package
SW Version NQ5.AUS.S5W_L.001.001.221223 Designated version of the firmware
Vendor KM HM - Hyundai, KM - KIA, ?? - Genesis
Model 2022_Sportage_AU Human-readable model description, seems to be quite arbitrary with no strict conventions on naming
Model ID 1485 An internal Model ID that corresponds to a specific model in the line-up
Unknown 1

Each file line contains six fields:

Field Sample value Description
Path 2022_Sportage_AU\HU\firmware Path relative to the version file (note that it uses \ as the directory separator)
File update.tar.gz The file name this line describes
Version 14 A version of the file (does not seem to hold any particular value, just a number incrementally updated)
CRC32 600857331 This is a standard CRC32 of the file content, except it is represented as a decimal signed 32-bit integer
Size 55460389 The file size in bytes, seems to be a decimal 64-bit integer (not sure whether it is signed or not)
Unknown 1