[G1 Android Development] geek78:
Thanks to :

•	JF for his recovery.img

•	Arisme for the analysis of the dumped french orange firmware and his tools to customize the firmware

1)	The tools

Unzip all the tools on one folder on your hard disk (c:\ModifDream for example)

SDK here :

http://developer.android.com/sdk/download.html?v=android-sdk-windows-1.1_r1.zip

fastboot here :

http://member.america.htc.com/download/web_materials/ADP/fastboot.exe

other tools here :

http://www.megaupload.com/?d=XMGZSYOM

You must copy thoses files on the microSD card :

-	boot-root.img

-	systemDEV.img

-	dataDEV.img

-	libhtc_ril.so (we need this patch from the original french firmware for a compatibility with the radio)

-	wlan.ko (we need this patch from the original french firmware for a compatibility with wifi)

-	busybox.asc

-	trout-keypad-v3-franch-azerty.kcm.bin (with the ' and the ")

2) Backup of your dream.

We will use the JF recovery :

- Shutdown the dream

- plug it to the PC

- put your dream in fastboot mode

- On the PC, do :

cd\ModifAndroid

fastboot boot recoveryJF.img

- On the dream keyboard do ALT+B to backup your dream

- At the end of the backup do BACK+HOME to reboot

Ok the backup is done (NANDROID folder on your microSD card

3) Patch the boot for permanent root access throw adb

Put the dream in fastboot mode

Plug it to the PC

- On the PC, do :

cd\ModifAndroid

fastboot boot recoveryBoot.img

After the startup of your dream, do on the PC :

adb shell

mount /dev/block/mmcblk0p1 /sdcard

flash_image boot /sdcard/boot-root.img

reboot

4)Install of the new firmware and of all the patchs (ADP firmware)

Put the Dream in fastboot mode and plug it to the PC

- On the PC do :

cd\ModifAndroid

fastboot boot recovery-unyaffs.img

After the startup, do on the PC

adb shell

mount /dev/block/mmcblk0p1 /sdcard

mkdir /tmp/system

mkdir /tmp/data

mount /dev/block/mtdblock3 /tmp/system

mount /dev/block/mtdblock5 /tmp/data

cd /tmp/system

rm -rf * (dont be afraid by the error)

unyaffs /sdcard/systemDEV.img

cd /tmp/data

rm -rf * (dont be afraid by the error)

unyaffs /sdcard/dataDEV.img

cp /sdcard/libhtc_ril.so /tmp/system/lib/

cp /sdcard/wlan.ko /tmp/system/lib/modules/

cp /sdcard/trout-keypad-v3-franch-azerty.kcm.bin /tmp/system/usr/keychars/

cp /sdcard/trout-keypad-v3-franch-azerty.kcm.bin /tmp/system/usr/keychars/trout-keypad-v3.kcm.bin

cp /sdcard/trout-keypad-v3-franch-azerty.kcm.bin /tmp/system/usr/keychars/trout-keypad.kcm.bin

Do on the dream keyboatd ALT + W

After the startup, do on the PC (to have root and busibox) :

cd\ModifAndroid

adb shell

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

dd if=/sdcard/busybox.asc of=/system/bin/busybox

chmod 4755 /system/bin/busybox

cd /system/bin/

busybox cp -s busybox cp

busybox sh

cat sh > su

chmod 4755 su

reboot

OK, that is finished!

After the startup you will have to sign in with your gmail account. To do it you have first to create an APN (MENU and then NEW APN)

5)Back to the orange firmware

If you need to come back to the orginal situtation, just copy system.img and data.img from your NANDROID backup at the root of your microSD Card and copy and rename the boot.img from this backup to boot-orange.img at the root of the card.

Put the dream in fastboot mode

Plug it to the PC

- On the PC do :

cd\ModifAndroid

fastboot boot recovery-unyaffs.img

After the startup, do on the PC :

adb shell

mount /dev/block/mmcblk0p1 /sdcard

mkdir /tmp/system

mkdir /tmp/data

mount /dev/block/mtdblock3 /tmp/system

mount /dev/block/mtdblock5 /tmp/data

cd /tmp/system

rm –rf * (don't be afraid by the error)

unyaffs /sdcard/system.img

cd /tmp/data

rm –rf * (don't be afraid by the error)

unyaffs /sdcard/data.img

On the dream keyboard do ALT + W

Put again the dream in fastboot mode

On the PC do

cd\ModifAndroid

fastboot boot recoveryBoot.img

After the startup do on the PC :

adb shell

mount /dev/block/mmcblk0p1 /sdcard

flash_image boot /sdcard/boot-orange.img

reboot

REMARK

You will find in the zip a tool : unyaffs. With this tool you can extract on your PC image like system.img or data.img. This is really interesting if you need some patch from the orginal firmware. Maybe italian users can use it to get their keyboard layout, update it (with an hex editor) and replace the french layout in this exemple with the italian one ;)

To use this tool : unyaffs system.img or unyaffs data.img with your image on the same folder fo unyaffs