Tuesday, July 12, 2011

HTC Magic - reverting to Foyo 2.2.1 from CynogenMod

I've had this phone for a while now but decided to finally revert to the official HTC Magic Vodefone UK release.

It's not a simple flash process as you 1st need to revert back to the 1.6 stock rom.

Before you start any of this backup any information you want off the phone to the SB card. (text messages etc). I did full backup of the rom to SD via Amon RA Recovery 1.7 tools.

The process starts here, the post by NeoBlade. Details are listed below but is not quiet that simple as you need to do a few other bits first.

First you need to get the HTC Magic to talk to your computer via USB. to Do this you need to download and install HTC Sync. This will install the correct drivers for the phone to ensure you can run the software package that installs the base 1.6 stock rom.

To get the stock rom you need to google and find a download for 'RUU_Sapphire_Vodafone_UK_1.91.161.1_DRC92_signed_NoDriver.exe' there is one list on 4share.

Run this .exe and follow the instructions. (this all worked for me on Windows 7 x64, I did run it as admin and in XP mode)

Once the phone it back to stock 1.6 you can then start the update process as mentioned above.

For those who still haven't got it, here are the links for the OTA 2.2 ROM. You must be on the Stock VF 1.6 firmware before applying these files...

1. http://android.clients.google.com/packages/ota/vodafone_vfpioneer/126221163a9c.hboot-1.33.0013.vfpio...

2. http://android.clients.google.com/packages/ota/vodafone_vfpioneer/735b0bf4f2e4.signed-vfpioneer-FRG8...

NOTE: For those running AmonRA/Clockwork Recovery simply flash file number 1, then file 2 in Recovery.

NOTE 2: For STOCK users who have not rooted or replaced their Recovery, follow the steps below...

Download and copy the first file to your SDCard. Rename the first file as update.zip, then unmount the SDCard. Turn off your phone. Hold the HOME button and press Power to enter Recovery. It should look for the update.zip file. Press Action to "Apply the update".

Once done, do the exact same procedure for file 2.

Reboot and you should be fully updated ^_^

Now that this is all done it should all be good, however we've now lost root access.

I was able to root it using the tool & method mentioned here called SuperOneClick

After a few days it seems that they pushed the OTA update to the market which is nice.

So far the new official build has been very impressive. Battery life is excellent, memory usage is good. Responsiveness of Apps is great. Very happy to find that the Google Car Home is part of the official build. I could never get this to install or work under CyanogenMod builds.

Right now to sort the customer recovery.

Next on the list is to install Amon-RA Recovery 1.7 (RA-sapphire-v1.7.0) found here

How I tried a number of methods to get this done, it would not work via fastboot. However I found that it did work when I installed RomManager from Market and installed the Recovery manager from that. The trick being to use the first option listed and NOT the HTC Magic.

Thereafter I was able to boot into recovery via RomManager and install the updated Market from zip file. with result in an immediate for close after reboot :/

Interesting the next boot to recovery was to the stock recovery, which I suspect is due to the following failsafe mentioned here.

The Vodafone release includes a script that checks for a valid image in the recovery partition and replaces it if it no longer matches the known version. This script is in /etc/install-recovery.sh and this is called from the Android init process. It updates the recovery partition by patching a copy of the boot partition using the binary patch file in /system/recovery-from-boot.p.

First we need to rename /etc/install-recovery.sh

via ADB

adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd etc
# cp install-recovery.sh install-recovery.sh.old
# ls

you should now see both files, if so then delete the script

# rm install-recovery.sh

you show see only the install-recovery.sh.old file listed

now to rename /system/recovery-from-boot.p

adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cp recovery-from-boot.p recovery-from-boot.p.old
# ls

you should now see both files, if so then delete the script

# rm recovery-from-boot.p

you show see only the recovery-from-boot.p.old file listed.

Now that should stop the recovery from being over written.

Next if to install a recovery. I found the best way to do this was to install RomManager from the market. This allow us to flash their recovery and boot to it. The custom recovery is needed before we can flash Amon-RA Recovery via ADB.

You need to allow RomManager SuperUser permissions the first time you run it.

Now the trick with the RomManager Recovery is to NOT choose the HTC Magic (GSM) install but to rather install the Ion/Mytouch 3G (GSM). The HTC Magic one fails and will cause a standard reboot when trying to boot to recovery.

I downloaded and copied the recovery-RA-sapphire-v1.7.0G-cyan.img (the cynogen version of the recovery) to the root of the SD card.

Then use RomManager to boot to the newly installed recovery (The second option on the RomManager menu) or reboot the phone while holding down Home and the Power button.

Connect via USB and fire up ADB.

adb shell
# mount -a
# flash_image recovery /sdcard/recovery-RA-sapphire-v1.7.0G-cyan.img

this should take a few seconds. Reboot and go back into recovery, you should not have proper recovery install and you can now perform full system back/restore recovery and a whole lot more!!!

Good Luck!

If you found this post useful please support me by clicking on an advert

No comments: