Pages

Monday 22 June 2009

Mobile email and which way do you go?

I am looking at the alternatives to running an enterprise BlackBerry server for about 15 staff. A relatively small group when I think about it and wonder how others deal with "enterprise" mobile email solutions. It is important that the mobile email solution is reliable and easy to use, but I would like to move forward and *open* the communications platform.
By open I mean that the solution needs to be able to lend itself to mulitple client scenarios. Staff need the same access on the desktop in the office, mobile device when in transit/meetings and just generally on the Internet with access to a web browser (mothers, brothers, sisters houses) when needed and available. Using an open standards and open source solution would be a real benefit and bonus as well!
So to this end it would be great if you could provide a quick pick answer to this question via this poll

Friday 12 June 2009

Australian Optus HTC Dream update to Cupcake

This is my account of how I got the official US version as released via OTA updates to T-Moble HTC Dream handsets installed on my Optus HTC Dream. Most of the credit goes to the XDA Developer site and I will reference those pages below. ( The XDA developer site is currently down for me??, so I will update those when I can get access again)

I performed all of this process from a Linux system. If you do not have a Linux machine to do this from then I have seen many people do the same thing from Windows and Mac machines, but my instructions will be farily Linux specific. You can download and use almost any of the modern Linux distros in live preview mode to perform the same steps and use the same commands that I have here.

The whole process takes about 20 mins if you just run straight through ;-)

Disclaimer : I take no responsibility for any damage you may inflict on your device or anything else in close proximity while performing the update.

There are a few files you will need on hand before you get started. I have made the ones I used available here, using the file names I used on the process. There are links to the originals as well if you feel safer getting them from there.
OK then, in brief here are the steps I performed to get Cupcake installed
  • Back up all the files on the SD card - cause you may want to keep some of your music and photos etc. for later restore, I know I did!
  • Format the SD as a FAT32 filesystem - this will erase everything on it!
  • Find the CID number from the SD card
  • Reverse and zero  this CID 
  • Visit the goldcard website and submite the altered CID - you will receive an email with the image file attached
  • Write the image file to the boot sector of the SD card
  • Copy the RC29 image to the root of the SD card
  • Power off the phone
  • Power on pressing the Camera and Power buttons together
  • Press home to continue with the update
  • Once installed and rebooted, copy the US Cupcake image to the root of the SD card
  • Power off the phone
  • Power on pressing the Home and Power buttons together
  • Slide open the keyboard and press the ALT + L to view the logging process
  • Press the ALT + S to start the update.
  • Two reboots later you will be presented with your new Cupcake'ed HTC Dream
  • Enjoy!
Now to the detail....
1. Connection and backup
Plug the phone into your PC. Mount the device and just copy all the files from the SD into a directory on your PC. The first ROM update will erase all your installed applications from the phone (you have been warned - this is the first warning) and the next step involves formatting (erasing) all content from the SD card - hence this backup.

2. Formatting the SD card
This is the second warning - THIS STEP WILL ERASE ALL CONTENT ON YOUR SD CARD!!!!
On my system the SD card was mounted at the /dev/sdb1 mount point. Your mount point may differ. You can use the "mount" command to find out the correct mount point for this step.
mount | grep -i vfat
/dev/sdb1 on /media/C1B4-7B87 type vfat (rw,nosuid,nodev,uhelper=devkit,uid=603,gid=603,shortname=lower,dmask=0077,utf8=1,flush)

This will show you all mounted filesystems of type "vfat". You may have more than one on your system, but it should be listed as mount "on /media/Cxxx-xxxx" or something similar.
You will need to unmount this drive, but not disconnect the device. To ensure that when you unmount the device but leave it accessible by the operating system it is best done from the command line

sudo umount /dev/sdb1

You should now still be able to access the device to be able to change the format of the partition and format the device.
sudo fdisk /dev/sdb
p  (this prints the existing partition table)
t   (this selects the change partition id command)
b  (this sets the only and therefore selected partition to type VFAT32)
w  (this writes out the changes to the partition table and exits the program)

This will change the system id of the only partition on the SD card. Now you will need to format this partition as a FAT32 filesystem
sudo mkfs.vfat -F /dev/sdb1

Now as a test, unplug the phone USB cable and re-attach. You should be presented with a freshly formatted external drive. There may already be some files on the drive, but they will be as a result of installed applications which automatically create these as needed.

3. Finding and submitting the CID number
You will need a terminal emulator to get this information. The basic, free and easy to use terminal emulator I used was "Terminal Emulator" from "helloandroid.com". You may use any that you wish, they all function essentially the same and prove fine for the following use. You are after a 32 character string, which needs to be reversed and have the final reversed versions first 2 characters replaced with zeros. Here is an example:
03534453553031458331aca6f70091a6 -> when reversed becomes....
a69100f7a6ac31834531305553445303 -> take each 2digits as a pair and copy them all over in reverse
009100f7a6ac31834531305553445303 -> just alter the first 2 digits to zero

To obtain your own CID from the SD card in your G1 you will need to start up the Terminal app and 1st find the directory containing the file. This is slightly different for each of us. So execute the following commands to find and export yours.
cd /sys/class/mmc_host/
ls -> this will show a directory listing and there will be a directory labelled mmc1:xxxx
cd mmc1:xxxx -> as listed in the above command output
cat cid > /sdcard/mycid.txt -> outputs the CID to the root of your SD card.

Now you will need to submit the reversed and zeroed content of the this file (as demonstrated above) to the GoldImage creation website. Save the attached file which is sent to you from this submission.

4. Writing the images to the SD card
Copy the first image to the root of the SD card. I used the US RC29 image for this step. My guess is that you can also use the EU RC7 image, but as I was aiming towards having the US CRB43 as the final I went with the US here. You can download the file I used from my web site here, or the original where I downloaded it from here.
Once you have this file extract the contents to the root of the SD card. Leaving the name unchanged. The name I had was "DREAIMG.nbh".
Now comes the more difficult part. You will again need to unmount the SD connected drive, but leave the device accessible and write out the goldimage file which you have saved to your PC and called "goldimage.cid" (in my instance). So in line with the above instructions, open a terminal on your PC and enter the following commands:
umount /dev/sdb1 -> remember that your mount point may be listed differently
dd -if=~/download/goldcardimage.cd -of=/dev/sdb -> writes the file attached to the goldimage email to the boot sector of your G1

Now you can disconnect the G1 from the PC and are ready to perform the first ROM flash and changes!

5. Flashing and update - phase 1

FINAL WARNING - This will erase all applications (which you can re-install from the Android Market place) and all other phone settings.
Now you can power off the phone. To start the phone hold down together the Camera button and Power button to boot the phone. After a few seconds you should be presented with a screen saying something like "Press home key to update phone" (not sure on the wording, but.....)

You will need to wait while the phone updates and and reboots. You will then be looking at an early release of Android.

To log into your flashed device you will need to add an APN to the phone. For Optus I used the following (only changed settings are listed):
APN : yesInternet
Username : *
Password : *
MCC : 505
MNC : 02
APN type : default

6. Installing Cupcake
You will need to get the latest Cupcake build from the official site here or I have the one used located here from my site.

Once your phone is back up and running. Connect the USB cable and mount the SD card to your PC again. This time you need to copy over the latest version of the Cupcake ROM to the root of the SD card. Really importantly you need to ensure that the file name is correct. It needs to be listed as "update.zip". Here is the command I executed to ensure that I got this right.
cp ~/Download/android/signed-kila-ota-148830.de6a94ca.zip /media/C1B4-7B87/update.zip

Once that is complete, unmount the device from your PC and you are ready for the final install step.

Power off the phone and this time boot by holding down the Home + Power keys. You should boot to a screen with an exclamation mark in a triangle over a ROM. Open the keyboard and press ALT+L to enter the log view mode. Then (following the onscreen instructions) press the ALT+S to run the update.

When this completes, there will be 2 reboots to flash the firmware for radio and system and you will be up and running with Cupcake, as released OTA by T-Mobile in the US.

I am really looking into flashing my phone with a JF release and will apparently need to "root" the device to do this, so stay tuned for a possible further update.

Let me know if you have success or otherwise and of course if there are any bleeding errors in this post.