How-to- Root, Hack, and Flashing your G1/Dream Read first!!

Search This thread

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
Why should you root your Dream/G1?

Well, hopefully one of those reasons convinced you to get root access on your phone!


Preparing to Get Root on your Phone
Getting root on your phone involves exploiting a security hole that existed in an early version of Android. The versions with the security holes are known as RC19, RC28, and RC29 (or RC7 or lower for UK phones). As of RC30 (RC8 on UK), Google patched the security hole so that your phone can not be rooted (don't worry, we can still root it!).
To check your version, go to the Home Screen, click your menu button, choose "Settings", and then click "About phone". You will then see the following screen:
RC30.png


If you have US-RC30/UK-RC8 or higher, you will first need to downgrade your phone to a previous version. (Skip these steps otherwise)
  1. Format your phone's SD card to FAT32 mode:
    • Hook your phone up to your computer using a USB cable and then wait for the notification to show up in your title bar of your phone.
    • Click the notification, and then click "Mount".
    • A new removable disk should show up on your computer. Right click it and select Format, and select FAT32 as the file system type.
  2. Download and unzip the RC29 or RC7 image file. Copy the DREAIMG.nbh file to the SD card. (RC29 for US, RC7 is for UK)
  3. Turn the device power off.
  4. Hold Camera button, and press Power button to entry boot loader mode. You should see a gray/white screen with instructions to flash your phone with the update on your SD card. If you don't see that, make sure you followed the instructions properly.
  5. As per the on-screen instructions, press the Power button to start upgrade procedure. DO NOT DO ANYTHING TO INTERRUPT THIS PROCESS.
  6. After it is finished, perform the restart your phone.


Rooting your RC29 or lower phone:
On RC29 phones and lower, anything you type into your keyboard is also being run in a hidden console with root permissions. More information regarding that at the bottom of this post. But, to get root access, do the following:

Instructions:
  1. Download recovery.img or the new version by Amon recovery-RA-dream-v1.5.2.img and copy it to your SD card (see the previous instructions on how to copy from your computer to your Phone's SD card).
  2. Download the Hard SPL and copy the zip file to the SD card.
  3. All files must be on the root of your SD card.
  4. Restart your phone. Wait for your phone to start up fully and show the home screen.
  5. After your phone starts up, hit the enter key twice, type "telnetd" and press enter. (Yes, it will start up a contact search, don't worry. Just type it.)
  6. Download an Android "Telnet" application from the Market and connect to localhost.
  7. If you connect successfully, you will have a root prompt "#".
  8. Type the following into Telnet (these commands will give you root access easier in the future):
    • mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
    • cd sdcard
    • flash_image recovery recovery.img
    • cat recovery.img > /system/recovery.img
Now you have root!

What To Do Now That You Have Root
Now that you have root, you will want to apply "Hard SPL" to your phone. HardSPL is what will allow you to apply flash images from other regions (like UK on US phones, and vice versa), create full backups of your phone, install the latest build from the Android source, and usually resurrect your phone if it is "bricked". You have already downloaded the file to your SD card, so now you can apply it.

  1. Power off your phone.
  2. Start up in recovery mode by holding home and pressing power.
  3. You will now enter recovery mode. You should see an exclamation.
  4. If you do not see a menu on screen, press Alt-L to show the menu.
  5. Press Alt-S to apply the update from the SD card.
  6. After the update is complete, hold Home and press Back to restart.

And now, the last step! You are still running an old version of Android, but you want to upgrade to the latest and greatest update! You can do this, and not lose root by downloading modified versions of the updates.

First, choose a modified image from the list below:

ADP1.1: (md5: bacc58302e0b239d66c7bcc8db6c434b)
http://jf.odiness.com/v1.41/JFv1.41_ADP1.1_BuildEnvironment.tar.gz
http://android-dls.com/forum/index.php?f=24&t=241&rb_v=viewtopic
http://andblogs.net/2009/01/jesusfrekes-14-images-are-out/

RC33: (md5: f24b6c237775147cb4bc42efc2393973)
http://jf.odiness.com/v1.41/JFv1.41_RC33_BuildEnvironment.tar.gz
http://android-dls.com/forum/index.php?f=24&t=241&rb_v=viewtopic
http://andblogs.net/2009/02/new-rc33-based-images-from-jesusfreke/

RC8: (md5: de2d0d34adbb4015ee3aa5e4e7ca3c07)
http://jf.odiness.com/v1.41/JFv1.41_RC8_BuildEnvironment.tar.gz
http://android-dls.com/forum/index.php?f=24&t=241&rb_v=viewtopic
http://andblogs.net/2009/01/jesusfrekes-14-images-are-out/


  1. Download the image.
  2. Rename it to update.zip.
  3. Copy it to your phone's SD card.
  4. Turn your phone off.
  5. Start up in recovery mode by holding Home and pressing Power.
  6. Press alt-W to wipe your device. (You need to do this, or the device may hang at the flashing Android screen)
  7. Press alt-S to apply the update.

And that's it! Remember to check the links up top to learn how to use root to do the advanced things I mentioned.
 
Last edited by a moderator:

humble

Senior Member
Dec 17, 2007
199
5
Samsung Galaxy Tab S8
Wow:eek: this is great news keep the community updated. thanks man:D

EDIT:i just tested it my self!! your right this seems like root to me:D
 
Last edited:

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
How did you do that?

mount -oremount,rw /dev/block/mtdblock3 /system

You can't remount that directory that unless you have root.
Use the dd command to copy stuff around (the cp command is not available). I should mention I'm a Windows guy, and am pretty clueless with Linux: my coworker figured the rest of this out once I got to a root prompt. :)

Incidentally, in the /system/bin directory there is a flash_image executable that changes the recovery.img used when you hard reset the device. I've noticed that I can run this without root access from a standard adb shell. Maybe we never needed to root the device after all... I think we can flash it without root access... I'm too scared to mess with that at all though.
 

humble

Senior Member
Dec 17, 2007
199
5
Samsung Galaxy Tab S8
i just rebooted from telnet!!! i must say this is cool:cool:

thanks dude I'm going to give it a run(not flashing) I'm scared too 428 and some change down the draine nooo
 
Last edited:

quedijo

Senior Member
Jul 19, 2007
86
2
Yes!!! Now we dont even have to worry about the update.zip file!

Well, it still will be usefull for package updates.

I'm goin for the bootloader and pretty soon we'll be able to port Android to other HTC devices aswell.
 

jriley60

Senior Member
Nov 1, 2008
198
1
Atlanta
well

i don't konw how safe it is but you can just chmod 777 files and access them through the glance file manager. can't open but you can copy and past them on the sd card and open from there. i wish i could figure out how to see them
 

neerhaj

Member
Nov 5, 2008
15
0
i keep getting "Error running telnet: permission denied" in LogCat. any ideas ?:confused: i have rc29
 
Last edited:

jriley60

Senior Member
Nov 1, 2008
198
1
Atlanta
hrm

i'm now getting Unable to chmod *******: Read-only file system across the board /////////////////nm i'm retarded
 
Last edited:

jriley60

Senior Member
Nov 1, 2008
198
1
Atlanta
yeah i forgot i rebooted my phone, lol just trying to see if i can figure out how to change the view when you mount the sd card to show all files.
 

neoobs

Retired Moderator
Mar 25, 2008
1,239
11
anyone know where the boot code is so I can tell it to mount all folders as read write at boot?
 

orb3000

Retired Senior Moderator
XDA App Taskforce
Yes!!! Now we dont even have to worry about the update.zip file!

Well, it still will be usefull for package updates.

I'm goin for the bootloader and pretty soon we'll be able to port Android to other HTC devices aswell.

Good news!

Hope someone can develop something for Universal!

Cheers to all,
 

Top Liked Posts