[GUIDE] STOCK-2-CYANOGEN / no longer updated after 4.2.1

Status
Not open for further replies.
Search This thread

Fingerlickin

Senior Member
Feb 6, 2009
463
0
Florida
NOTE: Reference Purposes Only, No Longer Maintained by OP (09/11/2009).



REMEMBER YOU BRICKED YOUR PHONE, NOT ME!
I AM NOT RESPONSIBLE FOR WHAT YOU DO WITH THIS INFORMATION.


ROGERS PHONES ARE ROOTED IN A DIFFERENT WAY
PLEASE FOLLOW THE ROGERS ROOT GUIDE


UPDATED 10/07/09 Installing CM 4.1.999
UPDATED 10/18/09 Installing CM 4.1.9999
UPDATED 10/25/09 Installing CM 4.2.1

Required Materials:
G1 / Dream
Micro SD card reader (phone will work in MOST cases)
Computer with Internet connection
USB cable for phone
Data Plan
_________________________________________________

Format your SD card using the FAT32 Filesystem:
1) Connect your sdcard to the computer using a card reader
2) A new removable disk should show up on your computer.
3) Right click it and select Format
4) Select FAT32 as the file system type.
5) Click the Start button


Download Everything Here
FILE 1 Download and unzip the RC29 or RC7 image file. Copy the DREAMIMG.nbh file to the SD card. (RC29 for US, RC7 is for UK)
FILE 2 Download cm-recovery-1.4.img or RA-dream-v1.5.2 and copy it to your SD card.
FILE 3 Download the Hard SPL and copy the zip file to the SD card.
FILE 4 Download the "1.6 Recovery Image" for your Dream/G1/ADP1 or for your Magic/ION/MT3G (This is NOT a recovery image, it is a ROM that you can flash from recovery)
FILE 5 READ THE FIRST POST and download the latest Cyanogen stable ROM then copy it to your SD card


STEP 1: DOWNGRADE
Our first step is going to downgrade your phone to RC29, This is like removing Windows XP Service Pack 3 and installing Windows XP Service Pack 1. It allows us to use a security flaw to gain root access. This section is going to use FILE 1 from the downloads
1) Turn the device power off.
2) Hold Camera button, and press Power button to enter bootloader mode.
3) You should see a gray/white screen with instructions to flash your phone with the update on your SD card.
4) As per the on-screen instructions, press the Power button to start upgrade procedure. DO NOT INTERRUPT THIS PROCESS.
5) After it is finished, perform the restart your phone. (May take up to 15 minutes to boot)
6) Complete the setup process for gmail.


STEP 2: ROOT
Your phone is now downgraded and we can use the security flaw to replace the recovery image. The "recovery" is kinda like a boot disk on your computer, we use this to delete, modify, and create system files while they are not in use my the ROM. The recovery will be used when ever you flash pretty much anything to your phone.This section is going to use FILE 2 from the downloads
1) At the home screen hit the enter key twice, type "telnetd" and press enter. IGNORE WHAT THE SCREEN IS DOING
2) Press Home
3) Goto the market and download "Telnet"
4) Open Telnet and connect to localhost : 23

5) Press enter and you should see a #
6) Now type the following and press enter at the end of each line

mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
cd sdcard
flash_image recovery cm-recovery-1.4.img
cat cm-recovery-1.4.img > /system/recovery.img

7) Press the home button


STEP 3: HardSPL
Now we are going to change the bootloader or "SPL". Currently your SPL will only allow you to flash ROMs that HTC or your carrier have produced. This new "HardSPL" will allow us to flash ANY ROM we want. This section is going to use FILE 3 from the downloads
1) Hold power and turn the phone off
2) Start up in recovery mode by holding home and pressing power.
3) You will now enter recovery mode.
4) Press Alt-S to apply the update.zip from the SD card. This is the spl you downloaded.
5) After the update is complete, hold Home and press Back to restart. (May take up to 15 minutes to boot)


