Archive for the ‘Mobile Devices’ Category

Flashing your HTC phone in Linux

Sunday, May 24th, 2009

Ever since i’ve been using HTC based phones i’ve found that the stock OS is generally slow. I know it’s running Windows Mobile… but until recently trying to get a nice PDA that runs anything else is difficult.

I do have a windows box that’s lying around for random uses, but its hard disk died recently and i’ve been wanting to flash my phone (a T-Mobile MDA Vario III , aka HTC Kaiser) for a while… Not really wanting to spend time rebuilding the windows box anytime soon I had a look around to see if there was a way of doing this stuff on my Linux boxes. Needless to say I found HTCFlasher.

Much to my surprise I found some ebuilds in the Gentoo bugzilla for it, which saved m having to do any of the real work… A couple of mins later it was installed so I had a poke around. To my surprise it worked very well, below are some notes I put together.

If you’ve never done any of this stuff before I highly recommend reading the XDA Developers Forum post for some useful notes. It’s the basic steps I followed with some slight differences noted below.

Ignore anything in the forum post that mentions ActiveS(t)ync as luckily that doesn’t apply to us. Also, anything that mentions KaiserCustomRUU.exe is what we’re replacing with HTCFlasher.

Flash HardSPL:

Download the correct JumpSPL for your phone onto your phones storage. Execute it and you should end up at the tri colour screen, it should have slightly different text to the text that you would usual tri colour screen that you would see if you turned on your phone whilst holding the camera button down.

Plug the USB cable into your phone and wait a few moments for USB device scanning to take place and then check the dmesg output for the following:

$ dmesg | tail
ipaq 7-1:1.0: PocketPC PDA converter detected
usb 7-1: PocketPC PDA converter now attached to ttyUSB0

If it doesn’t then I found that I needed the usbserial and ipaq kernel modules loaded. Also take a note at this stage as to which ttyUSBX (where X is 0, 1, 2… etc.) as it it’s not ttyUSB0 you need to specify it later.

As a quick test at this stage you should be able to use HTCFlasher to query your device for some basic information. It’s a nice simple test to see if you can actually talk to the phone before you try to do anything more serious with it. You can do this with:

$ HTCFlasher -i
=== HTCflasher v3.1
=== Open source RUU for HTC devices
=== (c) 2007-2008 Pau Oliva Fora
[] Getting device info...
[] CID: SuperCID
[] ModelID: KAIS1300

Now to actually flash the phone with HardSPL

$ HTCFlasher -F /path/to/Kaiser-HardSPL-3.29/Kaiser-HardSPL-3.29.nbh
=== HTCflasher v3.1
=== Open source RUU for HTC devices
=== (c) 2007-2008 Pau Oliva Fora
[] Flash NBH file '/path/to/Kaiser-HardSPL-3.29/Kaiser-HardSPL-3.29.nbh'
[] Setting RUU mode, please wait............done
[] SPL auth result (T=True, F=False): T
100% [###########################################]
Done!

If all went well, your phone should reboot and you probably won’t notice any difference!

I had no current reason to SIM Unlock my phone, so I skipped this step from the forum post and went straight on to…

Download and Flash your Preferred Rom

Again, follow the forum post as with the previous step, still ignoring Activesync and using HTCFlasher instead of KaiserCustomRUU.exe.

The only obvious thing to note as this stage is that when in Windows, you run the KaiserCustomRUU.exe and that seems to signal your phone to reboot etc. As far as I can tell, we don’t have that luxury, so we have to get the phone onto the tri-coloured screen ourselves. Fortunately it’s pretty easy, simply turn your Kaiser off, wait a second or two to ensure it’s really off, press and hold the camera button and then press the power button, after a few seconds the device should turn on and be at the tr-colour screen (you can then let go of the two buttons ;) )

Everything from this point you’ve already done when flashing HardSPL. But instead of flashing the HardSPL.nbh, you flash the .nbh file from your downloaded ROM. It really should be that simple.

Also note that some ROMs require a specific radio version. So if some features of your newly flashed ROM don’t work correctly, you may have to find a matching radio (usually noted in the ROMs forum post or in some sort of README, if it’s not already part of the nbh).

That about wraps up this post. It’s worth noting that there’s a gtk frontend for HTCFlasher and the various other tools and utilities. But it’s no real hardship to flash your phone from the command line.

Perhaps in the future i’ll try to discuss using the Linux Rom Kitchen to build/modify a ROM.