• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root MD5 Sum Mismatch

SimsDelt

Android Expert
Aug 4, 2010
1,066
246
Bremen, Georgia
So I installed the new Invernito Theme and didn't like it so I wanted to restore my last nandroid. Now I get a "MD5 Sum Mismatch" when I try to restore. Anyone know why I'm getting this. I unfroze everything I had in TiBu and then restored any .apks that I changed to .bak... just frustrating. When I installed the theme it changed something and made me start getting double messages in Handcent and I wasn't before... I want my nandroid back.
 
Wow. 30+ views and no one knows? I loaded Tranquility 2.3.5 back over everything. Instill can't use my old nandroid. But I made a new one just in case. When I loaded tranquility over the theme it killed all of it. Which was exaxctl what I wanted. Still weird that I can't use my old nandroid. Its the same version and everything.
 
Upvote 0
MD5sum is just a way of checking to ensure a files contents have not changed. When you initially do a Nandroid backup a md5sum is made against the backup. If you ever do a restore the md5sum of the backup will be checked to ensure the backup file is intact and not corrupted. I'd guess something happened on your sdcard that caused the backup to be modified, or the md5sum file was lost .


Searching a bit, this seems to be a common problem. You can try regenerating the md5 hash as indicated in this post:


[How To] Fix md5 mismatch nandroid restore - xda-developers


Just keep this post in mind:

Be warned: If the nandroid was legit broken, then this will restore it *anyways* and your system won't boot / will have weird errors / whatever was wrong with the nandroid will be wrong with your system now.

Obviously you can just restore a previous nandroid if that happens.
 
  • Like
Reactions: scary alien
Upvote 0
So I installed the new Invernito Theme and didn't like it so I wanted to restore my last nandroid. Now I get a "MD5 Sum Mismatch" when I try to restore. Anyone know why I'm getting this. I unfroze everything I had in TiBu and then restored any .apks that I changed to .bak... just frustrating. When I installed the theme it changed something and made me start getting double messages in Handcent and I wasn't before... I want my nandroid back.

Wow. 30+ views and no one knows? I loaded Tranquility 2.3.5 back over everything. Instill can't use my old nandroid. But I made a new one just in case. When I loaded tranquility over the theme it killed all of it. Which was exaxctl what I wanted. Still weird that I can't use my old nandroid. Its the same version and everything.

jonathan,

Well, you are getting the MD5 mis-match error because the MD5 checksums in the nandroid.md5 file do not match the checksums of one or more of the system.img, data.img, or boot.img files in your Nandroid's backup directory. Is is possible that, when you made the Nandroid backup, your phone did not have a nearly full charge? This appears to be one of the main reasons for such issues.

I've done a little bit of research on Nandroid issues on the Eris. If you are interested, then check out these threads:

http://androidforums.com/eris-all-things-root/171764-i-messed-up.html

http://androidforums.com/eris-all-things-root/142379-help-please-cant-nandroid-restore.html

Also, if you interested, I've created an app for checking MD5 (and SHA1) checksums on files that you've downloaded to your phone. It also has a jar-verification function for verifying signed .jar, .zip, .apk files. I'm working on re-vamping the app to make it look a little more professional and add a few, new features to it, but you (and anyone else) can get the app (for free) at:

from XDA: xda-developers - View Single Post - [Begging] Devs - please publish your MD5's

from AF: http://androidforums.com/eris-all-things-root/168942-phone-rom-checksum-verifier.html

Hope this help. Cheers!
 
Upvote 0
MD5sum is just a way of checking to ensure a files contents have not changed. When you initially do a Nandroid backup a md5sum is made against the backup. If you ever do a restore the md5sum of the backup will be checked to ensure the backup file is intact and not corrupted. I'd guess something happened on your sdcard that caused the backup to be modified, or the md5sum file was lost .

Searching a bit, this seems to be a common problem. You can try regenerating the md5 hash as indicated in this post:

[How To] Fix md5 mismatch nandroid restore - xda-developers

Just keep this post in mind:

jdk33,

Interesting thread... Yeah, I probably wouldn't restore a Nandroid backup whose checksums didn't match. The non-matching checksums strongly imply to me that either one or more files is incomplete :)eek:) or that the nandroid-mobile.sh script was unable to properly calcuate the checksums for the *.img files.

Thanks for the interesting info! Cheers!

edit: by the way, post #2 in that thread reported that a space in the Nandroid backup directory's name was the cause of the MD5 mismatch. I'm a little skeptical of this, but I'd be more convinced if this were the case with Jonathan's backup. Typically, the custom recovery (Amon_RA for sure) will simply not be able to find Nandroid backups with spaces in them--don't think the MD5 check would come in to play until it can actually find the backup.

2nd edit: post #15 (xda-developers - View Single Post - [How To] Fix md5 mismatch nandroid restore) does seem to confirm the space-in-the-filename issue...:p
 
Upvote 0
All,

Just a real-quick heads-up: a member in the Eris forums had put an ampersand (&) in one of his Nandroid backup's directory name. When he went to restore it, it hung and never came back... Removing the ampersand allowed the restore to occur normally.

I suspect that the ampersand was causing the nandroid-mobile.sh script to be launched in the background and would not or could not return its finishing status back to the custom recovery that launched it.

