Sunday, November 1, 2009

Full Guide for Rooting the G1/Dream to CyanogenMod (legal way)

Downgrading to RC29 (US) or RC7 (Europe)

There is a security loop-hole in the RC29 / RC7 Bluetooth module that is exploited in the next step. This loop-hole has been fixed in more recent releases, so you must downgrade to RC29 / RC7.

  1. Backup any files on your SD card that are valuable to you (you can copy them to your PC's hard drive)
  2. Format your SD card to FAT32
    • Windows: Right-click on SD icon and select format
    • Mac users: Not supported for formatting (bug?)
    • Linux: Use gparted (it's in the repositories of your favorite distro)
  3. Download the RC29 / RC7 dreaimg.nbh file
  4. Put the file you just downloaded onto your freshly formatted SD card.
  5. Turn your phone off.
  6. Hold down the Camera button, and press the Power button to enter the bootloader.
  7. When prompted, press the 'Action' button (trackball), to begin flashing the image. (on my G1 it is the opposite, the trackball cancels the install).
  8. When it's done, press the trackball.
  9. Press the Call, Menu, and End buttons at the same time to reboot. You may need to unplug your phone for this to work.


Rooting the phone

You need to have root (or 'admin') access to the phone so that you can install whatever software you want and not just what your provider gives you. This is where you will exploit the hole in the Bluetooth. This is not the same as unlocking your phone.

  1. Finish booting up your phone, and sign-in to your Google account.
  2. Once you're at the Home screen, open the keyboard, and press the Enter (Return) button twice.
  3. Type
    telnetd [enter]
    • Typing will bring up the Contacts screen, but you can just ignore that.
    • There will be no indication to let you know you did it right. Just continue on to the next step.
    • If you get an error when trying to connect (step 5), try pressing Enter twice and type "telnetd" and press Enter again
  4. Open the Android Market, and install Android Telnet Client (by Koushik Dutta)
  5. Open Android Telnet Client, enter "localhost" in the large text box and press connect. (You may have to enter "23" in the smaller text box on the right)


Cyanogen Recovery Image

Now you need to replace the standard Recovery Image with a customized Recovery Image based off the Recovery Image Google's Engineers use. This will allow you to do things like make a backup of your phone, and recover from a crash. Most importantly, however, this will give you the physical ability to install a custom ROM.

  1. Download the latest Cyanogen Recovery Image (1.4)
  2. Move the Image File to your SD card
    • You may need to unplug/unmount your phone so the phone can access the SD card
  3. Open Adroid Telnet Client and type
  4. flash_image recovery /sdcard/cm-recovery-1.4.img [enter]
  5. if done correctly you will see # #
  6. Press Home key and proceed to next step.


File Download

Due to recent events, CyanogenMod can no longer distribute Google specific apps with his ROMS. The way around this is to download and install the legal Google apps and then install CyanogenMod on top of those apps. The good news is that it works, the bad news is that it requires an extra step or two in the install process. Most people will need only two files.

  1. Download the Android 1.6 Recovery Image:
  2. Download the latest CyanogenMod ROM for your device:
  3. Put all necessary files on your SD card:
    • Dream (G1): Two files


Flash
Android 1.6 & CyanogenMod 4.2.3/4.1.9999

You will now install the actual OS of the phone. First you will install the legal Google apps, and then you will install CyanogenMod on top of those apps.

  1. Turn your phone off.
  2. Hold the Home button while booting to get to Recovery mode.
  3. Press Alt-W (or select "wipe data/factory reset")Press home to confirm
  4. Press Alt-A (or select "apply any zip from sd")
  5. Press home to confirm and let installation complete
  6. STOP - DO NOT REBOOT YOUR PHONE
  7. Once again, press Alt-A (or select "apply any zip from sd")
  8. Press home to confirm and let installation complete
  9. When this is complete, reboot your phone by pressing Home & Back.
  10. Wait. This will take a couple of minutes. Be patient!


If that's all you wanted to do, you're done! You should now have a fully functional phone.


Hard
SPL (optional) - ONLY FOR HTC DREAM (G1)!!!

If you choose, you can install a custom SPL. This will free up approximatly 20MB on the system partition. As of CyanogenMOD 4.2.3, this is not necessary. However, with the release of Android 2.0, it might become necessary to flash a new SPL.

ONLY follow these steps if you've followed the previous steps on this page (or if you manually flashed your radio with the latest version). Otherwise, you will break your phone.

  1. Go to http://code.google.com/p/android-roms/wiki/Install_Hard_SPL and download the SPL File
  2. Place the SPL file on the root of your SD card.
  3. Power off your phone.
  4. Press and hold Home and then press Power to boot into recovery mode.
  5. Once in recovery mode, Press ALT+A (or select "apply any zip from sd") and select the SPL file you downloaded to apply the update from the SD card. (If you do not see a menu / text on screen, ie - you see an exclamation mark, press ALT+L to show the menu.)
  6. After the update is complete, hold Home + Back to restart.
  7. Once your phone has booted up, turn your phone off so that we can make sure the update worked.
  8. Press and hold the Camera and Power buttons to boot into your SPL. It should have three androids on skateboards at the bottom, with a white background. If you still have the four-color rainbow, go back and try again. Either way, press Call, Menu and End at the same time to reboot.


Apps2SD
Fix (optional)

Apps2SD moves your apps to the SD card, freeing up more room on your phone. As of 4.2.3, this is not necessary, however, this may become a requirement in the future.

This is not recommended if using less than a Class 4 SD card, as it may randomly eject and cause all sorts of issues.

This will erase EVERYTHING from your SD card, so make sure to back it up!

These instructions are for Cyanogen's latest recovery console (version 1.4)

  1. Power off your phone.
  2. Press and hold Home and then press Power to boot into recovery mode.
  3. Once in recovery mode, Press ALT+X (or select "go to console") to enter the command line.
  4. Once in the command line, press [enter] to continue.
  5. Type the following two commands to find the size of the SD card:
    parted /dev/block/mmcblk0 [enter]
    print [enter]
  6. Find the line that says "Disk /dev/block/mmcblk0: xxxxMB". Write this down!
  7. The next step is to delete all existing partitions.
    rm 1 [enter]
    rm 2 [enter]
    etc...
  8. Check to make sure all of the partitions were deleted.
    print [enter]
  9. Once the SD card is blank, create the primary partition. (This is the amount of space you want for your music, pictures, etc.)
    mkpartfs primary fat32 0 XXXX [enter]
    • (XXXX = How many MB of storage you would like. Remember to leave 256-512 MB for your app partition, and 384 MB for swap.)
  10. Create the ext2 (application) partition.
    mkpartfs primary ext2 XXXX YYYY [enter]
    • (XXXX = This will be the same XXXX number from step 9)
    • (YYYY = XXXX + [256 or 512] (or whatever size you want to make this partition)
  11. (Optional) Create a swap partition. (Dream RAM is 192 MB, so you probably would want 384 MB swap)
    mkpartfs primary linux-swap YYYY ZZZZ [enter]
    • (YYYY = This will be the same YYYY number from step 10)
    • (ZZZZ = The end of your SD card (the initial size you wrote in step 6)
  12. Check to see that the SD card was partitioned properly.
    print [enter]
  13. If everything is correct, exit parted, and run upgrade_fs to upgrade from ext2 to ext3
    quit [enter]
    upgrade_fs [enter]
  14. (Optional) If you want, you can now upgrade from ext3 to ext4
    tune2fs -O extents,uninit_bg,dir_index /dev/block/mmcblk0p2 [enter]
    e2fsck -fpDC0 /dev/block/mmcblk0p2 [enter]
  15. Once that is finished, reboot the phone
    reboot [enter]


Congratulations! Now your SD card is ready to use Apps2SD (CyanogenMod does the rest automatically).


Full instructions can be found here:

Apps2SD On CyanogenMod


Audio Resources (optional)

CyanogenMod only includes a few ringtones for space considerations. This file has many, many more.

  1. All phones, Download:
  2. Unzip contents to root of SD Card
  3. The phone will automatically recognize the audio files

No comments:

Post a Comment

There was an error in this gadget