Android phones are becoming more and more popular by the day. The great thing about them is they run a version of Linux, the bad thing is many of the phones are software protected so that they cannot be modified, and to control what you can and cannot do on them.
Thanks to many clever "hackers", method of "rooting" (gaining full control) your phone have sprung up everywhere, and developers have come up with their own compilations of the OS to replace that of you phone. These adapted of the Android OS explore new features, speed improvements, extended possibilities etc. They can also come at a price: If you break (brick) your phone, the manufacturer may refuse warranty.
This is a quick (adapted) tutorial of how to root your HTC Magic (32A & 32B versions) with CyanogenMod. I will suggest using a recovery ROM called RA-Magic which comes in two flavours, one for the HTC-branded HTC Magic, and another for the Google-branded HTC Magic.
Before proceeding I suggest you first think about the reasons you are wanting to root your phone. I suggest reading the article "The dangers of rooting your Android phone" which states the obvious, but is worth thinking about first.
I suggest you have a look at the FAQ page on the CyanogenMod website. It answers many questions you may have with regards to the upgrade.
I also take no responsibility for bricked phones. It's not as dangerous as one may think, as one is always able to boot over USB and install another image, but do take it into consideration before trying to root your phone, as I'm sure the people who sold it to you (in my case Vodafone NZ) won't appreciate that you changed the OS if you go crawling back to them with "it broke and I don't know what to do" ;-)
Before you start, you must be sure what version of the HTC Magic you have (32 A or B), and whether it is the Google branded or HTC branded version. There are significant hardware differences between these two versions so please be sure before you start.
To find out what you have, shut down your phone. Once it's turned off, holding the back button down press the power button. This will boot the phone into the HBOOT menu which will tell you exactly what phone you have. My phone says
SAPPHIRE PVT 32B SHIP S-ON G
HBOOT-1.33.0004 (SAPP10000)
CPLD-10
RADIO-2.22.19.26I
Apr 9 2009,23:30:40
A friends of mine says
SAPPHIRE PVT 32A SHIP S-ON H
HBOOT-1.33.0009 (SAPP10000)
CPLD-12
RADIO-2.22.20.17
May 8 2009,21:02:32
I have highlighted what to look for, being whether it's a 32A or a 32B model, and whether it's the Google (G) branded or HTC (H) branded phone. I suggest writing down your phone's details as you never know if you need to refer back to it.
Press MENU to reboot your phone.
If you are still unsure or want more information on your phone's version, take a look here.
I decided not to rewrite the entire tutorials here as it has already been documented on the official wiki. The only advise I can give that differs to the official wiki is to use the RA-Magic recovery ROM instead of the documented cm-recovery-1.4.img as it simply has more useful features.
To rename the model found in Settings / About Phone you will need to edit the /system/build.sapphire.prop file (eg to change the model of your phone from "T-Mobile myTouch 3G" to "HTC magic").
To edit any files in the /system directory you will need to remount that partition with R/W permissions.
On the phone:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Or from adb
adb remount