[myTouch 3G, Magic Android Development] androidpanda:
quick guide

Hi,

You can't do any of this without the Android SDK installed, which also provides you with the necessary tools for formatting your SD card without touching linux (well apart from the linux on the phone). Don't worry this looks worse than it actually is :-)

So here's what you do: download Amon RA's recovery image or Cyanogen's (whatever you like). Take a look at this

You'll need to "root" your phone with an engineering SPL (see details for mine in my signature).

Then when you are ready to start, turn off your phone, then press and hold the back and power key. Connect up USB lead to your windows PC (assumes you have the USB driver installed correctly, see other threads about installing HTC sync e.g. here.

NOW MAKE A NANDROID BACKUP. This gets saved to the SD card. Once done, reboot the phone, mount in windows and save the contents of the nandroid folder (and any pictures you want to keep) to your computer.

Turn phone off again, and press and hold the back and power key.

Open a command window (start -> type "cmd"), then cd to:

c:\<wherever you installed the SDK>\tools

then type:

fastboot devices

this should show your device as being connected

E.g. on my computer

C:\android-sdk-windows-1.5_r3\tools>fastboot devices

HT94TKF01307 fastboot

If it does, then type:

fastboot boot recovery-RAv1.2.1G.img

This boots your phone into the recovery shell. Now you can open a shell on the phone by opening a command window, and from the tools folder (see above) type:

adb shell

this should return a hash (#) prompt.

Now type:

parted /dev/block/mmcblk0

E.g. on my computer

# parted /dev/block/mmcblk0

GNU Parted 1.8.8.1.179-aef3

Using /dev/block/mmcblk0

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted)

Now type:

print

E.g. yours may look like this

print

Model: SD SU08G (sd/mmc)

Disk /dev/block/mmcblk0: 8169MB

Sector size (logical/physical): 512B/512B

Partition Table: msdos

Number Start End Size Type File system Flags

1 512B 8169MB 8169MB primary fat32 lba

this lists the current partition table for your SD card

(*)Make a note of the size after "Disk /dev/block/mmcblk0:" here mine is 8169MB

Assuming yours was all assigned as a single FAT/FAT32 partition you can then type

rm 1

THIS EFFECTIVELY ERASES THE SD CARD (BE WARNED)

Now you need a calculator (or a brain), subtract 596 from the number you noted above(*) i.e. for ME this is 7573

Now type

mkpartfs primary fat32 0 7573

(**) then add 500 to the number you calculated above = 8073 for ME

Now type

mkpartfs primary ext2 7573 8073

then type

mkpartfs primary linux-swap 8073 8169

where 8073 = number YOU calculated in step (**) and 8169 is the number you noted at step (*)

then type

quit

upgrade_fs

upgrade_fs converts your ext2 partition to ext3

lastly type

exit

this takes you out of the shell on your phone.

You can now use the following commands to install the hero ROM of your choice (though of course I recommend eViL D:'s)

In a command window change directory to

C:\android-sdk-windows-1.5_r3\tools>

then type

adb shell mount /sdcard

then type

adb push <ROM-file> /sdcard/update.zip

where <ROM-file> is the name of the ROM file you downloaded from the first page of this thread (make sure you save it to C:\android-sdk-windows-1.5_r3\tools>).

the rest I leave up to you......

Hope this helps.....

Jon.