How to handle .tar.md5 files
<p>I was wondering about how to create / extract / verify <code>.tar.md5</code> files. These files are used when flashing images to android devices, see <a href="http://donandroid.com/odin-tutorial-how-to-use-odin-to-flash-rom-on-android-device-634" rel="noreferrer">here</a> for example.</p>

<p>As far as I can tell the checksum is appended to the file like this:</p>

<pre><code>cp file.tar file.tar.md5
md5sum file.tar &gt;&gt; file.tar.md5
</code></pre>

<p>Firstly I would like to know how to extract the file. Can I simply use <code>tar -xf</code> on the <code>file.tar.md5</code>?</p>

<p>How can I verify the integrity of the file? I would like to remove the last bytes (containing the checksum) from the file to obtain the original file back. I guess you would have to use a regexp to match the <code>checksum  file.tar</code>? Is something like this implemented somewhere already?</p>