Jump to content

How do I perform a Nandroid Restore?


Guest TylerDurdenK

Recommended Posts

Guest TylerDurdenK

I have entered the recovery image, and selected Nandroid backup/restore > Nandroid Restore and selected the back up folder.

I get

"error: run 'nandroid-mobile.sh restore' via adb!

How do I do that?

Link to comment
Share on other sites

Guest pulser
I have entered the recovery image, and selected Nandroid backup/restore > Nandroid Restore and selected the back up folder.

I get

How do I do that?

OK. Start your phone up in recovery mode. This time, don't select Nandroid Restore.

Plug your phone in by USB into a computer with adb set up on it (it's in the SDK). You'll also need the USB drivers for using adb (get them in the SDK too).

Now open command prompt and 'cd' into the folder you put the SDK into.

Type the following command:

adb shell

 ls
You should now see a list of files as part of the recovery environment. I think (can't remember right now :) ) that you can now run the restore by typing in
nandroid-mobile.sh restore

That should get Nandroid running, but I don't know what you'll see next. Post back if there's any more troubles.

HTH

Edited by pulser
Link to comment
Share on other sites

Guest TylerDurdenK

Thanks for your help.

This is what I get.

4253750162_0ba3e2d514_o.png

So what now?

My Hero is still on the Recovery System Home screen, FYI, I am on RA-hero-v1.3.2

Edited by TylerDurdenK
Link to comment
Share on other sites

Guest pulser
Thanks for your help.

This is what I get.

4253750162_0ba3e2d514_o.png

So what now?

My Hero is still on the Recovery System Home screen, FYI, I am on RA-hero-v1.3.2

No bother. What you want to do first (before using that command!) is to type ls

Then type

cd /sdcard
Now look at the folders listed. Type
cd nandroid
And then
ls

You should now see a folder with your serial number of your device (begins HT99 I think). Note that down (or copy and paste it) and run the command I gave above. Type that in for a folder name.

I think you will then either be asked for another folder name (for which nandroid backup to use). If so, follow the above instructions to find the 'serial number' folder and 'cd' into it. There will now be another folder with a long name. After the first hyphen is the date in YYYYMMDD format, and after the second one is a 24hour time. Note down (or copy paste) the folder name and use that as the 'second' folder name.

I can't remember the procedure exactly, but it goes something like that.

Any probs, give me a shout.

Link to comment
Share on other sites

Guest TylerDurdenK
No bother. What you want to do first (before using that command!) is to type ls

Then type

cd /sdcard
Now look at the folders listed. Type
cd nandroid
And then
ls

You should now see a folder with your serial number of your device (begins HT99 I think). Note that down (or copy and paste it) and run the command I gave above. Type that in for a folder name.

I think you will then either be asked for another folder name (for which nandroid backup to use). If so, follow the above instructions to find the 'serial number' folder and 'cd' into it. There will now be another folder with a long name. After the first hyphen is the date in YYYYMMDD format, and after the second one is a 24hour time. Note down (or copy paste) the folder name and use that as the 'second' folder name.

I can't remember the procedure exactly, but it goes something like that.

Any probs, give me a shout.

On command 2 I get "can't cd to nandroid"

4253038623_506752c5dc_o.png

Edited by TylerDurdenK
Link to comment
Share on other sites

Guest pulser
Yes nandroid backup has been made, but no ext4 partition.

I'm just putting my phone into recovery to check the instructions. Give me 2 mins...

EDIT:

So go into adb shell, and try the command :

mount /sdcard
That will mount the sdcard (just tested it here!) Now type
cd /sdcard

and then ls. You should now be able to see the stuff on the sd card including the nandroid folders.

HTH, and sorry for the delay. Had to go out for a bit :)

Edited by pulser
Link to comment
Share on other sites

Guest TylerDurdenK
Ah... I think you need to mount the sd card first.

I can't remember the exact command at the moment, but it is essentially

mount /dev/sdcard

I will get back to you (hopefully in the next few minutes) when I find it.

Thanks very much.

Link to comment
Share on other sites

Guest kendon
Yes nandroid backup has been made, but no ext4 partition.

move recovery.log to sdcard (somewhere in recovery image menu), then mount sdcard on pc and post the log here.

Link to comment
Share on other sites

Guest pulser
Thanks very much.

It's actually

 mount /sdcard

. Don't know if you got the edit or not. Just that you quoted what I wrote before the edit.

Give that a go and let us know if it works :)

Link to comment
Share on other sites

Guest TylerDurdenK

Big thanks to you.

It now seems to be working. WHen it has I might just put a step by step of what I had to do in the first post for future reference, as I couldn't find a guide for this anywhere.

Link to comment
Share on other sites

Guest pulser
Big thanks to you.

It now seems to be working. WHen it has I might just put a step by step of what I had to do in the first post for future reference, as I couldn't find a guide for this anywhere.

That would be good. I can give you a hand if necessary, but I'm sure you will be able to repeat this process and document it. We should really try and get a few good [HOWTO] threads going. I'm thinking about making a couple for beginner stuff.

Link to comment
Share on other sites

Guest TylerDurdenK

Okay here it is:

[HOW TO] Perform a Nandroid Restore via the Android Debug Bridge (ADB)

(This guide assums that you have already installed and set up adb tools on you PC)

