Thursday, 12 May 2011

Android on HTC TyTN II

As I mentioned, one of my previous phones is a HTC TyTN II, also known as the HTC Kaiser and as the AT&T Tilt in the US.

It's a great phone with excellent hardware, and still one of the few models with a hardware keyboard, something I'm personally a fan of. Heck, the only thing that's better is the relatively new HTC Desire Z. (And I Want One Of Those.)

Of course, the TyTN II runs Windows Mobile 6.x. However, these days, with the help of the people at XDA Developers, you can fix that!

So, without further ado, here are my notes on how to install Android on a European HTC TyTN II.

A modern smart phone has two kinds of memory: regular RAM like any computer in which applications run, and NAND (aka flash) memory, which remembers its content even when the power is off, like a harddisk without moving parts. Writing something into NAND memory is called 'flashing'.

When your phone starts, it executes something called the IPL. This tiny bit of code initializes memory and then copies the SPL from NAND into RAM and executes that. The SPL finishes initialization, reads and checks the OS image as it copies it into RAM and then starts the OS. The SPL is also the bit that checks for OS updates and flashes those into NAND memory.

If you change the OS to something unsupported like Android, the SPL will complain. The solution to that is to install a new SPL that doesn't require OS images to be cryptographically signed by the hardware manufacturer. This is generally referred to as security unlocking your phone, but is different from a SIM unlock, which enables your phone to be used with any carrier's SIM.

Of course, the manufacturers try to block unsupported SPL updates too, so you need an additional step. First, you run a software SPL which you then use to flash the desired hardware SPL into NAND. Whew, and that's only the first stage.
  1. Make sure your phone has all the latest official updates, both OS and radio. The radio is sort of like the device driver for your phone hardware. For me, that meant Windows Mobile 6.1 and R 1.65.17.56 (You can see that last number briefly on the boot screen.)
  2. Make sure your phone is fully charged.
  3. Get the software SPL, JumpSPL1.56-KAIS.zip, or the version matching your radio version. Get the hardware SPL, Kaiser-HardSPL-3.56.zip.
  4. Copy JumpSPL to your phone, run it there according to the instructions in the first forum post. When you reach step 6, flashing HardSPL, run KaiserCustomRUU.exe from the second forum post on your PC. Be sure to unplug the USB cable when you're done. Congratulations, you've unlocked your phone!
Now you're ready to install a new OS. Android for the TyTN II comes in two parts: a hardware dependent part which functions as boot loader and installer, and the actual OS image. These are installed from your SD card, and I really recommend having a SD card USB plug so you can copy files onto it without needing your phone.

Get the boot loader images, KAISIMG-PANEL1-320.NBH, KAISIMG-PANEL2-320.NBH, KAISIMG-PANEL3-320.NBH. There's three different types of LCD panel that's been used on the TyTN II, and you can't tell which one you have from the outside. For me, it turned out to be panel type 3. The only way you can find out is by just trying them all, and sticking with the one that doesn't produce graphical glitches on your screen.

Pick one to start with, rename it to "KAISimg.nbh", copy it to the root of your SD card.

For your OS image, you have multiple choices. You can get a fully pimped and modded version such as polymod 2.1g. If that's too much, there's OpenEclair v1.2.1. If you merely want to use the phone for testing, a clean stock-Google ROM is a better choice. I decided to grab the latest and greatest from Android HTC, Froyo 07-04-11 06 from the link at the top of that page.

By the way, Eclair is Android 2.1, Froyo is Android 2.2. Both run fine on the TyTN II.

Rename your OS image to "androidinstall.tgz", and copy it to a subdirectory called "andboot".

Right, time to flash Android.
  1. Reboot your phone into update mode. You do this by holding down the camera button while inserting the stylus into the reset hole at the bottom. You'll get a white screen with a progress bar where it will flash KAISimg.nbh into NAND. Once it's done, wait a few seconds, then pull the battery. (This is the step you'll have to repeat with a different panel type KAISimg.nbh if you get graphical glitches once Android is running.)
  2. Reinsert battery and power on normally. Android will boot and you'll see all sorts of diagnostic messages scroll by until you see, "Hold down volume up or d-pad center to start installer". Press and hold the D-pad center button down. It might take a while but eventually you'll enter the setup menu.
  3. In the setup menu, double-check that the NAND option is marked with an asterisk for both system and data, then use the D-pad to navigate down to "install". Press the D-pad center button to start installing.
  4. Installing takes a bit. After a while, you'll see an animated colorful "X" and then eventually you'll end up in Android's initial setup. Run through the initial setup, but don't set up any accounts or other customization. Finally turn off the phone and pull the battery.
  5. Reinsert battery, start phone, and you're done! Congratulations!
With Android, the Windows key on your phone is Menu, the OK key is Back, the IE key is Home. The Mail key doesn't do anything.

For additional information, I recommend Flashing Your First Kaiser ROM and Flashing NAND Is Easy.

Thursday, 3 February 2011

Android Market

Google has finally released a proper web version of the Android Market! Sure took 'em long enough.

And my apps are on there, obviously.

Notepad is my simple little notetaking app. No frills, no ads, and you can import from and export to to SD card. I believe Notepad is as done as it will ever be. I'll do bugfixes if needed, but any more features would take away from the simplicity people seem to like.

FileMan is my simple little file manager. Browse and manage the files on your SD card. I've got one more feature release planned, and if users request a feature I'll certainly consider it, but I think FileMan is also approaching the 'done' state.

TaskMan is the red-headed stepchild, I'm afraid. It was my first Android app, more a proof of concept than anything else. It doesn't do anything the stock 'Manage Applications' doesn't do, and due to the Force Stop functionality being misused, as of Android 2.1, Google decided to make it stop working.

So what else am I working on? I've got a bunch of ideas and prototypes kicking around: An app that stores your notes online so you'll never loose them (but requires an active data connection). An app to list and track your book collection. A simple but fun puzzle game. A terminal application to connect to talkers like MUDs, MUCKs and MOOs.

If you've got any feedback on my current apps, my ideas or even ideas for Android applications of your own, please post 'em here!