# Md5



## Nick.Tbolt (Aug 14, 2011)

Thanks


----------



## loonatik78 (Jul 24, 2011)

Nick.Tbolt said:


> What is an MD5 SUM? Everything says to check the md5 then flash, but I have never check what it is, so I'm just wondering what it does
> 
> Sent from my ADR6400L using Tapatalk


The link in my sig answers that question. Down around the part about flashing radios and the such. Basically, it's a method, one of MANY, used for checking data integrity. The file is run through a mathematical formula and the output is a string of letters and numbers; what the dev provides. And device with busybox can check an MD5 through terminal or ADB. Apps are also available. I tend to recommend ADB/terminal because it's just faster.


----------



## headcheese (Aug 1, 2011)

i downloaded an exe on my pc that i used i just googled md5 it was like 500k

i use android file verifier on my phone. works well but sort of a pita cause it doesnt let you paste one in there or verify it to whats on the clip board. but still works.

its a good habit to always check the md5 i havent been burned yet, but it could definetey save some hassle.

basically its a file's "fingerprint"


----------



## JBirdVegas (Jun 11, 2011)

I've had transmission errors in zips before @koush thought of this so USUALLY the file will just fail to load in recovery

But checking is good policy


----------



## HalosGhost (Jun 29, 2011)

JBirdVegas said:


> I've had transmission errors in zips before @koush thought of this so USUALLY the file will just fail to load in recovery
> 
> But checking is good policy


For things like ROM zips flashed in-recovery, it's usually not that big of a deal. As JBird said, it will very commonly just fail if the download was bad. However, if you're doing lower-level edits (like flashing a radio in HBOOT, or for that matter, fastboot flashing an HBOOT), it's not guaranteed that it will reject bad downloads. And lower-level edits (if done incorrectly) can result in perma-bricks. I believe someone said that you can get fastboot to flash a textfile as a recovery if you want, which would most certainly destroy any chance of using the recovery function again without reflashing it (which might be a pain). So, for ROM.zips, I usually don't check, but for anything lower-level, I always check. And if it's ever off, even by a digit, DONT flash it.

All the best,

-HG


----------



## DeTard (Jul 21, 2011)

HalosGhost said:


> And if it's ever off, even by a digit, DONT flash it.


Hah, if you ever find out your MD5 is exactly 1 digit off, it's almost guaranteed to have been a typo by the dev that posted it. If it's genuinely correct, you should go buy a lottery ticket right away because that's almost impossible to have just a single calculated number off!

For example, here's the MD5 of the 2.11.605.3 RUU leak: B633D651471CA4AA184E7EF66AD60DDF
Here's the same file with exactly ONE character deleted randomly and resaved: 3E9C37511429BC58BC114EFBDCD983B9

So yeah, if it's very close but like a single digit off, check with the dev. It's more likely they made a typo somehow.


----------



## loonatik78 (Jul 24, 2011)

DeTard said:


> Hah, if you ever find out your MD5 is exactly 1 digit off, it's almost guaranteed to have been a typo by the dev that posted it. If it's genuinely correct, you should go buy a lottery ticket right away because that's almost impossible to have just a single calculated number off!
> 
> For example, here's the MD5 of the 2.11.605.3 RUU leak: B633D651471CA4AA184E7EF66AD60DDF
> Here's the same file with exactly ONE character deleted randomly and resaved: 3E9C37511429BC58BC114EFBDCD983B9
> ...


What are you talking about? Seems like every time I turn around you're posting some jibberish that makes no sense whatsoever.


----------



## DeTard (Jul 21, 2011)

loonatik78 said:


> What are you talking about? Seems like every time I turn around you're posting some jibberish that makes no sense whatsoever.


One, just because you have NO clue what I'm talking about doesn't mean it doesn't make sense. What I just posted was accurate. Also, I try not to take myself so seriously as you clearly think I should.


----------



## HalosGhost (Jun 29, 2011)

To settle things. Yes, it is statistically ridiculous for a calculated md5 to be 1 digit off from the expected md5. But, it is possible, and if you ever get non-matching md5s ever (even if only one digit), don't flash before asking the poster is the sum is correct and redownloading.

Safety comes first so that "sorry" never has to.

All the best,

-HG


----------



## dangerous (Jun 14, 2011)

DeTard said:


> One, just because you have NO clue what I'm talking about doesn't mean it doesn't make sense. What I just posted was accurate. Also, I try not to take myself so seriously as you clearly think I should.


I'm with loonatik78 on this. a Hash is a Hash. your previous post made no sense to me..


----------



## loonatik78 (Jul 24, 2011)

DeTard said:


> One, just because you have NO clue what I'm talking about doesn't mean it doesn't make sense. What I just posted was accurate. Also, I try not to take myself so seriously as you clearly think I should.


Well, I think everyone and their mamma knows if you open up a file, screw with a character or two, and save it, that you'll end up with a different MD5. That's kinda the point of an MD5!!! You don't make any sense because type o's would be factored into an MD5 run on ANY file. Where else would you get an MD5 if not from the file with the type o? I can absolutely promise you EVERY dev knows what an MD5 is and how to properly generate one for his finished work. Any dev worth his salt knows if you edit so much as a single character, a new MD5 is required. You make it sound like if it's wrong it's probably some sloppy dev out there fat-fingering his keyboard. That's RARELY the case. I'm serious because this can mean the difference between bricking your device or not if you're flashing a radio. You're example was nonsensical, unless your point was to illustrate what a corrupted file MD5 might look like.

I'm not looking for friction here. I'm looking to just provide solid, useful information. Clearly I'm not the only one that is thoroughly confused by the usefulness of the "information" you've posted.


----------



## HalosGhost (Jun 29, 2011)

Mods, feel free to lock this thread. Question has been answered.

