+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Nandroid v2.0 - Full NAND backup and restore tool

  1. #1
    Join Date
    Dec 2008
    Posts
    1

    Lightbulb Nandroid v2.0 - Full NAND backup and restore tool


    * What is Nandroid Backup v2.0?
    Nandroid Backup is a set of tools and a script that will enable anyone who has root on their G1 and has the engineering/dev spl bootloader [1] (or has a dev phone) + a recovery image with busybox and adbd running as root [2] to make full system backups. These can then be restored using the fastboot [3] commandline tool and your phone in SPL/bootloader mode (hold camera + power). This allows you to create regular backups of your entire phones NAND flash so that you can restore a backup when something breaks. Its backup method works on a level that allows you to completely break, wipe or corrupt any or all partitions and still restore the phone to a working state within a few minutes. This works great for those who use their G1 for normal activities but also want to test their ideas which might break the phone, or when not having an extra G1 to keep purely as a development phone.

    * Requirements for use
    - Android G1 phone in recovery mode with busybox installed, including appropriate symlinks to at least tar and md5sum, as well as 'adb shell' support running as root. I recommend using JesusFreke US RC30 or UK RC8 v1.2 recovery image. You can flash the RC30 v1.2 recovery.img on your G1 if you don't want to bother constructing your own image. Of course you are free to use your own recovery image and it will work if you set it up correctly.
    - dump_image-arm and mkyaffs2image|mkyaffs2image-$ARCH compiled in the current dir, as well as root on a linux/mac (POSIX) machine for constructing system and data images. root is required because the uid, gid and file permissions need to be preserved while extracting and creating the yaffs2 images. You are free to run the script as a normal user and then run the appropriate commands yourself as root; the commands are printed when you run the script as a regular user.

    If you don't trust the provided binaries, you are free to compile them yourself. The source for the tools are included. For dump_image, edit nandtools/android-imagetools/Makefile so that you use the proper cross compiling gcc. For mkyaffs2img, just running make in tartools/yaffs2/utils/ should give you a binary. You are on your own in getting stuff compiled, but it should be easy to figure out from the Makefile.

    * How to use this (the easy part)
    Just boot your phone in recovery mode with the correct recovery.img (one that has adb shell as root + busybox installed with symlinks to tar, md5sum etc) and connect it to your pc/laptop/server. Then run the nandroid.sh script. If something is wrong or missing, it will tell you.

    * What about restore?
    If you have the dev phone or have root on the G1 and flashed the engineering/dev bootloader, then you can power on your phone while holding camera to get into the bootloader/SPL. It should then show some androids on skateboards (if not, you don't have the engineering/dev bootloader). Plug in your USB cable and push back until it says FASTBOOT instead of Serial0. Now you can fire up fastboot flash {partition} {file.img}.
    Fastboot itself is part of the android SDK. If you download and compile your own mydroid build, it should sit in mydroid/out/host/linux-x86/bin/fastboot Perhaps in a future version I'll include a restore script, but for now I don't see the need.
    One tip, if you are in fastboot mode on your phone and 'fastboot devices' doesn't show anything, try as root. You might need to edit your udev setup to allow your user to access the phone's usb device (which is different from the one you're in when in recovery or normal boot).

    * Where's the source?
    Sources are included. They are copies of the Android sources with various changes mostly made by Brainaid.
    Everything in the zip is also also available through subversion:

    svn co http://svn.infernix.net/nandroid/

    Note that I DO NOT recommend checking out the latest revision unless you know damn well what you are doing. No guarantees if you play with fire. At the very least do diff against the latest released version.

    * Credits
    Bash script hacked together by infernix.
    dump_image adapted from flash_image and extended by Brainaid.
    Original mtdutils source and mkyaffs2image source by Google.

    [1] http://www.gotontheinter.net/bootloader
    [2] http://forum.xda-developers.com/showthread.php?t=443713
    [3] http://www.gotontheinter.net/fastboot


    DOWNLOAD HERE or:
    wget http://dx.infernix.net/nandroid-2.0.zip

  2. #2
    Join Date
    Oct 2008
    Posts
    887

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    refer to : http://forum.xda-developers.com/showthread.php?t=459830Original Thread
    refer to: http://www.htc.com/www/support/android/adp.html#s1 HTC factory support

    On Phone
    What you need on your phone:
    - JesusFreke's RC Mods installed (example JFv1.42_RC33)
    - SPL installed (example HardSPL)


    Backing up Phone
    - Boot into recovery(home+power)
    - Press Alt+B to start Nandroid (files are stored on SD card, note: it may be over 100 megabytes)
    - Reboot (Home+ Back)


    On Computer
    What you need on your computer:
    - Fastboot Windows application
    - Android USB driver installed
    (device manager > ADB interface > manually select the folder with the driver)

    Find these in your phone's SD card and put them in your computer:
    - data.img
    - system.img
    - boot.img



    Steps to restore your phone
    1) Create a folder in your C: drive
    _______a) name it android.
    _______b)Replace C with another drive letter if needed.
    2) Put these files all into android
    _______a) fastboot.exe
    _______b) system.img
    _______c) data.img
    _______d) boot.img
    3) Unplug the USB cord. Power off your phone
    4) Power up by holding CAMERA+POWER (you should see three androids on skateboards.)
    5) Plug the USB cord. Press back on phone. (The screen on your phone should say fastboot)
    6) Make sure your pc is using the correct driver.(device manager > ADB interface).. don't panick, you don't need to start over.
    7) Enter the Command Prompt (Start > Run > type cmd (If you are on Vista just type cmd in the search box and hit enter).
    8) Then enter the following commands:

    cd C:\android
    fastboot flash system system.img it will say SENDING, then WRITING and say OKAY if it was successful
    fastboot flash userdata data.img wait for the second OKAY
    fastboot flash boot boot.img wait for the second OKAY
    fastboot reboot

    Your phone should now be restored exactly as you had it when it was backed up.
    Last edited by gbk1; 05-15-2009 at 07:46 AM.

  3. #3
    Join Date
    Feb 2009
    Posts
    83

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    What happened to placing files in the windows system 32 folder?

  4. #4
    Join Date
    Dec 2008
    Location
    Atlanta GA
    Posts
    2,487

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    this thread should be stickied. we should also make a "how to" for the installation of the different builds of cupcake.

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.






  5. #5
    Join Date
    Oct 2008
    Posts
    887

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    Quote Originally Posted by dashed View Post
    What happened to placing files in the windows system 32 folder?
    That's automated and simplified by using Device Manager and manually selecting the folder that contains the driver.

  6. #6
    Join Date
    Feb 2009
    Location
    LocalHost
    Posts
    264

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    This should be stickied.

    So to restore, just put the 3 recovery files into same directory as fastboot? We don't have to put it straight to the C:\android folder right?
    CyanogenMod RC2
    Amon_RA Recovery v1.70
    DangerSPL

  7. #7
    Join Date
    Oct 2008
    Posts
    887

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    Quote Originally Posted by Stryder View Post
    This should be stickied.

    So to restore, just put the 3 recovery files into same directory as fastboot? We don't have to put it straight to the C:\android folder right?
    You got it. The android folder part is just for people who can't navigate in the command prompt.

  8. #8
    Join Date
    Feb 2009
    Posts
    424

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    didnt find this posted, so quick question.
    i have a mac, so i cant figure out how to restore with nandroid.
    is there any way i can use mybackup to get the same or similar effect.

  9. #9
    Join Date
    Nov 2008
    Location
    San Diego
    Posts
    4,753

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool

    Quote Originally Posted by hersh View Post
    didnt find this posted, so quick question.
    i have a mac, so i cant figure out how to restore with nandroid.
    is there any way i can use mybackup to get the same or similar effect.
    don't think mybackup will restore all partitions.

    sorry, mac-clueless here.

  10. #10
    Join Date
    Oct 2008
    Location
    909 So Cal
    Posts
    3,230

    Default Re: Nandroid v2.0 - Full NAND backup and restore tool


    Quote Originally Posted by hersh View Post
    didnt find this posted, so quick question.
    i have a mac, so i cant figure out how to restore with nandroid.
    is there any way i can use mybackup to get the same or similar effect.
    haven't tried this but seems legit.

    http://www.htc.com/www/support/android/adp.html#s2

    download fastboot-mac.. proceed with
    fastboot flash userdata data.img
    fastboot flash system system.img
    fastboot flash boot boot.img

    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.

    KOBE
    BRYANT
    24 >23 ALL DAY
    ROM:DrizzyHero v2.8 | Follow me on
    To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.


+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Backup for android/G1?
    By bigdaddayjay67 in forum Applications
    Replies: 15
    Last Post: 03-28-2010, 12:48 PM
  2. Now backup your notes
    By orcking in forum HTC
    Replies: 2
    Last Post: 12-13-2008, 07:09 PM
  3. restore android?
    By lunotown in forum Developers General Chat
    Replies: 2
    Last Post: 11-10-2008, 01:07 AM
  4. New Synch Tool
    By probigeorge11 in forum General Android Chat
    Replies: 3
    Last Post: 10-17-2008, 12:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts