Help please, can't nandroid restore :(


Last Updated:

  1. Android noob

    Android noob Well-Known Member This Topic's Starter

    Joined:
    Mar 28, 2010
    Messages:
    94
    Likes Received:
    2
    So I just tried to go back to a previous nandroid backup I had on my phone, specifically CyanogenTazz because I didn't like the current ROM I was on... So I wiped my dalvik cache and did a factory reset wipe and then went to restore and it gave me this error "error : run 'nandroid-mobile.sh restore' via adb!" What is the exact command in command prompt to do that? And what caused this error? I'm pretty confused :p
     

    Advertisement
  2. doogald

    doogald Guides Guide

    Joined:
    Jan 7, 2010
    Messages:
    6,622
    Likes Received:
    1,896
    How much battery do you have left? IIRC, at some point Nandroid will refuse to do a restore if the battery is low, to help protect you from bricking your phone if the restore stops when the battery is completely worn down.
     
  3. BlueDC2

    BlueDC2 Well-Known Member

    Joined:
    Mar 7, 2010
    Messages:
    361
    Likes Received:
    52
    Also, make sure if you renamed the nand that you didn't use any spaces or weird characters.
     
  4. VanDums

    VanDums Well-Known Member

    Joined:
    Jan 29, 2010
    Messages:
    112
    Likes Received:
    5
    I just ran into this and I think it was because of renaming my backups using a space like what was stated. I had a backup I didn't rename and it restored fine. I am glad for that. Now at least I can load that one and rename the others properly.
     
  5. scary alien

    scary alien not really so scary Moderator

    Joined:
    Mar 5, 2010
    Messages:
    21,686
    Likes Received:
    22,045
    FYI, you don't actually have to do any wipes when you do a Nandroid restore.

    For the exact restore command, you'd have to establish an adb session while your phone is booted into recovery--its not really a command that would normally be useful / relevant. The error message you got was from Amon_RA's recovery telling you it didn't like how the nandroid-mobile.sh script behaved when it tried to launch him.

    doogald is absolutely right...the nandroid-mobile.sh script ensures that you have at least 30% charge on your phone, but you should get a message like "Error: not enough battery power, need at least 30%. Connect charger or USB power and try again" when this occurs.

    Not exactly sure what is going on with your restore, other than the already offered suggestion about spaces in your directory name. You can also look in your Nandroid backup directory and verify that you've got all four files: data.img, boot.img, system.img, and nandroid.md5.

    Check out this thread for more detailed info. regarding Nandroid: http://androidforums.com/eris-all-things-root/171764-i-messed-up.html

    I'm still trying to track-down and decipher the causes of when the error you are seeing happens (which also happens sometimes on Nandroid backups...I usually just retry them and they seem to work...weird, I know).
     
  6. scary alien

    scary alien not really so scary Moderator

    Joined:
    Mar 5, 2010
    Messages:
    21,686
    Likes Received:
    22,045
    Just a quick follow-up re. the above. [okay, after typing this up, it wasn't really that quick after all ;)]

    In looking at Amon_RA's recovery source code (specifically, recovery.c), the nandroid-mobile.sh script is fork'd (launched) and monitored for its termination status. Any non-normal or non-zero termination status by the script for a Nandroid restore will lead to the error message that the OP reported. Unfortunately, Amon_RA's recovery.c stub does not report the exit status (tsk-tsk :p)--there's actually only three different exit statuses that are returned by the nandroid-mobile.sh script (0, 1, and a single instance of an exit status 2).

    Now, looking in the Eris-specific nandroid-mobile.sh script, here are the conditions under which the script returns with a non-zero exit/return status:

    - status 1: battery charge under specified threshold (30% for a restore)
    - status 1: selecting more than one main script function (i.e., backup and restore in the same invocation)
    - status 1: inability to mount the /sdcard
    - status 1: improper combination of arguments passed to the script
    - status 1: inability to find the mkyaffs2image utility for a backup
    - status 1: inability to find the dump_image utility for a backup
    - status 1: inability to find the flash_image utility for a backup
    - status 1: inability to find the unyaffs utility for a backup
    - status 1: if the script was not invoked while in recovery
    - status 1: if the phone's device-id cannot be identified
    - status 1: if the script was not launched under root

    Restore-specific non-zero status codes:

    - status 1: battery charge under specified threshold (30% for a restore)
    - status 1: inability to mount the /sdcard (hmmm....possibility...)
    - status 2: inability to find any backups in the Nandroid backup directory (alarm bells? :eek: spaces in your backup directory's filename?)
    - status 1: inability to mount the /data partition
    - status 1: inability to mount the /system partition
    - status 1: inability to find the nandroid.md5 file in the selected backup directory
    - status 1: inability to find the gzip utility
    - status 1: not enough free space (100MB) available for decompressing files if needed
    - status 1: mis-matched MD5 sums while verifying the checksums of the files contained in the nandroid.md5 file (i.e., your Nandroid backup is verified to ensure that each file is complete and uncorrupted)
    - status 1: inability to mount the ext2 partition (if applicable)

    Backup-specific non-zero status code:

    - status 1: inability to mount /system or /data as read-only or the /sdcard as read-write
    - status 1: inability to create the backup directory on the /sdcard
    - status 1: inability to write (touch) a file in the /sdcard's backup directory
    - status 1: not enough free-space (130MB) on the /sdcard
    - status 1: fatal errors in attempting to dump_image the /boot, /recovery, or /misc partitions (even after 5 attempts); note: which partitions are backed-up are controlled via command-line arguments
    - status 1: inability to mount the ext2 partition (if applicable)

    There are other nandroid-mobile.sh functions that also return exit statuses similar to the above, but are not relevant to this conversation.

    After researching the above, I would think its most likely that the OP had spaces in his Nandroid backup directory name as VanDums and BlueDC2 suggested (and doogald has in many other threads). Failing that, possibly a flakey /sdcard?

    Survey says?

    Cheers! Hope this was useful.
     

Share This Page

Loading...