{"id":1344,"date":"2017-02-06T11:57:44","date_gmt":"2017-02-06T11:57:44","guid":{"rendered":"https:\/\/www.phillips321.co.uk\/?p=1344"},"modified":"2017-02-06T11:57:44","modified_gmt":"2017-02-06T11:57:44","slug":"recovering-an-activity-from-a-garmin-920-xt-forerunner","status":"publish","type":"post","link":"https:\/\/www.phillips321.co.uk\/2017\/02\/06\/recovering-an-activity-from-a-garmin-920-xt-forerunner\/","title":{"rendered":"Recovering an activity from a Garmin 920 XT Forerunner"},"content":{"rendered":"<p>So a friend of mine recently competed in a 10mile race (supposedly) and he thinks he tracked the &#8220;ACTIVITY&#8221; on his watch but after the race deleted it by mistake.<br \/>\n<a href=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/IMG_1982.jpg\"><img loading=\"lazy\" src=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/IMG_1982-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" class=\"aligncenter size-medium wp-image-1350\" srcset=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/IMG_1982-300x225.jpg 300w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/IMG_1982-768x576.jpg 768w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/IMG_1982.jpg 960w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>He brought the watch immediately over to me to see if there was anything I could do. Well the watch seems to be pretty nifty and has built in GPS, bluetooth and some other bells and whistles.<\/p>\n<p><a href=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/maxresdefault.jpg\"><img loading=\"lazy\" src=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/maxresdefault-300x169.jpg\" alt=\"\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-1345\" srcset=\"https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/maxresdefault-300x169.jpg 300w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/maxresdefault-768x432.jpg 768w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/maxresdefault-1024x576.jpg 1024w, https:\/\/www.phillips321.co.uk\/wp-content\/uploads\/2017\/02\/maxresdefault.jpg 1280w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The watch comes with a charging dock which i noticed had 4 pins so must have had USB data lines as well las the power. As such I connected the device, mounted it read only, and then cloned the disk and made a working backup:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"kw2\">sudo<\/span> <span class=\"kw2\">dd<\/span> <span class=\"re2\">if<\/span>=<span class=\"sy0\">\/<\/span>dev<span class=\"sy0\">\/<\/span>rdisk3 <span class=\"re2\">of<\/span>=backup.dump<br \/>\n<span class=\"kw2\">cp<\/span> backup.dump working.dump<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>The next thing I ran was foremost against the file system to see if it could find anything interesting:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"co0\"># foremost -v -i working.dump <\/span><br \/>\nForemost version 1.5.7 by Jesse Kornblum, Kris Kendall, and Nick Mikus<br \/>\nAudit File<br \/>\n<br \/>\nForemost started at Mon Feb &nbsp;<span class=\"nu0\">6<\/span> 09:<span class=\"nu0\">16<\/span>:<span class=\"nu0\">41<\/span> <span class=\"nu0\">2017<\/span><br \/>\nInvocation: foremost <span class=\"re5\">-v<\/span> <span class=\"re5\">-i<\/span> working.dump <br \/>\nOutput directory: <span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>output<br \/>\nConfiguration file: <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>foremost.conf<br \/>\nProcessing: working.dump<br \/>\n<span class=\"sy0\">|<\/span>------------------------------------------------------------------<br \/>\nFile: working.dump<br \/>\nStart: Mon Feb &nbsp;<span class=\"nu0\">6<\/span> 09:<span class=\"nu0\">16<\/span>:<span class=\"nu0\">41<\/span> <span class=\"nu0\">2017<\/span><br \/>\nLength: <span class=\"nu0\">10<\/span> MB <span class=\"br0\">&#40;<\/span><span class=\"nu0\">11508224<\/span> bytes<span class=\"br0\">&#41;<\/span><br \/>\n&nbsp;<br \/>\nNum &nbsp;Name <span class=\"br0\">&#40;<\/span><span class=\"re2\">bs<\/span>=<span class=\"nu0\">512<\/span><span class=\"br0\">&#41;<\/span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Size &nbsp;File Offset&nbsp; &nbsp; &nbsp;Comment <br \/>\n<br \/>\n<span class=\"sy0\">*|<\/span><br \/>\nFinish: Mon Feb &nbsp;<span class=\"nu0\">6<\/span> 09:<span class=\"nu0\">16<\/span>:<span class=\"nu0\">41<\/span> <span class=\"nu0\">2017<\/span><br \/>\n<br \/>\n<span class=\"nu0\">0<\/span> FILES EXTRACTED<br \/>\n&nbsp; &nbsp; <br \/>\n<span class=\"re5\">------------------------------------------------------------------<\/span><br \/>\n<br \/>\nForemost finished at Mon Feb &nbsp;<span class=\"nu0\">6<\/span> 09:<span class=\"nu0\">16<\/span>:<span class=\"nu0\">41<\/span> <span class=\"nu0\">2017<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>That didn&#8217;t work so I decided to have a look on the filesystem to see an example of the type of files I should be looking for.<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"co0\"># mkdir filesystem ; mount working.dump filesystem<\/span><br \/>\nroot<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"co0\"># ls filesystem\/<\/span><br \/>\nAUTORUN.INF &nbsp;ERR_LOG.TXT &nbsp;GARMIN<br \/>\nroot<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"co0\"># ls filesystem\/GARMIN\/<\/span><br \/>\nACTIVITY &nbsp;COURSES &nbsp; &nbsp; EVNTLOGS &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;GOALS &nbsp; &nbsp; MLTSPORT &nbsp;NEWFILES &nbsp; &nbsp; RECORDS &nbsp; SCHEDULE &nbsp;SPORTS &nbsp; TEXT &nbsp; &nbsp;WIFI<br \/>\nAPPS &nbsp; &nbsp; &nbsp;DEVICE.FIT &nbsp;GarminDevice.xml &nbsp;LOCATION &nbsp;MONITOR &nbsp; NRF_ERR.TXT &nbsp;REMOTESW &nbsp;SETTINGS &nbsp;TEMPFIT &nbsp;TOTALS &nbsp;WORKOUTS<br \/>\nroot<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"co0\"># ls filesystem\/GARMIN\/ACTIVITY\/<\/span><br \/>\n6CRC0101.FIT &nbsp;712G0619.FIT &nbsp;<span class=\"nu0\">71865606<\/span>.FIT &nbsp;71FE4602.FIT &nbsp;71J72457.FIT &nbsp;71N72941.FIT &nbsp;71RD2701.FIT &nbsp;71VC3005.FIT<br \/>\n6CS95823.FIT &nbsp;<span class=\"nu0\">71495133<\/span>.FIT &nbsp;719B3605.FIT &nbsp;71GC1249.FIT &nbsp;71JB1310.FIT &nbsp;71OG4701.FIT &nbsp;71T73357.FIT &nbsp;<span class=\"nu0\">72370402<\/span>.FIT<br \/>\n6CVE0513.FIT &nbsp;716I5616.FIT &nbsp;71D70320.FIT &nbsp;71I64149.FIT &nbsp;71K70156.FIT &nbsp;71P72020.FIT &nbsp;71V92016.FIT<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>As I now had some example files I will check the headers and footers of each to see if there are any similarities so that I can create<br \/>\nHeaders:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/>26<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>filesystem<span class=\"sy0\">\/<\/span>GARMIN<span class=\"sy0\">\/<\/span>ACTIVITY<span class=\"co0\"># for i in *.FIT ; do xxd -l 16 $i &gt;&gt; heads.txt ; done<\/span><br \/>\nroot<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>filesystem<span class=\"sy0\">\/<\/span>GARMIN<span class=\"sy0\">\/<\/span>ACTIVITY<span class=\"co0\"># for i in *.FIT ; do xxd -l 16 $i; done<\/span><br \/>\n00000000: 0e10 d607 a81b 0000 2e46 <span class=\"nu0\">4954<\/span> 01dc <span class=\"nu0\">4000<\/span> &nbsp;.........FIT..<span class=\"sy0\">@<\/span>.<br \/>\n00000000: 0e10 d607 a03d 0000 2e46 <span class=\"nu0\">4954<\/span> 47b8 <span class=\"nu0\">4000<\/span> &nbsp;.....=...FITG.<span class=\"sy0\">@<\/span>.<br \/>\n00000000: 0e10 d607 a81b 0000 2e46 <span class=\"nu0\">4954<\/span> 01dc <span class=\"nu0\">4000<\/span> &nbsp;.........FIT..<span class=\"sy0\">@<\/span>.<br \/>\n00000000: 0e10 d607 <span class=\"nu0\">9843<\/span> 0000 2e46 <span class=\"nu0\">4954<\/span> db0d <span class=\"nu0\">4000<\/span> &nbsp;.....C...FIT..<span class=\"sy0\">@<\/span>.<br \/>\n00000000: 0e10 d607 4e29 0000 2e46 <span class=\"nu0\">4954<\/span> 9c7d <span class=\"nu0\">4000<\/span> &nbsp;....N<span class=\"br0\">&#41;<\/span>...FIT.<span class=\"br0\">&#125;<\/span><span class=\"sy0\">@<\/span>.<br \/>\n00000000: 0e10 d607 <span class=\"nu0\">3022<\/span> 0000 2e46 <span class=\"nu0\">4954<\/span> a015 <span class=\"nu0\">4000<\/span> &nbsp;....<span class=\"nu0\">0<\/span><span class=\"st0\">&quot;...FIT..@.<br \/>\n00000000: 0e10 d607 668f 0000 2e46 4954 59c9 4000 &nbsp;....f....FITY.@.<br \/>\n00000000: 0e10 d607 ffce 0000 2e46 4954 c1cb 4000 &nbsp;.........FIT..@.<br \/>\n00000000: 0e10 d607 931d 0000 2e46 4954 257b 4000 &nbsp;.........FIT%{@.<br \/>\n00000000: 0e10 d607 4612 0000 2e46 4954 1718 4000 &nbsp;....F....FIT..@.<br \/>\n00000000: 0e10 d607 d747 0000 2e46 4954 dabd 4000 &nbsp;.....G...FIT..@.<br \/>\n00000000: 0e10 d607 a81a 0000 2e46 4954 111c 4000 &nbsp;.........FIT..@.<br \/>\n00000000: 0e10 d607 f910 0000 2e46 4954 7fec 4000 &nbsp;.........FIT..@.<br \/>\n00000000: 0e10 d607 3dbd 0000 2e46 4954 0e85 4000 &nbsp;....=....FIT..@.<br \/>\n00000000: 0e10 d607 6b25 0000 2e46 4954 925a 4000 &nbsp;....k%...FIT.Z@.<br \/>\n00000000: 0e10 d607 e00d 0000 2e46 4954 738b 4000 &nbsp;.........FITs.@.<br \/>\n00000000: 0e10 d607 9241 0000 2e46 4954 78b2 4000 &nbsp;.....A...FITx.@.<br \/>\n00000000: 0e10 d607 700f 0000 2e46 4954 5927 4000 &nbsp;....p....FITY'@.<br \/>\n00000000: 0e10 d607 1acc 0000 2e46 4954 2c7c 4000 &nbsp;.........FIT,|@.<br \/>\n00000000: 0e10 d607 4079 0000 2e46 4954 4df4 4000 &nbsp;....@y...FITM.@.<br \/>\n00000000: 0e10 d607 1511 0000 2e46 4954 6131 4000 &nbsp;.........FITa1@.<br \/>\n00000000: 0e10 d607 89ac 0000 2e46 4954 0503 4000 &nbsp;.........FIT..@.<br \/>\n00000000: 0e10 d607 5b22 0000 2e46 4954 e78e 4000 &nbsp;....[&quot;<\/span>...FIT..<span class=\"sy0\">@<\/span>.<br \/>\nroot<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>filesystem<span class=\"sy0\">\/<\/span>GARMIN<span class=\"sy0\">\/<\/span>ACTIVITY<span class=\"co0\"># cut heads.txt -d&quot; &quot; -f 2-9 | sed 's\/ \/\/g' | sed 's\/.\\{2\\}\/&amp; \/g' &gt; heads_snip.txt<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Footers:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;height:300px;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/>18<br \/>19<br \/>20<br \/>21<br \/>22<br \/>23<br \/>24<br \/>25<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>filesystem<span class=\"sy0\">\/<\/span>GARMIN<span class=\"sy0\">\/<\/span>ACTIVITY<span class=\"co0\"># for i in *.FIT ; do xxd -s -16 $i &gt;&gt; tails.txt ; done<\/span><br \/>\nroot<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>filesystem<span class=\"sy0\">\/<\/span>GARMIN<span class=\"sy0\">\/<\/span>ACTIVITY<span class=\"co0\"># for i in *.FIT ; do xxd -s -16 $i; done<\/span><br \/>\n00001ba8: f077 <span class=\"nu0\">1000<\/span> <span class=\"nu0\">3912<\/span> c532 0100 011a 01ff 315c &nbsp;.w..<span class=\"nu0\">9<\/span>..<span class=\"nu0\">2<\/span>......<span class=\"nu0\">1<\/span>\\<br \/>\n00003da0: 0100 f056 0400 c440 c632 0000 0101 b81b &nbsp;...V...<span class=\"sy0\">@<\/span>.2......<br \/>\n00001ba8: a253 <span class=\"nu0\">1000<\/span> d174 ca32 0100 001a 01ff 469d &nbsp;.S...t.2......F.<br \/>\n00004398: 0100 845e 0400 e434 cd32 0000 0100 2e8b &nbsp;...^...4.2......<br \/>\n0000294e: <span class=\"nu0\">4155<\/span> 1c00 <span class=\"nu0\">1683<\/span> cf32 0100 011a 01ff 9a1c &nbsp;AU.....<span class=\"nu0\">2<\/span>........<br \/>\n00002230: 01a0 1a00 27a6 d232 0100 011a 01ff 89d7 &nbsp;....<span class=\"st_h\">'..2........<br \/>\n00008f66: 0100 90b1 0400 9996 d432 0000 0100 eacb &nbsp;.........2......<br \/>\n0000ceff: ffff 1502 0000 a529 d632 0200 0201 4122 &nbsp;.......).2....A&quot;<br \/>\n00001d93: 3661 2400 c93b db32 0100 011a 01ff 068c &nbsp;6a$..;.2........<br \/>\n00001246: 06a6 1100 0144 de32 0100 011a 01ff e9e9 &nbsp;.....D.2........<br \/>\n000047d7: 0100 9f18 0400 f56d df32 0000 0101 11dd &nbsp;.......m.2......<br \/>\n00001aa8: 6207 1b00 96c9 e132 0100 011a 01ff 3cba &nbsp;b......2......&lt;.<br \/>\n000010f9: 0100 cabb 0400 971e e332 0000 0100 2e4a &nbsp;.........2.....J<br \/>\n0000bd3d: ffff 5202 0000 4653 e332 0200 0201 d1e8 &nbsp;..R...FS.2......<br \/>\n0000256b: 9b6d 2900 1877 e432 0100 011a 01ff b57c &nbsp;.m)..w.2.......|<br \/>\n00000de0: 8a06 0e00 c168 e832 0100 001a 01ff 7a6e &nbsp;.....h.2......zn<br \/>\n00004192: 0100 e34b 0400 5639 ea32 0000 0100 fb3e &nbsp;...K..V9.2.....&gt;<br \/>\n00000f70: 05c5 1100 580a eb32 0100 001a 01ff 10ae &nbsp;....X..2........<br \/>\n0000cc1a: ffff 5d03 0000 a5fe ed32 0200 0201 de55 &nbsp;..]......2.....U<br \/>\n00007940: 0100 5bc6 0400 1e4f f032 0000 0100 e2b1 &nbsp;..[....O.2......<br \/>\n00001115: 0f9e 1200 e90f f332 0100 001a 01ff 931f &nbsp;.......2........<br \/>\n0000ac89: 3d00 c307 5100 c53e f332 0000 0200 43eb &nbsp;=...Q..&gt;.2....C.<br \/>\n0000225b: d57b 1a00 34ea f632 0100 011a 01ff a957 &nbsp;.{..4..2.......Wroot@KaliMJP:\/mnt\/hgfs\/temp\/filesystem\/GARMIN\/ACTIVITY# cut tails.txt -d&quot; &quot; -f 2-9 | sed '<\/span>s<span class=\"sy0\">\/<\/span> <span class=\"sy0\">\/\/<\/span>g<span class=\"st_h\">' | sed '<\/span>s<span class=\"sy0\">\/<\/span>.\\<span class=\"br0\">&#123;<\/span><span class=\"nu0\">2<\/span>\\<span class=\"br0\">&#125;<\/span><span class=\"sy0\">\/&amp;<\/span> <span class=\"sy0\">\/<\/span>g<span class=\"st_h\">' &gt; tails_snip.txt<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>This allows me to identify the following common fields: <strong>0e 10 d6 07 ? ? 00 00  2e 46 49 54 ? ? 40 00<\/strong><\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>filesystem<span class=\"sy0\">\/<\/span>GARMIN<span class=\"sy0\">\/<\/span>ACTIVITY<span class=\"co0\"># for i in {1..16}; do cat heads_snip.txt | cut -d' ' -f$i | uniq -c | sort -nr | head -n 1; done<\/span><br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> 0e<br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> <span class=\"nu0\">10<\/span><br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> d6<br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> 07<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> ff<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> ce<br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> 00<br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> 00<br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> 2e<br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> <span class=\"nu0\">46<\/span><br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> <span class=\"nu0\">49<\/span><br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> <span class=\"nu0\">54<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> e7<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> f4<br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> <span class=\"nu0\">40<\/span><br \/>\n&nbsp; &nbsp; &nbsp;<span class=\"nu0\">23<\/span> 00<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Unfortunately the footers were not so common \ud83d\ude41<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/>17<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>filesystem<span class=\"sy0\">\/<\/span>GARMIN<span class=\"sy0\">\/<\/span>ACTIVITY<span class=\"co0\"># for i in {1..16}; do cat tails_snip.txt | cut -d' ' -f$i | uniq -c | sort -nr | head -n 1; done<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> 01<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> ff<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> f0<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> 00<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> e9<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> 00<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> f6<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> <span class=\"nu0\">32<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> e3<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> <span class=\"nu0\">32<\/span><br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">3<\/span> 00<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> 1a<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">7<\/span> 01<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">2<\/span> ff<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> fb<br \/>\n&nbsp; &nbsp; &nbsp; <span class=\"nu0\">1<\/span> eb<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>As such I could only use a header in my custom scalpel.conf file:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"co0\"># grep -v &quot;#&quot; \/etc\/scalpel\/scalpel.conf <\/span><br \/>\ny <span class=\"nu0\">100000<\/span> \\x0e\\x10\\xd6\\x07??\\x00\\x00\\x2e\\x46\\x49\\x54??\\x40\\x00<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>And then run scalpel:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/>2<br \/>3<br \/>4<br \/>5<br \/>6<br \/>7<br \/>8<br \/>9<br \/>10<br \/>11<br \/>12<br \/>13<br \/>14<br \/>15<br \/>16<br \/><\/div><\/td><td><div class=\"bash codecolorer\">root<span class=\"sy0\">@<\/span>KaliMJP:<span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"co0\"># scalpel -c \/etc\/scalpel\/scalpel.conf -o scalpel_output working.dump <\/span><br \/>\nScalpel version <span class=\"nu0\">1.60<\/span><br \/>\nWritten by Golden G. Richard III, based on Foremost <span class=\"nu0\">0.69<\/span>.<br \/>\n<br \/>\nOpening target <span class=\"st0\">&quot;\/mnt\/hgfs\/temp\/working.dump&quot;<\/span><br \/>\n<br \/>\nImage <span class=\"kw2\">file<\/span> pass <span class=\"nu0\">1<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">2<\/span>.<br \/>\nworking.dump: <span class=\"nu0\">100.0<\/span><span class=\"sy0\">%<\/span> <span class=\"sy0\">|****************************************************************************************************************|<\/span> &nbsp; <span class=\"nu0\">11.0<\/span> MB &nbsp; &nbsp;00:00 ETAAllocating work queues...<br \/>\nWork queues allocation complete. Building carve lists...<br \/>\nCarve lists built. &nbsp;Workload:<br \/>\nfit with header <span class=\"st0\">&quot;\\x0e\\x10\\xd6\\x07\\x3f\\x3f\\x00\\x00\\x2e\\x46\\x49\\x54\\x3f\\x3f\\x40\\x00&quot;<\/span> and footer <span class=\"st0\">&quot;&quot;<\/span> --<span class=\"sy0\">&gt;<\/span> <span class=\"nu0\">93<\/span> files<br \/>\nCarving files from image.<br \/>\nImage <span class=\"kw2\">file<\/span> pass <span class=\"nu0\">2<\/span><span class=\"sy0\">\/<\/span><span class=\"nu0\">2<\/span>.<br \/>\nworking.dump: <span class=\"nu0\">100.0<\/span><span class=\"sy0\">%<\/span> <span class=\"sy0\">|****************************************************************************************************************|<\/span> &nbsp; <span class=\"nu0\">11.0<\/span> MB &nbsp; &nbsp;00:00 ETAProcessing of image <span class=\"kw2\">file<\/span> complete. Cleaning up...<br \/>\nDone.<br \/>\nScalpel is <span class=\"kw1\">done<\/span>, files carved = <span class=\"nu0\">93<\/span>, elapsed = <span class=\"nu0\">0<\/span> seconds.<\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>Now that I had carved out the FIT files I wanted to see if any matched up with the date of the race (5th Feb 2017). To do that it&#8217;s worth using the perl module <a href=\"http:\/\/pub.ks-and-ks.ne.jp\/cycling\/fitdump.shtml\" target=\"_blank\">fitdump<\/a><\/p>\n<p>Sadly nothing came out&#8230;.:<\/p>\n<div class=\"codecolorer-container bash vibrant\" style=\"overflow:auto;white-space:nowrap;width:100%;\"><table cellspacing=\"0\" cellpadding=\"0\"><tbody><tr><td class=\"line-numbers\"><div>1<br \/><\/div><\/td><td><div class=\"bash codecolorer\"><span class=\"co4\">root@KaliMJP:~\/bin# <\/span>.<span class=\"sy0\">\/<\/span>fitdump <span class=\"sy0\">\/<\/span>mnt<span class=\"sy0\">\/<\/span>hgfs<span class=\"sy0\">\/<\/span>temp<span class=\"sy0\">\/<\/span>scalpel_output<span class=\"sy0\">\/<\/span>fit-<span class=\"nu0\">0<\/span>-<span class=\"nu0\">0<\/span><span class=\"sy0\">\/*<\/span> <span class=\"sy0\">|<\/span> <span class=\"kw2\">grep<\/span> <span class=\"st0\">&quot;2017-02-05&quot;<\/span><\/div><\/td><\/tr><\/tbody><\/table><\/div>\n<p>However, this does teach me some of steps involved in data recovery.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So a friend of mine recently competed in a 10mile race (supposedly) and he thinks he tracked the &#8220;ACTIVITY&#8221; on his watch but after the race deleted it by mistake. He brought the watch immediately over to me to see if there was anything I could do. Well the watch seems to be pretty nifty [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1345,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[461,460,458,459,457,462],"_links":{"self":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1344"}],"collection":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/comments?post=1344"}],"version-history":[{"count":5,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1344\/revisions"}],"predecessor-version":[{"id":1351,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/posts\/1344\/revisions\/1351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media\/1345"}],"wp:attachment":[{"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/media?parent=1344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/categories?post=1344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phillips321.co.uk\/wp-json\/wp\/v2\/tags?post=1344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}