Closed throwaway96 closed 1 year ago
New changes:
open()
was being checked incorrectly.I have tested this with two big endian EPKv1 files. One of them came from this LG support page (direct link), where the version given is 03.49.00. This EPK was previously treated as having a version of 00.03.49.00
, but it now matches LG's with 03.49.00
. My guess is that the first byte is just padding and always zero. I added a warning message to be displayed when a nonzero padding byte is encountered. If anyone comes across such an EPK, I'd like to hear about it.
Thanks for the effort, and the testing
When I tried to extract
0.1.57.85_ota.epk
(32LH2000), I was getting output directories like03.75.00.f67130b0-<junk>
. The problem was that the format string being used for the version (EPK_VERSION_FORMAT
) requires four version number arguments, but only three were given. The last one was printing the address of a string, and the%s
afterward was printing garbage (the beginning of the header, apparently). Now when I extract it, the directory is03.75.00-HE_DTV_GP_M_AAAAABAA
.The incorrect version was also showing up in the header information:
I don't have any other EPKv1 file of the other types (big endian and "new") to test this on. I also don't know if EPKv1 versions are supposed to only have three components.
I also added some error checking to give users an idea of what went wrong instead of just crashing.