STEP 4: ROM
Now we are going to flash the latest ROM from Cyanogen. This is your new "Operating System". This section is going to use FILE 4 and FILE 5 from the downloads
1) Hold power and turn the phone off
2) Start up in recovery mode by holding home and pressing power.
3) You are now in recovery mode.
4) Press Alt-W to wipe all data
5) Press Alt-A to apply any zip from sd
6) Choose signed-dream_devphone_userdebug-ota-14721.zip (You won't see the entire filename)
7) When it is done it will ask you to reboot to complete the installation. Press Home+Back
8) You will be returned to the recovery screen in a few minutes, be patient.
9) Press Alt-A to apply any zip from sd
10) Choose update-cm-4.2.1-signed.zip
11) After the update is complete, hold Home and press Back to restart. (May take up to 15 minutes to boot)
12) Complete the setup process





You can NOT run HERO ROMs YET!!!!!!!
You may want to partition your SD Card (See Post 3 or Post 4)
BACKUP FREQUENTLY
Remember that your nanddroid backups are on your SD card so be sure to save them if you do any partitioning.
 
Last edited by a moderator:

Fingerlickin

Senior Member
Feb 6, 2009
463
0
Florida
- Upgrading from CM4.1.11.1 or below to 4.2.XX

Download File 4 and File 5 from first post above.

1) Hold power and turn the phone off
2) Start up in recovery mode by holding home and pressing power.
3) You are now in recovery mode.
4) Press Alt-W to wipe all data
5) Press Alt-A to apply any zip from sd
6) Choose signed-dream_devphone_userdebug-ota-14721.zip (You won't see the entire filename)
7) When it is done it will ask you to reboot to complete the installation. Press Home+Back
8) You will be returned to the recovery screen in a few minutes, be patient.
9) Press Alt-A to apply any zip from sd
10) Choose update-cm-4.2.1-signed.zip
11) After the update is complete, hold Home and press Back to restart. (May take up to 15 minutes to boot)
12) Complete the setup process



Upgrading from CM4.1.99 or higher to CM4.2.XX

Download File 5 from first post above.

1) Hold power and turn the phone off
2) Start up in recovery mode by holding home and pressing power.
3) You are now in recovery mode.
4) Press Alt-B to run a nandroid backup
5) Press Alt-A to apply any zip from sd
6) Choose update-cm-4.2.1-signed.zip
7) After the update is complete, hold Home and press Back to restart. (May take up to 15 minutes to boot)
 
Last edited by a moderator:

david1171

Senior Member
Apr 29, 2009
3,202
166
How to easily esperiment with linux-swap partition sizes

So you want to try out different linux-swap sizes, but do not want to lose your data on your sdcard each time? Then this is the guide for you.

To start you will need you cyanogen's 1.4 recovery image (good thing you followed the above guide eh:)) and some basic math skill.

SETTING UP YOUR SDCARD

Well for this to work you will need to partition your sdcard a certain way, but only once for the entire card. BACKUP YOUR SDCARD!!!

To do this you will go into parted in the recovery console with these commands
Code:
parted /dev/block/mmcblk0
print
Do not leave this screen we will come back to it

After you type print you will want to look for the line that says
Disk Size /dev/block/mmcblk0: xxxxmb (you can fill in the numbers :))

Now for the math. (i will explain some of the reason behind certain sizes then clear up the line)

first line in equation:
xxxxmb (total on card) - 96mb (it can be as large or as small as you want it but the highest i have seen people go with good results is 96mb)
so the first line will be:
xxxxmb - 96mb = zzzzmb

second line in equation:
zzzzmb - 500mb ( most people and guides suggest not to go over 500mb for ext2/3/4 so i shall do the same)
so the second line will be:
zzzzmb - 500mb = yyyymb

complete equation:
xxxxmb - 96mb = zzzzmb
zzzzmb - 500mb = yyyymb
;where xxxx = total mb (going to be the end point for linux-swap as well), zzzz= end point for ext2/ beginning point for linux-swap yyyy = end point for fat32/ beginning for ext2

