Tuesday, August 31, 2010

Backups and Recoveries: Using Nandroid

Because we rooted our HTC Hero for Sprint using the unrevoked method, we still have not made it possible to use Nandroid to make backups, run recoveries, and install custom ROMs. If you want to run a custom ROM, you'll need to be able to use Nandroid and so, you'll want to read through this post.

Please Note: If you haven't rooted your HTC Hero for Sprint yet, you'll want to read my Rooting Option 1 post. The following is only possible with a rooted phone.

So, we want to be able to use Nandroid. Nandroid is something like a BIOS and you'll need it to change boot settings, wipe your device, load ROMs, do backups, restores, etc.

How to's:

Step 1: Plug your rooted HTC Hero for Sprint into the computer that you put the Android SDK on and set it to "Disc Drive" (Don't have the android SDK? Read my "What You'll Need" post to get it.) Make sure you turn USB Debugging ON (on your phone: Home-> Menu-> Settings-> Applications-> Development-> USB debugging.)

Step 2: Download the android recovery-RA-heroc image here and save it to your phone's sim card at the root directory. In other words, save it to the sim card but don't put it in any folders. It should be in the main directory along with all your other folders.

Now we're really going to start hacking at your phone. Remember that you are doing this at your own risk.

All computer command line calls will be in blue, bold, and italics.

Step 3: On you computer, launch your command prompt (terminal for linux users and I don't really care what it is for apple people). If you don't know how to launch a command prompt, just go to the "start button" and run "cmd" (for XP users) or just type "cmd" in the search field for Vista/Win 7 users.

Step 4: Now we want to change directories so that we are hanging around our Android SDK tools. In your command prompt type: cd C:\...\android-sdk-windows\tools
and hit "Enter". The "..." is whatever path leads to your android sdk folder. If this is new to you or you don't understand this, I highly recommend you stop now and enjoy your rooted phone as it is.

Your command prompt should now read: C:\...\android-sdk-windows\tools>_

Step 5: We now want to launch some shell code but first we want to confirm that our SDK tools see your phone. In your command prompt, type: adb devices
and hit Enter
You
should see a List of attached devices and your device's serial number.

Step 6: We launch our shell: adb shell
and hit Enter

You should now see a $ and a cursor

Step 7: We switch to root user: su
and hit Enter

You should now see a # and a cursor. Note: if you don't see a #, look at your phone and see if it is prompting you to give any permissions. If it is, allow.

Step 8: Now we want to flash the recovery image that we put on the sdcard back in Step 2. To do this, we're going to envoke some root power after we hop onto our phone's microSD care: cd sdcard
and hit Enter

You should now see a #

Step 9: A good way to make sure that we are in the right place is to list the directories and files where we are. We'll do that my calling for a list: ls
and hit Enter

Command Prompt should list the local directories and files for the sdcard root folder. You should see "recovery-RA-heroc-v1.2.3.img" among them. If not, go back to Step 2 and be sure that you've placed this image on your phone's sdcard.

Step 10: We are now going to flash this recovery image in order to create our Nandroid directory: flash_recovery recovery-RA-heroc-v1.2.3.img
and hit Enter

Nothing too exciting will happen. Command prompt might return this call in text form and then should just leave you again with a # awaiting your next command.

Step 11: Now, we will are going to visit our newly created nandroid folder by forcing our phone to boot into it: reboot recovery
and hit Enter

Your phone will reboot into the nandroid interface. From here you will be able to make backups of your phone, restore your phone from these backups, wipe system data and, most importantly, install custom ROMs. I will cover all of this in a later post.

If any of this didn't work, please let me know in the comments field or, if you know me, let me on Facebook or something.

2 comments: