[G1 Android Development] haykuro:
Here's the thread for tech details. No questions in this thread, please.

My input:

Rooting the Rogers Dream

Download the tools required

Extract to anywhere on your computer.

Place update.zip on the root of your sd card.

Reboot the device into SPL (power off, hold camera button, boot, press "back" or "send" [check prompt on device] to enter "FASTBOOT" instead of "HBOOT")

fastboot boot recovery.img

Apply update, wait until phone idles, press HOME+BACK, it will reboot, finish writing hboot, then reboot again into recovery by itself. Do not interrupt it at all until it's done.

HOME+BACK to reboot into regular device.

Power off, hold camera, boot, go back into FASTBOOT

fastboot flash recovery recovery.img

fastboot flash boot boot.img

fastboot reboot

that's it! :)

Rooting the HTC Magic / Sapphire: http://android-dls.com/wiki/index.php?title=Magic_Rooting

Developer notes (for devs and rom builders):

Dev's (cyanogen, i'm looking at you [you requested this info :P]) you can download my hacked up mkbootimg and some other tools here: http://www.mediafire.com/?njl4x5ozldm

these are all baked up by me in a flurry of rush and etc, so excuse the sloppiness :o

You will have 2 tools to use now, compileboot and compilebootmagic.

compileboot creates a regular g1 boot img (and the vodafone magic as well supports these old boot locations)

compilebootmagic has 2 options.

compilebootmagic -1 will create an image supported by the HTC Dream (rogers), all new magic devices, and most likely the hero and etc (these new locations are based on ram size pretty much)

compilebootmagic -2 will create an image with user supplied arguments (it says dream but disregard it, i made it before finding out the new codes matched -1)

Discovering new boot locations!

This is a fun (and easy) bit.

Just grab a boot.img from the device you'd like to learn about, and follow the chart below:

0xf-0xc (backwards): kernel addr
0x17-0x14 (backwards): ramdisk addr
0x1f-0x1c (backwards): second addr
0x23-0x20 (backwards): tags addr

you can also use this script (linux users):

#!/usr/bin/php
<?php
function bootloc($file) {
$handle = fopen($file, 'rb');
$data = stream_get_contents($handle);
fclose($handle);
$text = "";
for($a = 0; $a < 8; $a++) {
$text .= $data[$a];
}
if($text == "ANDROID!") {
$out = sprintf("Kernel addr : 0x%02x%02x%02x%02x", ord($data[hexdec('f')]), ord($data[hexdec('e')]), ord($data[hexdec('d')]), ord($data[hexdec('c')]))."\n";
$out .= sprintf("Ramdisk addr: 0x%02x%02x%02x%02x", ord($data[hexdec('17')]), ord($data[hexdec('16')]), ord($data[hexdec('15')]), ord($data[hexdec('14')]))."\n";
$out .= sprintf("Second addr : 0x%02x%02x%02x%02x", ord($data[hexdec('1f')]), ord($data[hexdec('1e')]), ord($data[hexdec('1d')]), ord($data[hexdec('1c')]))."\n";
$out .= sprintf("tags addr : 0x%02x%02x%02x%02x", ord($data[hexdec('23')]), ord($data[hexdec('22')]), ord($data[hexdec('21')]), ord($data[hexdec('20')]))."\n";
return $out;
} else {
return false;
}
}
if($argc < 2) {
echo "Usage:\n";
echo $argv[0]." <img file/s>\n";
echo "example:\n";
echo $argv[0]." boot.img boot-new.img recovery.img recovery-new.img\n";
} else {
for($a = 1; $a < $argc; $a++) {
$out = bootloc($argv[$a]);
if($out) {
echo $argv[$a],":\n";
echo $out;
} else {
echo $argv[$a]," is not a boot/recovery img!\n";
}
}
}

usage: bootlocations.php <boot.img, more than one can be supplied>

example: bootlocations.php boot.img boot-new.img

NOTE: i will try to keep adding to this until it's full. any information that isn't in here, feel free to request via pm.