To Android Hell and back

September 1, 2010 – 10:22 am

I rooted my HTC Desire over three months ago using the great guide on android.modaco.com. Happily rooted for a month or so, I then took advantage of Paul’s r5 release of a Froyo Rom (now archived) which I installed with ROM Manager. It worked perfectly well and I was blown away by the massive performance boost Froyo delivers.

So, being the inquisitive type, why wouldn’t I try r8 of the same ROM? I used ROM Manager to make a backup and install the ROM, but upon rebooting, something went wrong. I got a new Android splash screen, but it just kept on splashing, with no actual Android goodness at the end!

eep! Lucky I made a backup!

So my phone was borked, but I didn’t panic (yet) and got on to fixing it.

In the end, I’m still not sure what happened, but here’s my solution:

  1. I eventually got the system to boot by choosing “Wipe cache partition” from Recovery mode only to find that the SD Card and USB had been disabled! This is where I panicked as that means no adb, no shell, no nothing!
  2. My first step was to do as I usually do when something goes wrong and go back to step 1 and start again. This involved attempting to use the recovery script that came with my original rooting pack. This was a mistake and complete waste of time as my phone was already rooted.
  3. I fixed the lack of SD Card by following some of the steps in this post:
    1. Enter fast boot mode with the USB cable attached.
    2. Type fastboot oem enableqxdm 0 at the command line (I used fastboot-mac from the guide linked at the top of this post)
  4. I fixed the lack of USB connectivity by following the steps in this post.
  5. I then made the mistake of restoring an old version of  Android (1.21). I put this down to a little bit of panic and having to multitask on other equally engaging tasks (i.e. work). Android 1.21 was great at crashing. I couldn’t even load the market place to install ROM Manager to restore my previous backup.
  6. I eventually managed to restore my backup by using the recovery-update.zip file which is automatically packaged up with your ROM Manager backups by renaming it to update.zip and placing it at the root of my SD Card. I then performed the usual restore update.zip method in recovery mode.
    1. Loading this update.zip loads Clockworkmod, the brains behind ROM Manager. From here I was able to restore my backup.

Now, if only that burning desire to try again would go away…

Like this? Please share!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Twitter

5 hints on holding an old school LAN

July 26, 2010 – 8:51 pm

Old school LANs are a great way to keep in touch with friends, as like – in the same room – not on Facebook, whilst reliving some of the greatest games ever made such as Red Alert 2, Duke Nukem 3D and Carmageddon.

Here’s 5 hints to help you get your LAN up and running and making the most of it.

  1. Anonymous file server and DHCP
    99.9% of time spent at a LAN, especially one where you play old games not designed to run on modern operating systems, is stuffing around trying to get them to work. It is absolutely imperative that you have a dedicated anonymous file server upon which people can share the files required to run the games. This will eliminate unnecessary ”sharing” setup time. It will also prevent file server downtime as it will not need to be rebooted unlike client computers busy installing games.
    Another thing to make it easier is to have a local DNS server. I have a Mac Mini server which comes bundled with Mac OSX Server. Even a novice home networker can setup a local domain. Coupling this with a DHCP server setup with a default search domain means your guests can enter something like
    \\servername into their windows explorer or smb:\\servername in OSX to connect. No IP addresses!

  2. Sustenance
    Gamers at LANs have highly very active brains and therefore need a high carb, high protein meal to allow them extreme accuracy with the Rail Gun. Contrary to modern belief, Pizza and Coke do NOT constitute any of these very important ingredients.
    If you’ve organised a LAN in the past you’ll know that as soon as it starts and you have your first coke / Jolt cola (or bourbon and coke if you’re so inclined) that everything goes CRAZY. As a part of the LAN setup process, construct, in a large pot, a large stew using gravy beef and vegetables. Put this in a slow cooker up to 10 hours ahead of dinner time and walk away. When the hunger calls simply dish up with some rice (can also be pre-prepared). This will keep your gamers alert and happy until the wee hours of the morning. Most importantly, it’s bloody cheap, ready when you want it and doesn’t involve picking up the phone!


  3. Research
    The older a game gets the harder it is to run.
    Make sure you’re up to speed with DosBox (Boxer on Mac) and it’s ability to host IPX Tunnelling (IPX over TCP/IP).
    Experiment with the games you intend on playing ahead of time on your own. It took me a week of stuffing around to get Carmageddon running with 3DFX using a special version of DosBox with Glide support.

  4. Power
    I’m sure you all know this, but ensure you spread your power load evenly across your wall sockets. Don’t go crazy with power boards hanging off power boards. Make sure extension cords are straight and not coiled when in use.

  5. Do what you came to do. Have fun!
    Personally, when I go to a LAN, I get so excited and busy trying to fix all of the problems that all of my plans go out the window. It’s best to keep a list somewhere handy, say as your desktop background, which lists the games you want to play or things you want to do or share.
    So many times it’s 10 hours in and everyone’s thinking about going home that you remember you wanted to play Total Annihilation (a notoriously long game). So annoying!

Like this? Please share!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Twitter

Two months with Swype

July 15, 2010 – 10:30 am

I’m writing this review on my Android powered HTC Desire using a new, custom keyboard called Swype.

Swype allows you to type whilst barely lifting your finger from the screen. As the name suggests, you swype your finger from letter to letter instead of tapping. This constructs a sort of letter trail which, once you lift your finger is inspected and the top ranking word from the letters you swyped is inserted. If there is more than one match, it will offer up a list of suggested words.
Other ham-fisted, clumsy typers like me will be happy to know that the trail by no means has to pass directly over each letter. Rather, as long as the trail is roughly near a letter it will be added to the mix, albeit with less priority (I think). When you experience this for the first time you realise that there’s a lot more going on behind the scenes than you might first think.

The experience of swyping is not second nature to anyone and there is a period of time where you find yourself wanting to revert to the default keyboard. However, for the persistent and forgiving, the reward with sticking with it will deliver a faster typing speed. How much faster? Fast enough to win a place in the Guiness Book of Records for the fastest text message typed, that’s how fast!

Speed, though, goes hand in hand with inaccuracy. At times I’ve found myself swyping in the wrong direction or blindly selecting the top most (and also wrong) suggestion, which is done automatically when you start swyping the next word.

So despite Swype being a totally different experience to a conventional on screen keyboard it’s easily withstood the hardest test of all. Not being noticed.

I’ve had Swype as my keyboard for over two months now and haven’t even thought of turning it off.

The beta has closed, but judging by the total lack of crashes I’ve experienced, the full version should be out shortly.

Like this? Please share!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Twitter

The HTC Desire

May 29, 2010 – 11:28 pm

It took over at least two years, but I finally got a smart phone. An HTC Desire.

The iPhone, whilst appealing, never really seemed to end up in my possession for one reason or another. Adopting early or following the masses has never been my way. In fact, I’ll happily go the other way, with all of it’s bumps and bruises, just to show it can be done.

The HTC Desire is a fantastic phone. It’s smooth to touch and, being powered by a 1ghz snapdragon processor running Android, is also very smooth to interact with. The UI (powered by HTC’s Sense) flows from one state to the next. Nothing catches you by surprise.

Comparison to iPhone
I’m no seasoned iPhone user, however we do have one in the family which I am more than guilty of pinching for my own benefit quite a bit. The HTC Desire is in some ways a better experience.

First and foremost is that Android works on a different level to iPhone OS. Android supports multi-tasking out of the box, whereas iPhone OS will not offer this until version 4.0 is release later this year. Android phones, by design, also have 4 more hardware buttons than the iPhone’s 1. I can hear simplicity purists out there shifting in their seats as they read this, but it actually makes the phone more versatile.

Apple use a software review process to ensure that all of the guidelines (including ui guidelines) are adhered to. Google, through the use of physical buttons, have designed a contract with the developer that cannot be broken. Let me explain (from left-most button to the right-).

