Jump to content


How do I perform a Nandroid Restore?

- - - - -

29 replies to this topic

#1
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2
I have entered the recovery image, and selected Nandroid backup/restore > Nandroid Restore and selected the back up folder.

I get

Quote

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

How do I do that?


#2
pulser

pulser

    Diehard

  • Members
  • PipPipPipPip
  • 432 posts
  • Gender:Male
  • Location:/dev/null

View PostTylerDurdenK, on Jan 7 2010, 09:45, said:

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, 07 January 2010 - 10:25 AM.


#3
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2
Thanks for your help.

This is what I get.

Posted Image

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, 07 January 2010 - 10:35 AM.


#4
pulser

pulser

    Diehard

  • Members
  • PipPipPipPip
  • 432 posts
  • Gender:Male
  • Location:/dev/null

View PostTylerDurdenK, on Jan 7 2010, 10:34, said:

Thanks for your help.

This is what I get.

Posted Image

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.


#5
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2

View Postpulser, on Jan 7 2010, 10:56, said:

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"

Posted Image

Edited by TylerDurdenK, 07 January 2010 - 11:19 AM.


#6
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2
Posted Image

I thought this might be useful.

These are the contents of the SD card that goes in my Hero.  Does it look right to you?


#7
kendon

kendon

    Addict

  • Members
  • PipPipPipPipPip
  • 923 posts
  • Devices:HTC Hero, ZTE Blade

View PostTylerDurdenK, on Jan 7 2010, 12:00, said:

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

Posted Image
have you made a nandroid backup before?
do you have an ext4 partition?


#8
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2

View Postkendon, on Jan 7 2010, 11:33, said:

have you made a nandroid backup before?
do you have an ext4 partition?

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


#9
pulser

pulser

    Diehard

  • Members
  • PipPipPipPip
  • 432 posts
  • Gender:Male
  • Location:/dev/null

View PostTylerDurdenK, on Jan 7 2010, 11:34, said:

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, 07 January 2010 - 12:07 PM.


#10
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2

View Postpulser, on Jan 7 2010, 11:54, said:

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.


#11
kendon

kendon

    Addict

  • Members
  • PipPipPipPipPip
  • 923 posts
  • Devices:HTC Hero, ZTE Blade

View PostTylerDurdenK, on Jan 7 2010, 12:34, said:

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.


#12
pulser

pulser

    Diehard

  • Members
  • PipPipPipPip
  • 432 posts
  • Gender:Male
  • Location:/dev/null

View PostTylerDurdenK, on Jan 7 2010, 12:09, said:

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 :)


#13
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2
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.


#14
pulser

pulser

    Diehard

  • Members
  • PipPipPipPip
  • 432 posts
  • Gender:Male
  • Location:/dev/null

View PostTylerDurdenK, on Jan 7 2010, 12:21, said:

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.


#15
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2
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:

Quote

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:

Quote

adb shell

6. Now type:

Quote

mount /sdcard

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

Quote

cd /sdcard

8. Then type:

Quote

cd nandroid

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

Quote

ls
and view the list that appears.

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

Quote

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

11. Again type

Quote

ls
and view the list that appears.

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

Quote

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:

Quote

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.

Posted Image

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

Edited by TylerDurdenK, 07 January 2010 - 09:09 PM.


#16
iceman3co

iceman3co

    Newbie

  • Members
  • Pip
  • 8 posts
  • Devices:Nexus One
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
Posted Image


would very much appreciate any help


#17
TylerDurdenK

TylerDurdenK

    Diehard

  • MoDaCo Ad Free
  • PipPipPipPip
  • 372 posts
  • Gender:Male
  • Devices:TMobile G2
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.


#18
shenshang

shenshang

    Diehard

  • Members
  • PipPipPipPip
  • 346 posts
  • Gender:Male
  • Location:London, United Kingdom
  • Devices:SGS2, Galaxy Nexus, S XE
  • Twitter:@shen_ye
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.


#19
lemmingzappa

lemmingzappa

    Regular

  • Members
  • PipPip
  • 91 posts

View Postshenshang, on Jan 15 2010, 21:47, said:

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

Why's that ?


#20
iceman3co

iceman3co

    Newbie

  • Members
  • Pip
  • 8 posts
  • Devices:Nexus One

View Postshenshang, on Jan 15 2010, 16:47, said:

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.
/ #





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users