Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MD5 checksums of Android APK files differ. Why?

I notice that if I compile an Android app twice, one right after the other with no changes, that the two APK files have two different MD5 checksums. Unsigned and Signed APK files both yield this same result.

You can open it up as a ZIP file and the contents inside there have identical MD5 checksums in both files, so I'm curious.

What else is there? What is it that is different about these two APK files?

like image 338
Melissa Ethrin Avatar asked Mar 26 '12 06:03

Melissa Ethrin


People also ask

Is MD5 the same as checksum?

They are not the same thing. MD5 is a checksum but there are other checksum algorithms that are not MD5, such as SHA, CRC etc. Generally a checksum is a function that takes an input that's larger in size than its output and (it better) produces greatly different outputs even if one bit in the input is changed.

What is MD5 in phone?

MD5 (message-digest algorithm) is a cryptographic protocol used for authenticating messages as well as content verification and digital signatures.

Why do we need MD5 checksum?

An MD5 checksum is a very reliable way to verify data integrity. The MD5 algorithm takes a file of arbitrary length and produces a 128-bit fingerprint of characters and numbers form that file. It is proposed that it is computationally infeasible to produce two messages having the same output of numbers and characters.


1 Answers

The ZIP File Format stores the last modification date inside its header: http://en.wikipedia.org/wiki/Zip_(file_format)#File_headers

So the MD5 Sum differs because the header is slighty different.

like image 84
reox Avatar answered Oct 01 '22 19:10

reox