How to update T-Mobile G1 from 1.1 (factory) to 1.6

Some time ago my Android’s camera stopped working. Today T-Mobile sent me new G1 as temporary phone until my is fixed. But this “new” G1 is really brand new – with original 1.1 firmware. And I can’t wait for OTA as it could take weeks.

You’ll need following files:

For every file repeat following steps (remember to keep file order same as above):

  • copy file to SD card’s root as
  • power off the phone
  • power on the phone while holding Home key
  • when an attention icon is displayed, press Alt+L and then Alt+S
  • wait for update to finish
  • press Home+Back to reboot when instructed to do so
  • wait for the phone to power off (or on, this depend on current firmware version), there might also be an icon with arrow and memory chip displayed for some time, don’t panic!
  • repeat steps above with next file in a row

Don’t be surprised that maintenance screen changes between updates, it starts as simple, key driven screen but after second update it can be also controlled by the trackball.

After applying above mentioned steps to all files you should have latest 1.6 (aka Cupcake) installed on your G1.

How to render Dzongkha (Bhutan) texts in Swing properly

As you might know we’re developing a specialised information system. It’s been widely used in Asia, in fact one of our first international customers was (and still is) located in India. Thanks to this geographical variety we’re facing issues with exotic language/script support quite often. Last time we had an issue with Urdu script, that’s been used in Pakistan. It’s still not supported in mainstream operating systems (first support came with Vista/Office2007), a special commercial software is needed for that, it doesn’t to seem to adhere to Microsoft (or any) standards, it sort of works but there are still issues. The biggest problem with Urdu is it’s height which can really vary depending on what’s written

Yesterday I was asked about Dzongkha support. Dzongkha is the official language of the Kingdom of Bhutan. It’s using Tibetan script for written form. The good news is that there are free fonts available. I installed one of them (Jomolhari) and started experimenting with it. Just to run into complete failure – no part of the system was able to show anything else than “boxes” – at least on Windows I started with. There were only two parts of the system being able to show Dzongkha properly – but only thanks to their ability to change font used for them.

Imagining how complicated/annoying it would be to change all Swing controls to use Jomolhari font (ie. adding configuration, making sure that setFont() is called on every single JComponent, testing it….) made me feel really bad. On top of that latin script rendered by Jomolhari was really ugly (especially in small sizes like 10, 12pts).

I remembered that there was a way how to specify font substitutions in Java fortunately and after couple of minutes I got the right article on Sun’s website.

I started reading the document but even after finishing I was not exactly sure what should be done – there’s a paragraph about substitution, about character subsets but – Tibetan, Dzonghka was not there. Having studied Unicode pages I knew that Tibetan characters are occupying their designated range starting with 0x0F00 yet there didn’t seem to be support for this subset. I tried adding line with:


but it didn’t seem to change anything, boxes again. While getting ready to leave the office I got one last idea – what if China somehow owns Tibetan range? They keep claiming that Tibet belongs to them, so why not the Unicode range too? So I changed line with Chinese subset:


to Jomolhari font


and – voilà, there we go – it worked as a charm. But – what if this disables Chinese, I thought. Quick test revealed that my worries were needless, Kanji characters worked too. And latin as well, rendered in usual quality.

So, what exactly is needed? Just follow steps below:

  1. Install appropriate fonts (ie. Jomolhari)
  2. Locate ($JAVA_HOME/lib)
  3. Rename it to (remove .src suffix)
  4. Replace all occurrences of .chinese-ms950=(P/MingLiU) with .chinese-ms950=Jomolhari
  5. Quit all Java processes and start your Swing application again
  6. Every single Swing component should be capable of displaying Tibetan script properly – if not check if you’re using “logical” fonts and not forcing physical ones (there are five logical fonts, read the Javadoc for Font class)

Having solved problem on Windows I moved to Mac – just to see that on MacOSX Leopard (10.5.6) fonts for Tibetan are installed by default and working in Java out of the box. Good work, Steve.