Signature and truncation error #3

Closed
opened 2019-12-17 16:20:13 +00:00 by troublescooter · 2 comments
troublescooter commented 2019-12-17 16:20:13 +00:00 (Migrated from github.com)

I was trying to extract a .rgn file obtained from
http://download.garmin.com/software/fenix3_tactixBravo_quatix3_940.rgn
by ./gcddump.py fenix3_tactixBravo_quatix3_940.rgn fenix3 which gives me the error

~/src/gcd-parser:λ ./gcddump.py fenix3_tactixBravo_quatix3_940.rgn fenix3
Opening fenix3_tactixBravo_quatix3_940.rgn
Traceback (most recent call last):
  File "./gcddump.py", line 19, in <module>
    gcd = Gcd(FILE)
  File "/home/c/src/gcd-parser/grmn/gcd.py", line 33, in __init__
    self.load()
  File "/home/c/src/gcd-parser/grmn/gcd.py", line 43, in load
    raise ParseException(RED + "Signature mismatch ({}, should be {})!".format(repr(sig) + RESET, repr(GCD_SIG)))
grmn.gcd.ParseException: Signature mismatch (b'KpGrd\x00\x02\x00', should be b'GARMINd\x00')!

Disabling signature checking gives me another error

~/src/gcd-parser/:λ ./gcddump.py fenix3_tactixBravo_quatix3_940.rgn fenix3
Opening fenix3_tactixBravo_quatix3_940.rgn
WARNING: File truncated. End marker not reached yet. (pos=2093176)
Dumping to fenix3.rcp

Any thoughts?

I was trying to extract a .rgn file obtained from http://download.garmin.com/software/fenix3_tactixBravo_quatix3_940.rgn by `./gcddump.py fenix3_tactixBravo_quatix3_940.rgn fenix3` which gives me the error ``` ~/src/gcd-parser:λ ./gcddump.py fenix3_tactixBravo_quatix3_940.rgn fenix3 Opening fenix3_tactixBravo_quatix3_940.rgn Traceback (most recent call last): File "./gcddump.py", line 19, in <module> gcd = Gcd(FILE) File "/home/c/src/gcd-parser/grmn/gcd.py", line 33, in __init__ self.load() File "/home/c/src/gcd-parser/grmn/gcd.py", line 43, in load raise ParseException(RED + "Signature mismatch ({}, should be {})!".format(repr(sig) + RESET, repr(GCD_SIG))) grmn.gcd.ParseException: Signature mismatch (b'KpGrd\x00\x02\x00', should be b'GARMINd\x00')! ``` Disabling signature checking gives me another error ``` ~/src/gcd-parser/:λ ./gcddump.py fenix3_tactixBravo_quatix3_940.rgn fenix3 Opening fenix3_tactixBravo_quatix3_940.rgn WARNING: File truncated. End marker not reached yet. (pos=2093176) Dumping to fenix3.rcp ``` Any thoughts?
troublescooter commented 2019-12-17 17:42:25 +00:00 (Migrated from github.com)

I figured out I was erroneously trying to apply gcddump to the wrong file format.
I'm still in the fog however as to how these different file formats are tied together.
Can you explain how gcd and rgn are connected?

Additionally, do you have any pointers to or experience with flashing custom images?

I figured out I was erroneously trying to apply gcddump to the wrong file format. I'm still in the fog however as to how these different file formats are tied together. Can you explain how gcd and rgn are connected? Additionally, do you have any pointers to or experience with flashing custom images?
mbirth commented 2019-12-17 18:16:47 +00:00 (Migrated from github.com)

RGN is their "older" firmware format. It's basically just a list of a "region" (memory location/data type) and the binary blob. See https://www.memotech.franken.de/FileFormats/Garmin_RGN_Format.pdf . Devices need to verify the blob on their own.

GCD is what the newer devices are using. That one adds metadata such as the target device ID and firmware version. See https://www.memotech.franken.de/FileFormats/Garmin_GCD_Format.pdf .

I never tried custom images, just cross-flashing, e.g. D2 Delta firmware onto a Fenix 5 Plus.

RGN is their "older" firmware format. It's basically just a list of a "region" (memory location/data type) and the binary blob. See https://www.memotech.franken.de/FileFormats/Garmin_RGN_Format.pdf . Devices need to verify the blob on their own. GCD is what the newer devices are using. That one adds metadata such as the target device ID and firmware version. See https://www.memotech.franken.de/FileFormats/Garmin_GCD_Format.pdf . I never tried custom images, just cross-flashing, e.g. D2 Delta firmware onto a Fenix 5 Plus.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mbirth/gcd-parser#3
No description provided.