All the best,

-HG


----------



## DeTard (Jul 21, 2011)

loonatik78 said:


> Well, I think everyone and their mamma knows if you open up a file, screw with a character or two, and save it, that you'll end up with a different MD5. That's kinda the point of an MD5!!! You don't make any sense because type o's would be factored into an MD5 run on ANY file. Where else would you get an MD5 if not from the file with the type o? I can absolutely promise you EVERY dev knows what an MD5 is and how to properly generate one for his finished work. Any dev worth his salt knows if you edit so much as a single character, a new MD5 is required. You make it sound like if it's wrong it's probably some sloppy dev out there fat-fingering his keyboard. That's RARELY the case. I'm serious because this can mean the difference between bricking your device or not if you're flashing a radio. You're example was nonsensical, unless your point was to illustrate what a corrupted file MD5 might look like.
> 
> I'm not looking for friction here. I'm looking to just provide solid, useful information. Clearly I'm not the only one that is thoroughly confused by the usefulness of the "information" you've posted.


The point has been missed. My point wasn't that devs are sloppy and make clumsy mistakes all the time. My point was that if you ever do see an MD5 that is incredibly close to what you were expecting to see, it's more likely a typo than a corrupt download and that you should inquire with the dev and/or others that have downloaded the file. My reasoning for talking about modifying a single character in a large file that was >400MB was to demonstrate that even with something as minuscule as one character off, the whole MD5 will be altered and that if you have a very very close MD5 but not identical, it was a human error, not a bad download. Yes, I agree, you can brick your phone with a bad download. But I also am trying to point out that sometimes it's best to inquire with others than to assume you were the only one receiving a "bad" MD5 hash.

Also, this wasn't an effort to say someone else was wrong. This was to add to understanding that MD5s are calculated on the whole file (or to be more accurate, the whole data). I didn't mean this to turn into a pissing contest. I fully accept that my peen is the smallest.


----------



## loonatik78 (Jul 24, 2011)

DeTard said:


> The point has been missed. My point wasn't that devs are sloppy and make clumsy mistakes all the time. My point was that if you ever do see an MD5 that is incredibly close to what you were expecting to see, it's more likely a typo than a corrupt download and that you should inquire with the dev and/or others that have downloaded the file. My reasoning for talking about modifying a single character in a large file that was >400MB was to demonstrate that even with something as minuscule as one character off, the whole MD5 will be altered and that if you have a very very close MD5 but not identical, it was a human error, not a bad download. Yes, I agree, you can brick your phone with a bad download. But I also am trying to point out that sometimes it's best to inquire with others than to assume you were the only one receiving a "bad" MD5 hash.
> 
> Also, this wasn't an effort to say someone else was wrong. This was to add to understanding that MD5s are calculated on the whole file (or to be more accurate, the whole data). I didn't mean this to turn into a pissing contest. I fully accept that my peen is the smallest.


Never seen a dev post the wrong MD5.


----------



## sheajaniah (Sep 28, 2011)

and what if the md5 dont match up? then what


----------



## Nick.Tbolt (Aug 14, 2011)

sheajaniah said:


> and what if the md5 dont match up? then what


Download again, then ask the dev

Sent from my ADR6400L using Tapatalk


----------



## hille141 (Jul 24, 2011)

DeTard said:


> The point has been missed. My point wasn't that devs are sloppy and make clumsy mistakes all the time. My point was that if you ever do see an MD5 that is incredibly close to what you were expecting to see, it's more likely a typo than a corrupt download and that you should inquire with the dev and/or others that have downloaded the file. My reasoning for talking about modifying a single character in a large file that was >400MB was to demonstrate that even with something as minuscule as one character off, the whole MD5 will be altered and that if you have a very very close MD5 but not identical, it was a human error, not a bad download. Yes, I agree, you can brick your phone with a bad download. But I also am trying to point out that sometimes it's best to inquire with others than to assume you were the only one receiving a "bad" MD5 hash.
> 
> Also, this wasn't an effort to say someone else was wrong. This was to add to understanding that MD5s are calculated on the whole file (or to be more accurate, the whole data). I didn't mean this to turn into a pissing contest. I fully accept that my peen is the smallest.


No need to provide further explanation, your first post was 100% correct. With so many possible combinations, it is so statistically unlikely to have an md5 off by one digit that you can confidently throw that possibility out.

Using the same concept, there is no 100% guarantee that the file is the same even if the md5 matches! The corrupt file could technically still calculate the same md5 as the original file. The original designers of the md5 hash knew this so they purposely made the hash contain many digits. When I verify a hash I only look at the last 4-5 digits for this very reason.

Sent from my ADR6400L using Tapatalk


----------



## loonatik78 (Jul 24, 2011)

hille141 said:


> No need to provide further explanation, your first post was 100% correct. With so many possible combinations, it is so statistically unlikely to have an md5 off by one digit that you can confidently throw that possibility out.
> 
> Using the same concept, there is no 100% guarantee that the file is the same even if the md5 matches! The corrupt file could technically still calculate the same md5 as the original file. The original designers of the md5 hash knew this so they purposely made the hash contain many digits. When I verify a hash I only look at the last 4-5 digits for this very reason.
> 
> Sent from my ADR6400L using Tapatalk


You have a higher chance of winning a Power Ball lottery than producing the same MD5 from two files, one of which has been randomly corrupted. For the purposes of checking file integrity, MD5 bares no statistically significant shortfalls that would disqualify it from being a highly accurate method of file integrity verification. You make it sound like identical MD5's pop out all the time and it's reliability ought to be questioned. I'm not disputing what you say. I'm saying your information is of such an abstract nature it has no application here. You're talking about issues that are so improbable they don't even deserve consideration for the used at hand.


----------