So anyway, avoid using spaces and ampersands in your Nandroid backup's directory names.

Cheers!
 
Upvote 0
So making sure I'm reading this right. Renaming your Nandroid to take out the space didn't work or wouldn't work because the nandroid wasn't made correctly because part of the backup scripts couldn't handle the space. Correct?

Actually, the OP (Jonathan) did not indicate that he actually tried to restore the Nandroid backup after removing the space from the Nandroid backup's directory name. Rather, he simply re-ran the backup without a space in the backup's filename.

I pulled-up a version of the nandroid-mobile.sh (v2.2.2) script that is used for the Eris and looked again at the MD5 checking code:

Code:
[FONT=Courier New]cd $RESTOREPATH[/FONT]  (i.e., the full /sdcard/nandroid/.... backup directory path)
 
[FONT=Courier New]<snip>[/FONT]
 
[FONT=Courier New]if [ ! -f $RESTOREPATH/nandroid.md5$DEFAULTEXT ]; then[/FONT]
[FONT=Courier New]$ECHO "[COLOR=blue]error: $RESTOREPATH/nandroid.md5 not found, cannot verify backup data[/COLOR]"[/FONT]
[FONT=Courier New]exit 1[/FONT]
[FONT=Courier New]fi[/FONT]
 
[FONT=Courier New]<snip>[/FONT]
 
[FONT=Courier New]$ECHO "Verifying backup images..."[/FONT]
[FONT=Courier New]md5sum -c nandroid.md5[/FONT]
[FONT=Courier New]if [ $? -eq 1 ]; then[/FONT]
[FONT=Courier New]$ECHO "[COLOR=red]Error: md5sum mismatch, aborting[/COLOR]"[/FONT]
[FONT=Courier New]exit 1[/FONT]
[FONT=Courier New]fi[/FONT]

As you can see, there is a test to check to see if the nandroid.md5 file exists. I would image that this test would fail if there is a space in the RESTOREPATH variable name (it certainly returns an error status 2 if you try to cd to a directory with a space in it without first escaping each space character).

So, I'm still a little skeptical as to whether or not a space in the filename will lead to an MD5 mismatch error. From what I can tell, it should not. The only scenario that I can imagine is that if the particular version of nandroid-mobile.sh is coded differently from the above and is possibly interpreting an error status from the cd command as an error in the md5sum utility (which I still find unlikely).

If the OP (Jonathan) still has the original Nandroid backup in question, it would be interesting for him to:

- do an adb shell
- cd to the Nandroid backup directory (escaping the space if necessary)
- run md5sum -c nandroid.md5 (or busybox md5sum -c nandroid.md5)

and report what he finds. This would actually tell us if there were MD5 checksum errors in his backup. He also did not indicate if he had a full charge on his phone when the Nandroid backup was made (or when the restore was attempted)--I don't for sure that having a low charge will make the reading from the /sdcard faulty or not (I do know that the nandroid-mobile.sh script will warn you if you attempt a backup or restore with less than 30% charge).

It should look similar to the following:

Code:
# [COLOR=blue]cd /sdcard/nandroid/<your phone's serial #>/BDS-20100821-1454-ieo[/COLOR]
# [COLOR=blue]ls[/COLOR]
ls
boot.img
system.img
data.img
nandroid.md5
# [COLOR=blue]md5sum -c nandroid.md5[/COLOR]
md5sum -c nandroid.md5
boot.img: OK
data.img: OK
system.img: OK
# [COLOR=blue]busybox md5sum -c nandroid.md5[/COLOR]
busybox md5sum -c nandroid.md5
boot.img: OK
data.img: OK
system.img: OK
Jonathan, you game? :D
 
Upvote 0
By the way, I just did a test (on my Eris) where I created a Nandroid backup, changed the backup directory from "BDS-20101001-0323" to "BDS-20101001 0323" (i.e., replaced the second dash with a space) and attempted a Nandroid restore.

I did not receive an MD5 mismatch error, rather, I received the usual "Error: run 'nandroid-mobile.sh restore' via adb!" error instead. This is exactly what I would expect based on how the script and Amon_RA's recovery is coded.

Cheers!
 
Upvote 0
Jonathan,

Sorry to dredge-up such an old thread, but I saw your new thread tonight re. your Nandroid restore question and it made me remember about what I had posted here way back in September.

I wanted to apologize since my last couple of posts here said that the issue you were having was due to a true MD5 mismatch (i.e., bad files) in your Nandroid.

Subsequent testing (see this post if you want (warning, its a "TL;DR" type of deal :D): http://androidforums.com/htc-droid-eris/138831-verify-your-files-md5-checksums.html#post2499418) has revealed that ClockworkMod will indeed return an "MD5 mismatch" error for a Nandroid backup directory that contains spaces (or other wonky characters).

The reason for this is that it tries to the MD5 checksum calculation (via the md5sum -c command), but since the directory name contains spaces and cannot be properly parsed when passed from custom recovery to the nandroid-mobile.sh script, it cannot find the nandroid.md5 file, but complains with the "MD5 mismatch" instead of something more useful like "can't find nandroid.md5" ;). Amon_RA custom recovery gets the same error, but does not report it.

Anyway, apologies and I hope someone will chime-in to your newest thread and help you out.

Cheers!
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones