[G1 Android Development] hellogadgetman:
The Ultimate Guide to put Hero Builds and other Builds to your G1/Magic Android Phones by hellogadgetman from Greece

or download from here for best structure and more

http://rapidshare.com/files/2522727..._Builds_and_other_Builds_to_your_G1_best.docx

for ROOTED Phones

I have no responsibility for mistakes and problems through this guide

1)	Find your SPL and Radio Versions

•	Radio

o	Next you will want to confirm your Radio Baseband.

To Confirm this Press Menu - Settings - About Phone - Scroll down till you see Baseband version.

Compare the Baseband value to the value below to see if you are using the correct radio for your build or if you need to update.

o	You will need 2.22.19.26I

•	Currently there are three SPLs available. The G1 variant is the SPL that is installed in stock T-Mobile G1 phones. The Engineering variant is found in the Android Dev Phone 1. Finally, the HardSPL is a modification of the Engineering variant by cmonex, with additional hacker-friendly functionality.

•	HardSPL

•	VER: HSPL10.95.3000

•	HardSPL is a modification of the Engineering SPL by cmonex. In addition to the functionality of the Engineering SPL, HardSPL also allows NBH files to be used without matching the CID (carrier ID) check.

•	Engineering SPL

•	VER: HBOOT-0.95.3000

•	The Engineering SPL is a custom SPL installed in devices intended for Android development. It has existed since before the launch of the G1 and is now available to the general public as preinstalled on the Android Dev Phone 1.

•	G1 Original SPL

•	VER: HBOOT-0.95.0000

•	This is the original SPL which is installed in a stock G1. It is easily distinguished by the "trademark" red-green-blue bootloader screen which appears in many HTC phones. This SPL does not support the fastboot protocol and thus will not allow the user to flash nand backup images.

2)	Update the Radio to the Latest

•	Download the Radio zip.

•	http://android-roms.googlecode.com/files/ota-radio-2_22_19_26I.zip

•	Rename it to "update.zip".

•	Copy it to the root of your phone's SD card.

•	Turn your phone off.

•	Start up in recovery mode by holding Home and pressing Power.

•	Press ALT+S to apply the update.

•	Once the update is applied press Home+Back to reboot the phone. The Phone will start to boot up and then continue applying the update. Once this is completed the Recovery menu will ask you for the second time to reboot the phone via Home + Back

3) Update the SPL to the Latest

IF YOU HAVE ONE SD CARD:

•	Upload new SPL on your microSD and rename to "update.zip"

•	Reboot your phone into recovery mode. I ASSUME YOU MEAN HOLDING POWER AND HOME BUTTONS>>>RIGHT?

•	THIS IS IMPORTANT (perform a nandroid backup, of course) APPLY THE UPDATE USING ALT-S..., and once complete DON'T DO ANYTHING.. read step 4.

•	WITHOUT PRESSING ANY BUTTONS remove your microSD card from your phone, and plug it into your microSD card adapter/SD card reader

•	Remove/rename the SPL update (to something other than "update.zip") and upload the update file of the build you are currently using onto your microSD card. Put your microSD card back in your phone AGAIN WITHOUT PUSHING ANY BUTTONS I KNOW THIS IS STUPID, BUT WE RENAME THE BUILD TO UPDATE.ZIP AS WELL

•	Press Alt + x to go to the console. If your phone does not reboot automatically, press enter, type "reboot recovery", then press enter again.

•	If you boot up in recovery, you have done everything correctly. Now APPLY THE UPDATE USING ALT-S, reboot, and you're done

4) Performing a NANDROID Backup

At this point you should backup your phone via NANDROID

1 Turn your phone off.

2 Hold Home, press Power button to boot into Recovery Mode

3 Press ALT+B to start the backup.

4 Once the backup has completed press Home + Back

Next your phone will reboot and load the OS, at this point you should copy the files your just backed up to your PC incase you need to recover your phone

1 Mount your SDCard to your PC

2 On your SDCard change to the nandroid/HT840GZ30985

3 Inside this folder you will see another folder the first 8 digits of this folder name is the date it was created in the YYYYMMDD format and the last four are the time.

