10 Dec 2012

Root the UK Orange/T-Mobile/EE Samsung Galaxy S3 LTE (GT-I9305)

Well, I'm a total Android newbie, having eschewed the little green robot in favour of my fruity 3GS which I've been rocking for 3 years now. But Apple really p1553d me off when they launched iOS6 with crippled maps, and my toleration levels for iTunes crappiness on Windows are at breaking point, AND the new lightning connector means none of my various expensive docks at home and in the car work any more, without a crappy adapter. So basically Apple have gone out of their way to make me try Android out.

My weapon of choice is the new Galaxy S3 LTE - GT-I9305. This international version sports a quad CPU and 2Gb of internal RAM, and Android 4.1 as we got to press, so I went for it over the old GT-I9300 which only has 1Gb RAM and Android 4.0 at this time. The LTE capability was a bonus, and should help resale value, but I don't care about 4G much as I barely get 3G at the best of times. The slinky butter UI on this phone finally convinced me that in terms of display slickness, android is now a match for iOS.

Of course, one of my motivators for breaking free of the iShackles was to be able to root my new phone, stick a custom ROM on it and so become the ULTIMATE GALAXY COMMANDER, whatever that is. Now, the thing I didn't consider when I got this version of the phone is that it's brand spanky new to the android development community, so most of the existing S3 ROMs won't work on it, and many of the tutorials about rooting it seemed GT-I9300 specific. And being a scaredy-cat, I was afraid at each step along this process that I was about to brick my phone / disable the SIM card / explode the modem and basically send me back to the Orange shop with my tail between my legs and 500 quid's worth of broken hardware in my hand.

So if you're like me in that regard, I can at least report that with the following information I rooted my phone without bricking it, and furthermore, all the tools are available that allowed me to test restoring the phone to its stock configuration in case I ever need to send it back. You should note that I'm a Windows user, so this guide isn't much use if you have a mac / linuxbox / oric atmos / whatever.

DISCLAIMER: While the following procedures worked for me, I accept no responsibility for any problems you may encounter. The following advice carries no guarantees.

STEP 1 - Backup to Kies

Kies is Samsung's answer to iTunes for the Galaxy S3, as far as syncing / backing up your phone goes. It's a bit crap to be honest. I was kinda disappointed that it doesn't backup your Apps or App Data. While your Apps are backed up on Google Play automatically, the App Data isn't backed up unless you do it yourself, and for that you need to be rooted.  But your first step along the safe path should be to download Kies and then use the Back Up option to backup everything you want to save to your computer, just in case.

STEP 2 - Install Odin3 on your PC

Odin3 is a fantastic tool that you use on your computer to upload and install special files onto your phone. You will need to have installed Kies to use it with your S3, cos it needs the USB drivers installed. But ensure Kies in not running whenever you use Odin, because they could interfere with each other. Anyway, get Odin here: http://forum.xda-developers.com/showthread.php?t=1738841

STEP 3 - Install ClockWorkMod Recovery on your phone and Root it!

Now, to root my phone I followed a great post on the XDA Developers forum here: http://forum.xda-developers.com/showthread.php?t=1914394 . The gist of it is, you flash (install) the ClockWorkMod (GT-I9305 version) recovery tools onto your phone, and then you flash the SuperSU package to root it.

However, it's worth bearing in mind the following.

  1. As soon as you install CWM Recovery on your phone, it will no longer install OTA (over-the-air) OS updates from your mobile carrier, e.g. when Android 4.2 is finally released for the S3.  So when new ROMs are available you will have to grab the new ROM from somewhere and flash it from Odin instead.
  2. As soon as you install CWM Recovery, it increments the S3's Custom Binary Counter. If you have to send your phone back, the Binary Counter will indicate that you've been tinkering with it. However, there is a solution: ChainFire's TriangleAway App which you can buy on Google Play. And at 2 quid it's a great donation to ChainFire who does a lot of great work for the community, including several of the tools we're using here. I can confirm it works BUT you have to be rooted to use it.
  3. Before you install the root package or start using custom ROMs etc., take a backup of your entire phone and data using CWM's backup feature. Restart the phone and hold VOL UP + POWER + HOME to enter Recovery mode. Choose "backup and restore" and backup to your internal card or external sdcard if you have one. Reboot your phone, hook it up to your computer by USB and simply drag the backup files to your computer. Super useful if you want to restore your stuff later if you go back to the stock firmware.


So here's the thing I was worried about: How to roll the phone back to stock settings from root. For this you'll need a copy of the stock firmware for your phone / country / carrier. I got mine from this amazing site: http://www.sammobile.com/firmware/?page=3&model=GT-I9305&pcode=EVR&os=1&type=1#firmware
and I can confirm that works for a UK Orange S3 LTE.

So, to revert to stock:

  1. Use TriangleAway to reset the Binary Counter.
  2. Put your phone into download mode (restart and hold down VOL DOWN + POWER + HOME)
  3. Use Odin3 to install the stock firmware file you downloaded.

5 Dec 2012

jQuery UI AutoComplete source option - function callback

Just a quick one: if you have a jQuery UI AutoComplete and you want to use the source option to set a function that does a remote lookup, you'll be aware that the function signature is as follows:

function(request, response)

where request is what the user entered, and response is a function reference that accepts an array of results to display.

The prob we had today was that we wanted to call the response function from the success of a $.ajax() call. But it wouldn't work, and it took ages to figure out that this was because the call was in asynchronous mode. Once we set the $.ajax() async option to false, it worked fine.
If I helped you out today, you can buy me a beer below. Cheers!