[myTouch 3G, Magic Android Development] KarrdeNZ:
Since the original link to this guide is buried in another thread, I've re-posted it here (and the guide in full) in order to help people that might've missed it. The latest version of the guide will always be available at http://www.karrderized.com/romguide/ however, and is a more printable version as well, so please check there too.

Installing the Hero ROM on your HTC Magic

Version 1.2 - 13 August 2009 - by KarrdeNZ

Disclaimer: I am not responsible if you brick your phone. This is only a guide. These instructions have worked for me, but there is no guarantee that they will for you as well. Follow this guide at your own risk.

Feel free to print off this guide if it makes things easier to follow. Please do not, however, steal this guide and claim it as your own. Updates to this guide will be posted here - http://www.karrderized.com/romguide/ - link, but don't steal. Thanks.

Things you'll need

Back up your settings

Installing the Android SDK

Determine your phone's version

Download the correct recovery ROM for your version

Download the correct Hero ROM for your version

Setting up the fastboot connection

Boot the recovery ROM

Back up your phone with Nandroid

Wipe your phone

Load your new ROM

Boot into your new ROM

Things to note

Acknowledgements

Changelog

1 . Things you'll need

A HTC Magic phone (obviously) running Cupcake (1.5) and with a SD card

A USB cable for your HTC Magic

A PC. These instructions assume you're running a Windows variant, though the same procedures can be performed on a Linux machine. Don't ask me about Macs. If you're running Windows, note whether you have a 32-bit or 64-bit OS, it becomes relevant later on.

The Android SDK - current release as of this writing is 1.5 Release 3, available here.

Recovery ROM - Which particular one you want to use will depend on your phone's version (I'll cover this later on).

A signed Hero ROM to install. Again, this is version dependent.

Got all that? Good.

2. Back up your settings

Now, before we start, back up. I'm of the opinion that you can never have too many backups. Take a copy of everything on your phone's SD card, make sure your contacts etc are synced, any apps you want that you can't easily get back from the Market are backed up, all that stuff.

Another thing you should note are the APN settings for your particular provider. These are in Settings, Wireless Controls, Mobile Networks, Access Point Names. You may have multiple APNs listed - go into each one and note down all the settings. You'll likely need to re-enter these manually once you've installed your new firmware.

Once you're satisfied you've got everything backed up, we can start setting up our environment.

3. Installing the Android SDK

Download the latest release of the Android SDK - here at the time of writing - for your relevant OS. I'll be using Windows from here on in. Extract the .ZIP file to somewhere convenient - I've got mine on my C: drive under C:\android-sdk-windows-1.5_r3. We need the SDK for the tools it provides in the tools subfolder, fastboot in particular, as well as the USB drivers for your phone.

4. Determine your phone's version

As of this writing, there are two distinct versions of the HTC Magic - PVT32A and PVT32B. The primary differences between these two versions is the amount of RAM (288MB on the 32A, 192MB on the 32B) and the radio (Qualcomm MSM7200a for the 32A, Qualcomm MSM7201a for the 32B). Generally, if your phone is HTC branded, it's a 32A, and if it's carrier branded (Google, Vodafone, etc) it's a 32B. Mine's a PVT32B from Vodafone NZ. But let's find out for sure what yours is.

Grab your phone and turn it off. Now, while holding the Back button down, power it back on. Your phone should now boot to a screen with a white background, some lines of text, and some skateboarding androids at the bottom. Welcome to fastboot.

The first few lines on the screen, in green, are what we're looking for. Mine reads as follows:

SAPPHIRE PVT 32B SHIP S-ON G
HBOOT-1.33.0004 (SAP10000)
CPLD-10
RADIO-2.22.19.26I
Apr 9 2009,23:30:40

Yours will likely differ slightly. The number we're looking for is in that very first line - PVT 32B in my case. Make a note of this. The next item we're looking for is the second line, which indicates your SPL version. Some SPL versions do not allow ROM flashing, notably those of T-Mobile's myTouch3G variant of the HTC Magic. At this writing, HBOOT-1.33.0006 and HBOOT-1.33.0010 are the two known "perfect SPL" versions that do not allow flashing. If you have either of those versions, stop now. There is a complicated procedure you will need to follow first.

Otherwise, for now you can turn your phone back off (by pressing MENU).

5. Download the correct recovery ROM for your version

Head to this thread and download the recovery ROM for your particular phone version, as we determined in step 4. Save it in the tools subdirectory of the Android SDK (in my case, C:\android-sdk-windows-1.5_r3\tools).

6. Download the correct Hero ROM for your version

If you have a 32A, this thread should help you find a signed ROM (I'd suggest Fatality's Hero ROM): here

If you have a 32B like me, try Qteknology's Hero port here- the swap version is the fastest Hero ROM I've found so far. It does however require you to repartition your SD card in order to provide swap space to speed the ROM up - a guide for this is available from the linked forum post.

Note I have only tested the one I linked for the 32B as that's the version I have. Download whichever ROM you need to somewhere handy, and rename it to update.zip. Please note: if you have file extension display turned off (default in XP) then just rename the file to update instead - the .zip extension will already be set. Once you've done this, copy it to the root directory of your phone's SD card. You can do this using the standard USB connection system that the phone provides, or if you prefer using a card reader.

7. Setting up the fastboot connection

Start your phone in fastboot mode as we did in step 4 (hold down Back while turning the phone on). Once the fastboot screen is up on the phone, plug the phone into your computer with the USB cable.

At this stage, my computer asked for drivers for the phone - these are included with the Android SDK, in the usb_driver subdirectory. Users with 32-bit versions of Windows should use the drivers in the x86 subdirectory under that, and 64-bit versions should use those in the amd64 subdirectory. Once the drivers have installed, leave the phone attached to your PC - you're ready to proceed with booting the recovery ROM.