4 Copy this entire folder to your PC and save it. As you make more backups to your phone repeat this process.

5) Format your sd card to Fat32 and Ext2/Ext3 Partitions

•	Install the sdsplit executable to your phone. To so this, open the 'terminal' application / ADB Shell and type the following commands at the prompts:$ su

# cd /data

# wget http://64.105.21.209/bin/lib/droid/sdsplit

# chmod 555 sdsplit

# exit

•	Decide the size of your FAT partition:

You should use one of two approaches to decide the size of your FAT partition. The first one involves simply directly deciding this size (i.e. I want a 5G FAT partition). In this case, the EXT2 partition will be the remainder of the card.

size_of_fat_partition = size

The second method is based upon the fact that you want to decide the size of the EXT2 partition and would like the FAT partition to be the remainder of the card. In this case, the size of the FAT partition will be based on the size of your sdcard and the size of the EXT2 partition that you want. Use this formula to calculate it:

size_of_sdcard - size_of_ext2_partition = size

So, if you have an 8GB sdcard and want 1GB of space for apps on your EXT2 partition, use 7000M for the FAT size.

No matter which method you use, you will need to specify either bytes (no parameter), kilobytes (K) or megabytes (M) . So, for a 5G partition would use a 5000M size parameter.

Note: The size parameter is currently case sensitive, use 7500M, not 7500m!

•	Backup your SDCard onto your PC

Note: To figure out how much data (in K) you have on you FAT partition, you can type the following in your terminal / ADB Shell (the sdcard can not be mounted for this cmd to work):

$ du -s /sdcard

Note: to find out how much free space is left on your /data partition type (see available)

$ df /data

•	Run sdsplit. Use the size from step 3 below (do not forget the "M" in size if you are specifying megabytes): (Note: you will need an internet connection on your phone for this step)

Note: If you are using the JF1.5 update, you should put a -nc at the end of the commands below since system configuration is not needed!

Non JF1.5 Build:

$ su

# /data/sdsplit -nd -fs size

# exit

JF1.5 Build:

$ su

# /data/sdsplit -nd -fs size -nc

# exit

Please, remember to record the output of this stage if you run into a problem. There will be a permanent record of it in, /data/sdsplit.log.

•	Reboot your phone, via terminal:

reboot

•	Restore your data from your PC to your Fat partition of your SDCard.

•	You're done! You should have two partitions now on your sdcard. The FAT one mounted at /sdcard and the EXT2 one mounted at /system/sd.

6) Put the Cyanogen Recovery image 1.2

http://n0rp.chemlab.org/android/cm-recovery-1.2.img

To install raw image: copy it to your sdcard and run from a terminal:

flash_image recovery /sdcard/cm-recovery-1.2.img

It is suggested to fully shutdown the device and power it back up.

Check Recovery IMG by rebooting phone and pressing Home + Power to see the new Recovery IMG

If you have problems with a "no space on device" error, try using fastboot and erasing first:

fastboot erase recovery

fastboot flash recovery cm-recovery-1.3.1.img

7) Upload JACHero 2.2.3 or any other to sd card and rename them as update.zip

8)Last steps to finalize

•	wipe

•	run apps2sd from recovery image menu

•	then run fix filesystems

•	then run update.zip

•	then run apps2sd from recovery image menu again

•	then reboot

•	when phone reboots, give it about a minute after the screen comes on and chose deny on swapper in SU permissions pop up.

•	then go thru the setup for gmail and android..

•	after you get logged in to everything, do your settings for backlight and whatever else,

•	then go to programs and do the swapper settings -

•	SWAPPER SETTING:

/system/sd/swapfile.swp

Change swapper size

i did 20mb / 32mb ( i think thats right )

•	then reboot ( after Gmail has finished syncing your contacts )

•	when it comes back up choose always allow on swapper ( in su permission popup )

•	then do you market and flickr( disable wifi for a sec ) to accept the terms..

•	then give it a few seconds, and in about 1 min the phone will be running faster like cupcake

Many thanks to JACHero,Cyanogen,Robpet2,Jesus Freke,Jon Pezz, xmoo, Haykuro, Stericson, dapro, The Dude, Darkrift, and many others!