Garmin Edge 705 Data Recovery with DD & XML
After recently taking part in a race across Scotland, using a Garmin GPS device (Edge 705) I had around 12 hours of GPS data which unfortunately seemed to get corrupted during the ride.
The device was properly displaying the data on the unit, but Windows, OSX and Linux were all failing to read the data, prompting to format the device which would remove all the data.
After contacting Garmin support they said the device was no longer readable, had to be formatted and loaded with the firmware again even though the data was still intact on the device.

Rather than losing the data I had a further look into it:
Using dd I made a copy of the raw data from the device, giving a 1gb dump of raw data from the drive. Using a range of consumer data recovery applications I was able to restore various routes and GPS logs from the previous month, but only about 5% of the route I was interested in..
I had a look in the dump of the disk directly, after looking for the expected XML (Garmin TCX Schema) I managed to extract around 20mb of XML data from the 1gb dump. Unfortunately the logs all seemed to be fragmented with various corrupted data points, so I wrote a quick application to only extract data from the relevant dated log, giving me a XML dump of all the trackpoints. Luckily the redundancy within XML data meant having missing elements wasn’t much of an issue.

After getting this, the XML had to be indented and the additional Garmin header tags to be added, and finally a readable log file!
So, if your Garmin device does get corrupted and isn’t readable (this seems to be a fairly common problem in the wet), all isn’t lost!
Here’s an overview of the recovered GPS data:
Tags: gps, garmin, gpx, data, recovery, 705, edge
Tweet
