[myTouch 3G, Magic Android Development] darkguy2008:
Well, I've been working with some 32As by flashing Froyo to them and all. So far it's cool, but the process is a bit tiresome... they always come with some Cupcake 1.6 I need to flash over with a 2.2 RUU from Rogers using a goldcard so it fixes the SPL it originally comes with, then flashing ENG SPL (S-OFF) and then flashing SPL+Radio+Recovery (6.35 in my case) prior to installing a ROM.

Now, I've been investigating the RUU wizard a bit and this is what I've found the RUU does:

adb devices
adb devices
adb devices

# Presumably check for battery level before attempting RUU?
adb -s <SERIAL> shell cat /sys/class/power_supply/battery/capacity
adb devices
adb devices

# Gets the build number (to compare against the one in android_info.txt, I assume)
adb -s <SERIAL> shell getprop ro.build.description
adb devices
adb devices
adb -s <SERIAL> shell getprop ro.build.description
adb devices
adb devices

# THIS REBOOTS INTO RUU MODE
adb -s <SERIAL> shell reboot oem-78

adb devices
fastboot devices

# If mode is "RUU"...
fastboot -s <SERIAL> getvar boot-mode

# Flash first ROM.zip (it seems to be a special fastboot hboot image which allows flashing SPL (!))
fastboot -s <SERIAL> erase cache
fastboot -s <SERIAL> flash zip "<path>\rom.zip"
fastboot -s <SERIAL> oem rebootRUU
adb devices
fastboot devices

# Flash the full ROM1.zip
fastboot -s <SERIAL> getvar boot-mode
fastboot -s <SERIAL> flash zip "<path>\rom1.zip"
adb devices
fastboot devices

# All ok? reboot into normal mode
fastboot -s <SERIAL> getvar boot-mode
fastboot -s <SERIAL> reboot
adb kill-server

Taking a look at rom.zip, I can find android_info.txt contains the following files:

android-info.txt
boot_special.img
hboot_7200A_1.76.0008_091103.nb0
radio.img

And rom1.zip:

android-info.txt
boot.img
recovery.img
splash1_HTC_Magic.nb0
system.img
userdata.img

Wherein android-info.txt contains:

MODELID: SAPP10000
CIDNUM: HTC__N34
CIDNUM: HTC__Y13
CIDNUM: HTC__506
CIDNUM: HTC__140
CIDNUM: HTC__139
CIDNUM: ORANGB10
CIDNUM: VODAPC23
CIDNUM: 11111111
MAINVER: 3.05.401.1
hbootpreupdate: 0

Now, I only have theories I'm willing to try once I get a new phone (in case mine bricks while testing, which I don't think it can happen but it's my everyday phone so...), which I need somebody here to be brave enough to test (or at least someome who has a JTAG debrick kit) so maybe, we can find a solution to removing S-ON and maybe even doing everything in one shot using a SAPPIMG.ZIP or something like that.

Here are my theories:

1) Adding CIDNUM: <your phone's CID here, mine isn't on the list ;)> could help the RUU to flash everything correctly, thus removing the need for a goldcard?

2) What about making our own ROM.zip with 6.35.10.19 radio, S-OFF 1.76.2007 HBOOT and ROM1.zip with a custom recovery, and using it instead of the original? even better, without system.img or userdata.img, so you would only need to boot into recovery and flash a ROM?

3) Actually, what if step 2 worked with a ROM already installed? I mean, I wish to know if, when fastboot does the rom1.zip flashing, erases system & data too. It doesn't seem it does, so I think one can put S-OFF without even doing a full RUU procedure?

I think I had more questions related to this, but it's late and this is what comes to mind. What do you guys think? you guys think something can be made out of this? anybody up to check if my theories are right?

Any info you can provide is greatly appreciated! ^^

- DARKGuy