[How To] Fix md5 mismatch nandroid restore

Search This thread

ihtfp69

Senior Member
Feb 22, 2009
1,875
809
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.
 
Last edited:

opcode1300

Retired Recognized Developer
Jul 28, 2007
157
10
E'Arth
This also works for anyone that wants a to make a 100% stock image but keep recovery.

just replace the boot.img and system.img with the ones from the RUU and recalc.
 

s197

Senior Member
Jun 28, 2010
1,074
177
Any idea what causes this? Is it just the folder name with spaces?
 

trunksta

Senior Member
Jun 12, 2010
78
0
i just got this problem. do i need the "#" for each command?

No the # simply means you are logged in as root or Su

If its showing $ then you may need to type /system/bin/Su

I believe or could be /system/lib/su I'm still pretty new to Linux / Android

Sent from my ADR6300 using Tapatalk
 

rpearl

Senior Member
Jun 22, 2010
89
1
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: johnnyl33

jinkzuk

Member
Jul 20, 2010
5
1
For n00bs could you elaborate on this post, i'm having the same problem.

"To fix this problem use the code below"

I know this is through cmd, but what needs to be where when i'm typing exactly that in (changing the folder name etc) what screen do I need to be on. If it was more detailed, and thank you so far because this is the only post on the net, it could be very useful!
 

kentoe

Senior Member
Mar 17, 2010
360
75
For n00bs could you elaborate on this post, i'm having the same problem.

"To fix this problem use the code below"

I know this is through cmd, but what needs to be where when i'm typing exactly that in (changing the folder name etc) what screen do I need to be on. If it was more detailed, and thank you so far because this is the only post on the net, it could be very useful!

If you're messing with nandroid backups by now, we'd hope you would know how to get adb shell started.

So basically you start up adb shell in a command prompt on your computer, this connects to your phone, then you follow those commands following "adb shell"

A brief overview of getting to the adb commands >> http://xdaforums.com/showthread.php?t=709220
 
Last edited:

seansin

New member
Aug 9, 2010
3
0
permission denied error

I'm using windows 7 CMD to connect to my hero for resolving this md5 mismatch issue.

But when i type in the last command, which is -

md5sum *img > nandroid.md5

it gives me an error -

md5sum: permission denied

I tried running the cmd as administrator also but I dont know in windows how to do a 'SU' like in ubuntu.

can you please give a tip what to do ?

Sean.
 

bast525

Senior Member
Nov 15, 2007
487
143
Chesapeake, VA
THANK YOU!!!!!!!!!!!!!

I had this happen to me today... I woulda had to spend a crapload of time getting things all set up on my phone if I hadn't found this thread. It was my fault, I changed the name of the Nandroid backup folder... I had no idea you couldn't do this.... went to restore and BOOM MD5 mismatch.... noooooooooooo.

Thank you again OP for posting this you really saved my day today.
 

likemytoys

New member
Sep 4, 2010
3
0
Central Texas
Jacked up Dell Streak/ US ver. build 6601 MD5 Checksum error

After screwing up my brand new Streak, I turned to XDA and MoDaCo to fix my screw-ups. :eek: Read this and did that, and nothing would work. The buttons would flash the Dell logo would come up and freeze. So here is another solution that worked for me Step by step.

Installed the fast boot using Windows 7 64 bit I downloaded Fastboot and followed there instructions. Not sure what it did for me, but I did it.

Now as the phone was, I was unable to do any kind manipulation of the SD card. I tool the micro SD card and put it into an SD adapter and added the files via my lap top. See instructions here

Technically you don't need to worry about flashing cache.img and data.img but i performed this backup after a factory reset so your not taking any of my personal info/data

fasboot didn't work for me for so i restored with nandroid
Nandroid
+Create a folder named "Clockworkmod" on your storage card
+In that folder create a folder named "backup"
+Create a folder in "backup" named whatever you want and place boot.img, system.img, cache.img, data.img, recovery.img and nandroid.md5 in that folder.
+Flash Clockworkmod Recovery
2.5.0.1 didnt work on mine but 1.8.1.7 did :/
+Enter clockworkmod recovery
-Power on device while holding both volume keys, then select "2. Software upgrade via Update.pkd on SD Card"
Now you should be in ClockworkMod Recovery
-Scroll down to nandroid using the volume keys and press the camera button to select it
-Select Restore and choose your folder (the one you placed in the backup folder)

thanks fone_fanatic 28th August 2010, 03:14 AM

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.

Rebooted the phone and so far every thing works. GPS, WiFi etc and no dam flashing lights or self reboots or O2 stuff :D Hope this helps ya....Good luck you will need it.
 

dimebagdan65

Senior Member
Aug 4, 2010
2,114
617
Las Vegas
www.dimedroidhq.com
Ihtfp69 to the rescue again!

Man, I can never repay you for how much you've helped me out and saved my bacon! Other dev's, take note, this is an exemplary developer here and his SkyRaider rom is beyond compare!
 

cscimmia

Member
Sep 14, 2010
46
6
I'm using windows 7 CMD to connect to my hero for resolving this md5 mismatch issue.

But when i type in the last command, which is -

md5sum *img > nandroid.md5

it gives me an error -

md5sum: permission denied

I tried running the cmd as administrator also but I dont know in windows how to do a 'SU' like in ubuntu.

can you please give a tip what to do ?

Sean.

I do not have ABD on my Win 7 machine so I had to use CMD as well. I too received an error, however mine basically said that md5sum was not a recognized command. Not sure where you got md5sum for your win 7 machine, but I got mine at the following website... (fourmilab.ch/md5/) and this one worked just fine. Unzip and copy md5.exe to the system32 folder.

If you are still working through this... good luck. Hopefully it can be helpful to someone else either way. --Josh
 
  • Like
Reactions: sdrawkcab3

ihtfp69

Senior Member
Feb 22, 2009
1,875
809
I do not have ABD on my Win 7 machine so I had to use CMD as well. I too received an error, however mine basically said that md5sum was not a recognized command. Not sure where you got md5sum for your win 7 machine, but I got mine at the following website... (fourmilab.ch/md5/) and this one worked just fine. Unzip and copy md5.exe to the system32 folder.

If you are still working through this... good luck. Hopefully it can be helpful to someone else either way. --Josh


Hmmm...I just used md5sum from the phone's shell. No need to get anything for Windows.
 
  • Like
Reactions: uwannabananababy

tdo700

Member
Oct 23, 2010
42
4
hey i tried the steps you guys gave buy i get

# cd /sdcard/clockworkmod/backup/2010-10-30.08.23.53
cd: can't cd to /sdcard/clockworkmod/backup/2010-10-30.08.23.53

this is what i did.

I opened terminal in OSX and typed "adb shell" after that i typed "cd /sdcard/clockworkmod/backup/2010-10-30.08.23.53" but it didnt work.

anyone know what i did wrong??



i also did "adb devices" in terminal and it detects my device. i check the su on my sgs and i see my computer, it sees it as unknown.
 
Last edited:

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.