So now with the equations out of the way (yes, I do like math, thank you very much) type this into recovery while still in parted
Code:
rm 1
rm 2 (if it exists)
rm 3 (if it exists)
(for the next commands obviously you will plug your own numbers in) 
mkpartfs primary fat32 0 yyyy
mkpartfs primary ext2 yyyy zzzz
mkpartfs primary linux-swap zzzz xxxx
print (to verify it worked)
quit (ignore the update etc/fstab comment)
upgrade_fs
reboot

Now that was the hard part, the next part is really easy.

TO CHANGE LINUX-SWAP SIZES EASILY

With the setup above your linux-swap partition will be 96mb by default, to change it you will need to do the following

Go to the recovery console and type
Code:
parted /dev/block/mmcblk0
print
Again do not leave this screen for we shall return momentarily

After you type print, it will show you the sizes of your 3 partitions. The third partition is the one we want to look at. You will need to get the start and end points for this partition.

(for ease of writing this guide, x will be the start and y will be the end)

For a 64mb swap partition you will want to follow this equation:
y - 32mb = y* (y* will be the new endpoint)

For a 32mb swap partition you will want to follow this equation:
y - 64mb = y* (y* will be the new endpoint)

Now go back to your phone that is still in parted and type (of course you substitute in your numbers)
Code:
resize 3 x y*
quit (ignore etc/fstab comment)
reboot

There you go, that is how you quickly and easily change the size of your linux-swap partition without ever taking the sdcard out of your phone.

Also you will need to edit your user.conf and userinit.sh to reflect the new size of your linux-swap partition. Here are instructions for how to edit your user.conf. (thank you kingklick)
 
Last edited:

david1171

Senior Member
Apr 29, 2009
3,202
166
Lol why do we have so many guides of the same thing

because some people suck at following the older guide koush made (the one-click exploit will be patched soon) and this has links to newer roms, i didn't realize there was a more current version of koush's guide up, also this one has friendly pics:)
 

Fingerlickin

Senior Member
Feb 6, 2009
463
0
Florida
Also it's structured in a way that we can refer people back to it when they have a specific need like how to update their radio..... Goto step 6.

Oh and lets not forget that all of our ROMs will crash if you install apps2sd YET IT'S FREAKIN A STICKY IN THIS FORUM. The sticky also tells you to install cm-recovery-1.3.1.img.
 

s15274n

Senior Member
Aug 12, 2009
4,921
1,146
N.C.
callip.wordpress.com
^ great point/post AND thread. I wish I had this back in the day.

Can you add more info oon why to delete davlic AND a post on WTF a user file is/can do.

I still am not sure if i need to do that?
 
T

The Reverend Gridlock

Guest
nice

not a a bad guide, we need to get a newer guide stickied

so got 1 vote from me
 
T

The Reverend Gridlock

Guest
Wow an honory member of the wrecking crew got top spot sticky, ****. We are essential to xda.

Good job fingerlicken
 

pliundemix

Member
Sep 7, 2009
15
1
Cali
Data Plan or Wi-Fi?

Hi finger, or anyone with the kindness to help...

This guide is the most perfect one I think....but I still have a question
Is it necessary to have a Data Plan? or Wi-Fi will do the job? Do I have to unlock my phone before I start the guide? or It doesn't matter?? Thanks!
 

david1171

Senior Member
Apr 29, 2009
3,202
166
Hi finger, or anyone with the kindness to help...

This guide is the most perfect one I think....but I still have a question
Is it necessary to have a Data Plan? or Wi-Fi will do the job? Do I have to unlock my phone before I start the guide? or It doesn't matter?? Thanks!

you can follow this thread for when after you apply the DREAIMG.nbh to activate your phone, so you can finish rooting it, this is the only time you should have to use this method to activate your phone. once you install a custom rom based on the ADP phone you can skip the activation till you have wifi set up.
 

Fingerlickin

Senior Member
Feb 6, 2009
463
0
Florida
So it appears there are several methods of backup the ext partition. Some zipped and some not. What is the easiest (can't F it up) method for terminal, recovery, and adb? I'm going to assume we should stay away from the zipped method.

I got terminal emulator commands down to 3 for backup and 2 for restore. in FAQ
 
Last edited:
Status
Not open for further replies.