[How To] Fix md5 mismatch nandroid restore

Search This thread

dwreck420

Senior Member
Nov 17, 2008
134
20
I have this problem with restoring my backup. I tried the fix as was detailed, even had to download md5sum.exe because I am working on a Windows 7 machine, but I always get "md5sum: not found" error. Can anyone please guide me on what I can do to get this working. I copied md5sum.exe to C:\Windows\System32 and also to the sdk\platform-tools folder, still getting the error.
Thanks all.

EDIT: I found that I had to go into recovery first to run the fix. Only then did the md5sum command work and created a fresh new nandroid.md5, and got my backup restored. Thanks to all who made this possible. My sincerest thanks.

hey im getting the same error. what do you mean you went into recovery first to run the fix first?
 

elvis56

Senior Member
Jul 11, 2010
137
14
Just ran into this problem as well. I think it has something to do with the Hboot version.

Anyway, people using windows based tools probably have to manually edit the nandroid.md5 file. The checksum HAS TO BE in lowercase character(as someone else pointed out before as well) , there HAVE to be 2 spaces after the checksum and you do not need a checksum of .android_secure.img.

And, maybe most important of all, if the filesize of nandroid.md5 is anything other than 267 bytes the file will not work. As described in the documents from the thread below it's best to start from an existing nandroid.md5 file and copy/paste the correct checksums.

The files linked in this thread will probably help windows based users. http://www.droidforums.net/forum/hacking-help/33355-help-clockwork-md5-mismatch-recovery-2.html
 
  • Like
Reactions: D2dyno

potcryan

Member
Apr 19, 2011
32
1
Just in case anyone runs into the same problem I did when trying to restore- do NOT name your backup with a "/" in it. I named mine with the date ie 5/2 and it created a folder named 2 which is where everything saved. Finally figured out that's why I couldn't restore, heh.
 

D!T

Senior Member
Jun 28, 2010
63
5
My backup has no nandroid.md5 and doing the command doesn't fix it. What to do?

EDIT: Got it, thanks a ton!

I am probably wrong here, but there is a disturbing pattern in that the last backup made by ClockworkMod (3.0.0.5) has lately failed every single time with the md5sum error.

Stepping through the instructions, I saw that nandroid.md5 didn't even exist in the directory (and therefore could not be deleted).

Furthermore, I ran a second backup before making any changes and miraculously the former (broken) backup suddenly worked again.
 

major_works

Senior Member
Mar 27, 2011
497
89
DO NOT PUT ANY SPACES IN YOUR FILE STRUCTURE. I did and it gave me an "MD5 Check Sum Error" took the space out and bam it worked.

I wanted to restore a backup today. It was the first time I'd tried it. I immediately ran into this "MD5 mismatch" thing. I had no idea that I shouldn't have put spaces in my backup file names. I edited out the spaces, tried it again, and it worked for me.
 

Araf

Senior Member
Dec 12, 2010
258
86
Jakarta
i figured i would post this fix here in case anyone else ran into this problem. This is assuming you did not change the folder names and let clockworkmod create them. I haven't had it happen until today, but it's not a nice message to see when you are trying to do a restore.

Code:
checking md5 sums...
Md5 mismatch!

to fix this problem use the code below. Substitute the final folder name for the backup you need to fix.

Code:
adb shell
# cd /sdcard/clockworkmod/backup/2010-06-29.20.22.53
# rm nandroid.md5
# md5sum *img > nandroid.md5

when that finishes, re-run the restore and everything should be fine.

note: As rpearl stated, there could be something really wrong with your nandroid, so use this tutorial as a learning experience and not a fix-all. In my case, everything was fine after restoring. However, that may not always be the case. Do this with caution.

big thank you!!

EDIT:
After follow all the procedure, here's the result in my clockworkmod recovery (v3.0.2.8):
1. Checking MD5 sums is OK
2. Restoring system is OK
3. Restoring data is not OK, there is message: ".android_secure.img not found. Skipping restore /sdcard/.android secure.
4. Restoring cache is OK
5. Backup complete

