Showing posts with label unrevoked. Show all posts
Showing posts with label unrevoked. Show all posts

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.

Rooting Option 1:

WARNING: by rooting your phone, you are choosing to void your phone's warranty. Proceed at your own risk. Know that you are choosing to do this. No one is making you. Further, you are the one doing this, not me.

Ok, so now that we have successfully migrated to build 2.27.651.5 our HTC Hero for Sprint is "vulnerable" to rooting. The rooting option that we will explore in this post is the "unrevoked" option. This is, by far, the easiest option for rooting the phone. I will explore a more "hands on" or traditional exploit in a later post for anyone who is interested in how to exploit 2.27.651.5's vulnerability from the command line.

For now, let's root our HTC Hero using the unrevoked method.

IMPORTANT NOTE: if you have not already migrated to build 2.27.651.5 or have no idea what I'm talking about, click here. You will NOT be able to root your phone using this method if you have not reverted to 2.27.651.5.

If you know that you are running 2.27.651.5 then move on to Step 1.


Step 1: Plug your phone into your computer using your USB cable.

Step 2: Set your phone to "Charge Only".

Step 3: On your phone, navigate to http://unrevoked.com/m/

Step 4: Tap to download the unrevoked exploit.

Step 5: Once the download is complete, install the unrevoked app.

Step 6: Once the unrevoked app is installed, go to your apps collection and run the unrevoked app.

Step 7: Tap "Start" and let the app exploit your phone's vulnerability.

After Step 7, you should get confirmation that your phone has been rooted.

Step 8: Go to your apps tray. Inside you should find the "Super User" app (Little Ninja with a Gun). Tap this app and you will be asked to set a permission. Approve it and your phone is officially rooted.

While it's true that your phone is rooted and that you can take advantage of apps that require root privileges there are some further steps that you need to take in order to get the most of your rooted HTC Hero.

In the next post, we will look at Nandriod, making backups and restoring backups. Knowing how to work with Nandroid is absolutely essential for loading custom ROMs.