The home button
As on the iPhone, the home button will snap you straight back to your home screen no matter what you’re currently doing. It also doubles as a “open processes” button when held down allowing you to swap between applications which are open in the background.

The menu button
The menu button opens a contextual menu offering more options for the current application or screen.

The scrolly thing
The scrolly thing, which is also the “click” button, is an optical mouse turned up-side-down. It functions in the same way a track-ball does, albeit with no moving parts. It’s another part of this phone which feels smooth to touch.

The back button
The back button is easily the best and most used button. I love this button as much as it is legal to love a button as it releases the full power of the multi-tasking ability of the phone.
Say I am reading my twitter feed and someone has posted a link which I want to follow. In the Apple world hitting this link would either a) close the current application and open Safari or b) open an instance of safari within the current application displaying the page (which is simply more work for the developer). From a legal standpoint it can also allow people to view websites in your application that you don’t want associated with it.
In instance a the user, once they have finished reading the contents of the webpage, cannot get back to the Twitter stream without first closing Safari and re-opening the Twitter application.

However, on the Desire a simple click of the back button will instantly take you back to the Twitter stream. This is something the iPhone can never do due to it’s lack of a back button.

The back button also closes open dialogues or modal windows and takes you back when browsing websites.

The search button
Being a Google connected device, search is obviously quite prevalent in the design of this operating system. That said, I don’t actually use it that much.
The search button will open a search dialogue which pertains to the current application (if the application supports it or the whole phone if done if otherwise). If done from the web browser, the search context is obviously the web, if done from the calendar, the calendar will be searched.

The Internet
The web browser named simply “Internet” is an intuitive web-kit based app. It has a number of positives over Apple’s Mobile Safari.

  1. Zooming.
    When zooming, for example, into the text of an article the enlarged text is reformatted to fit to the width of the phone. This prevents the need for excessive side-ways scrolling as is required on the iPhone.
    This saves your eyes and fingers from excessive wear.
  2. Flash.
    Nuf said.

Freedom
When using an Android powered phone like the HTC Sense you can do this amazing thing called “choosing for one’s self”. That is, you are not locked into anything. For example, a simple download from the Market (app store equivalent) will give you a totally different keyboard implementation. Hell, you don’t even have to distribute your apps through the Market.

Down sides
There is only one bug that I’ve suffered from with the Android operating system. There’s a known bug with switching from Wifi to 3G. For some reason sometimes the 3G just doesn’t initialise again. The solution is to turn the phone onto Airplane mode and off again.

Conclusion
This phone has changed my life. I’m very happy with it even if it does give me an excuse to play pointless tower defence games on the bus.

Like this? Please share!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Twitter

Using JacksonJson @JsonSerialiser annotation for a single property

March 31, 2010 – 8:40 am

When using Spring MVC and the Jackson JSON processor recently, I needed to only expose one property from a referenced object when serialising.

Rather than have a new object defined with the single property, I used the @JsonSerialiser annotation to serialise only the property I was interested in.

I will use a ‘PublicFile’ Object as an example.

public class PublicFile {
  private String path;
 
  public String getPath() {
    return path;
  }
 
  public void setPath(String path) {
    this.path = path;
  }
}

If we were to serialise the an instance of this PublicFile Object using the Jackson Json processor, the result would be:

{
    "publicfile": {
        "path": "file path value"
    }
}

To return only the path property when serialising the instance to JSON, create a serialiser like:

public class PublicFilePathJsonSerialiser extends JsonSerializer<PublicFile> {
	@Override
	public void serialize(PublicFile file, JsonGenerator jgen,
			SerializerProvider provider) throws IOException,
			JsonProcessingException {
		jgen.writeString(file.getPath());
	}
}

And then reference it in your class:

@JsonSerialize(using = PublicFilePathJsonSerialiser.class)
public class PublicFile {
  private String path;
 
  public String getPath() {
    return path;
  }
 
  public void setPath(String path) {
    this.path = path;
  }
}

This produces:

{
    "publicfile": "file path value"
}

Like this? Please share!

  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • Twitter