1. Start phone in recovery mode, by turning it on while holding "Home" and "Power" buttons.

2. Plug the phone into the PC with a USB cable

3. Start Windows Command Prompt on your PC, by pressing Start on your PC and typing CMD into the run or search bar depending on your operating system. Then selecting Command Prompt.

4. Within the command prompt window, change the directory to the one your adb tools are by typing the following:

cd c:\sdk\tools

The path you put in may be different to this example, as it depends where on your PC your adb tools are kept.

5. Then type:

adb shell

6. Now type:

mount /sdcard

7. Now you need to change directory again to the one holding your nandroid back-up data, so first type

cd /sdcard

8. Then type:

cd nandroid

9. Now you need to find the specific name for the folder that holds your Nandroid Backup images, so type:

ls

and view the list that appears.

10. Now to enter the folder you want to back up to type

cd HT**********
obviously replacing the *s with your numbers and letters. FYI the number string is your Device Serial number.

11. Again type

ls

and view the list that appears.

12. Now to enter the folder you want to back up to type

cd BCD***-********-****
obviously replacing the *s with your numbers and letters. FYI the format of these digits is BCDXYZ-YYYYMMDD-HHMM from when the back up was created.

13. Now type:

nandroid-mobile.sh restore

14. Just press enter to select default.

15. Double check that the Default backup that is found is the one you want then press enter again.

Your selected backup will now be restored. When your CMD window looks like the one below you can reboot your phone and it will be as you remember it.

4254225873_5472741aff_o.png

A big thanks goes to Pulser, without whom I would still be stuck, and this guide wouldn't have been written.

Edited by TylerDurdenK
Link to comment
Share on other sites

  • 2 weeks later...
Guest iceman3co

Great write up! Im using the Nexus One and am having touble with recovering a previous backup to restore to before i installed a ROM. here is my command prompt activity.

C:\Users\Kris\Desktop\N1\androidsdk\tools>adb shell

/ # mount /sdcard

mount /sdcard

/ # cd /sdcard

cd /sdcard

/sdcard # cd nandroid

cd nandroid

/sdcard/nandroid # cd ORIGIONALOS

cd ORIGIONALOS

/sdcard/nandroid/ORIGIONALOS # ls

ls

BDS-20100115-0002

/sdcard/nandroid/ORIGIONALOS # cd BDS-20100115-0002

cd BDS-20100115-0002

/sdcard/nandroid/ORIGIONALOS/BDS-20100115-0002 # nandroid-mobile.sh restore

nandroid-mobile.sh restore

nandroid-mobile v2.2.1

Using G1 keyboard, enter a directory name substring and then <CR>

to find matches or just <CR> to accept default:

Using string to search for matching backup directories

Looking for the latest backup, will display other choices!

Error: no backups found

/sdcard/nandroid/ORIGIONALOS/BDS-20100115-0002 #

here is the screen shot of the backup file

4277398780_f927efed7a_o.jpg

would very much appreciate any help

Link to comment
Share on other sites

Guest TylerDurdenK

I am not sure, but t may be because your backup folder is not within a folder named after your device serial number. That is the only difference I can see.

Try putting your BDS-20100115-0002 folder into one after your device (HT***********), as this is where nandroid puts it when it is saving.

Link to comment
Share on other sites

Guest shenshang

you are using EXT4, you need to type:

tune2fs -E test_fs /dev/block/mmcblk0p2

then nandroid will work. besides, using EXT4 is a stupid idea if you dont want your sd to die.

Link to comment
Share on other sites

Guest iceman3co
you are using EXT4, you need to type:

tune2fs -E test_fs /dev/block/mmcblk0p2

then nandroid will work. besides, using EXT4 is a stupid idea if you dont want your sd to die.

i tried to enter the code you put in but received this message.

c:\Users\Kris\Desktop\N1\androidsdk\tools>adb shell

/ # tune2fs -E test_fs /dev/block/mmcblk0p2

tune2fs -E test_fs /dev/block/mmcblk0p2

tune2fs 1.41.6 (30-May-2009)

tune2fs: No such file or directory while trying to open /dev/block/mmcblk0p2

Couldn't find valid filesystem superblock.

/ #

Link to comment
Share on other sites

Why's that ?

because it is a journaling filesystem.

do you have an ext4 parition or not? i can't see any indicators for that, and it would give you a different error message afaik.

Link to comment
Share on other sites

Guest shenshang
Why's that ?

all sd cards have a life expectancy. stuff that keep using it like EXT4 and 3 partitions where data is constantly exchanged, and same thing for Swapper, will kill off your SD card very quickly.

Link to comment
Share on other sites

Guest lemmingzappa
because it is a journaling filesystem.

do you have an ext4 parition or not? i can't see any indicators for that, and it would give you a different error message afaik.

heh this isn't my thread with the error btw, I was just wondering about the EXT4 partition.

But yes, I do have an EXT4 partition set up. But after the comments about constant read/write to the card i'm having second thoughts about using it :)

Link to comment
Share on other sites

Guest shenshang
heh this isn't my thread with the error btw, I was just wondering about the EXT4 partition.

But yes, I do have an EXT4 partition set up. But after the comments about constant read/write to the card i'm having second thoughts about using it :)

do a nandroid+EXT or a BART, then partition your sd card and restore, it will solve this problem easily :)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.