Then after reboot, all my data is not restore as expected. I am afraid my data is gone :-(
Can someone help me?
 
Last edited:

ACD168

Senior Member
Aug 28, 2010
1,530
135
big thank you!!

EDIT:
After follow all the procedure, here's the result in my clockworkmod recovery (v3.0.2.8):
1. Checking MD5 sums is OK
2. Restoring system is OK
3. Restoring data is not OK, there is message: ".android_secure.img not found. Skipping restore /sdcard/.android secure.
4. Restoring cache is OK
5. Backup complete

Then after reboot, all my data is not restore as expected. I am afraid my data is gone :-(
Can someone help me?


clockworkmod recovery (v3.0.2.8): is this for the incredible?
 

morgan39

Senior Member
Oct 20, 2007
127
15
Thankfully

I had renamed the backup to know that rom but there were spaces left; I returned to rename without spaces and following adb commands, voilà: I was able to restore it without problems.
I've saved so much time with headache ¡¡¡¡¡¡¡¡¡¡
Thanks for sharing .............
 
  • Like
Reactions: rickpercy87

GirLuvsDroid

Senior Member
Feb 16, 2010
302
144
Wilmington, DE
The only thing I have to add is that you don't need Java if your only going to be using ADB, but that's honestly just me being particular.

Secondly, since I didn't see this get brought up in the past posts, the final folder from the ADB commands isn't necessarily going to be labeled the same as the OP. The actual backup folder name is based on the current date/time when the backup was made, so I would suggest doing the following:

Code:
adb shell
cd /sdcard/clockworkmod/backup
ls -l (which will list all your backup's)
cd *backup folder you're trying to use*
rm nandroid.md5
md5sum *.img > nandroid.md5

Thank you DonJuan and ihtfp69 for this fix. I found this thread by searching after I got an MD5 mismatch on my Nook Color. I ran DonJuan's script from Terminal Emulator on the Nook Color and it worked like a charm. My backup is restored and I'm up and running again. You guys are lifesavers!!!!!
 

xTFGx

Senior Member
Jul 7, 2011
173
15
Thanks so much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

hijust fixed this prob on my device. All you have to do is goin to your sd card andopen folder "clockworkmod" now you should have a folder called "backup" in this folder you should have a folder (dosen't matter what its called, preferably the name of youy back up) and within that folder should be the following: Boot.img, system.img, cache.img, data.img, recovery.img and nandroid.md5. Thats it! Is you have more folders that you have to go through to get to the .img files than thats the problem. Make sure it is as above.... All the best!
 

woodpeckerlo

Senior Member
Sep 7, 2009
111
7
Rename your backup folder how ever u like just don`t put any spaces in name!!!!!!!!!!!!!!!! It work`s like a charm!!!!!!!!!!!!!!!
 
  • Like
Reactions: moonter45

Neo

Moderator Emeritus / The One - ΠΣΘ
Aug 4, 2011
13,645
31,950
The Matrix
Rename your backup folder how ever u like just don`t put any spaces in name!!!!!!!!!!!!!!!! It work`s like a charm!!!!!!!!!!!!!!!

+1 that. I never had a problem with the spaces until after flashing this one particular rom and when it had issues, could not restore from any of my backups from 8 different roms. Turns out I had spaces in the folders that I kept each individual rom in. Take the spaces out and you should be good to go!
 

pacut

Senior Member
Sep 2, 2008
215
10
Rome
well well...I renamed my ROM image and put some spaces, and when I need it I got MD5 check error. It is clear: non spaces into string name of the backup file.

Question is: has it the be identical name to original backup from CWM, or could it be anything I want just with no spaces ?

Thanks
 

omer1112

Senior Member
Aug 28, 2009
147
9
Chicago
I had a md5 sumcheck error as well. I tried the adb shell commands. It didnt do anything. i explored my backup folder and two of my backups that aren't working actually only have two files in the folder. boot.img and recovery.img.

Any idea why my nandroid backups got screwed like this? What can I do to prevent this? Never ran into this problem before and i've done atleast 50+ nandroids throughout different phones.
 

im.nick.hello

Senior Member
May 15, 2011
485
73
ok so i've been having some problems with not booting past the splash and so on... so i made a backup then ran a ruu

when i tried to restore my backup after flashing the ruu and re rooting i got a md5 mismatch, i think my backup is probubly corrupt.

what will happen if i restore it anyway with this method?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 143
    I figured I would post this fix here in case anyone else ran into this problem. This is assuming you did not change the folder names and let Clockworkmod create them. I haven't had it happen until today, but it's not a nice message to see when you are trying to do a restore.

    Code:
    Checking MD5 sums...
    MD5 mismatch!

    To fix this problem use the code below. Substitute the final folder name for the backup you need to fix.

    Code:
    adb shell
    # cd /sdcard/clockworkmod/backup/2010-06-29.20.22.53
    # rm nandroid.md5
    # md5sum *img > nandroid.md5

    When that finishes, re-run the restore and everything should be fine.

    NOTE: As rpearl stated, there could be something really wrong with your nandroid, so use this tutorial as a learning experience and not a fix-all. In my case, everything was fine after restoring. However, that may not always be the case. Do this with caution.
    39
    I had a md5 mismatch and was freaking out. Turned out that the folder name for my backup couldn't have spaces in it...
    13
    The best solution for such a problem, if I ever happen to face one is:

    1. Create an empty text document on your desktop.
    2. Rename it to "nandroid.md5"
    3. Place this renamed empty text document (nandroid.md5) in your clockworkmod backup folder.
    4. Try restoring again. It should work.

    PS:
    What basically has been done here is that the CWM has been made to skip MD5 checking by placing an empty md5 in the backup folder. This is the only solution I adopt whenever a md5 error is seen. CWM keeps omitting the nandroid.md5 file while creating backups!

    PPS:
    A humble thanks is very much appreciated if I have been of any help to anyone! :D
    4
    when i follow the guide in the first post, everything goes okay untill it gets to the last step, then i get the error:

    md5sum: not found

    i'm running win 7 x64, do i need to put the md5sum.exe (downloaded a random version i found googlin) into a specific folder? i tried putting it into all of the android-sdk directories and still no luck... any help greatly appreciated

    EDIT: nevermind, solved it by using busybox :)

    Just to elaborate on this, if folks are also seeing this same error (md5sum: not found) when they get to the last step in the guide, just repeat the process, but this time on the last step, use the command:

    Code:
    # busybox md5sum *img > nandroid.md5

    this worked for me
    3
    Worked like a charm, thanks a bunch OP. Had a recent backup generate this md5 mismatch error, you saved me a lot of work.

    For noobs: ADB commands are entered via an ADB shell.

    1. Download the Android SDK here, and the Java SE Development Kit here. Install Java kit FIRST, then Android SDK.

    2. Ensure you have the Android USB drivers installed, which you should if you have already rooted and performed a nandroid backup, whether you used Amon RA or ClockworkMod Recovery.

    3. On your device, enable USB debugging and when you plugin your phone to your PC, make sure you select 'Charge Only'.

    4. In the Android SDK, you will have to select and download the latest SDK Platform-tools, and you can safely ignore the other software packages for the purposes of this issue.

    5. Once you've done that, open a command prompt, browse over to the directory where you installed the Android SDK, and in the current version, you will have to browse to the \Android\android-sdk-windows\platform-tools folder. Once you are there, type in 'adb shell' without quotes.

    6. You can now enter adb commands. You are entering commands as root if your cursor is a pound sign '#'. If it isn't, type in 'su' without quotes, which requests superuser access. Your phone's screen will prompt you to allow or deny root access to the command shell. Allow it, and you are good to go.

    ***This is all from memory, so if I've missed something, feel free to correct.