HOWTO: Install JellyBean on Sony Xperia U (Unlocked Bootloader)

Despite the fact that I use technology a lot, I’m actually one of those people who doesn’t like Cell Phones.  I use them as little as possible.  In fact, I have written articles summarizing the heath hazards in current scientific literature, which I will post here some day, and used to actively discourage my friends from using them.

So it’s probably a surprise to many friends that I’m using a cell phone… on top of that, a smart phone!

Why I got it is a long story.  In short, I found myself, in quick succession, almost lost in three cities in various parts of the world, without an address where I was supposed to go, and without access to my email, maps, or friends.  Everything worked out, of course, but I saw the benefit of having a small computer in your pocket.

Well, perhaps I should say that I found a plausible excuse to compromise my scruples and invest in the latest of gadgetry…  that’s not the whole truth, but to be honest, it is a part.  I held out as long as I could, but once I saw the benefits, I took the plunge, and bought a Sony Xperia U.

Why the Xperia U?  To be honest, the main attraction was the nice colored LED bar.  It also had a convenient size that was not too far from a “normal” cell phone size, had some good features, and had a discount.

The Xperia U, when I bought it, was running Gingerbread.  As soon as I could, I changed to a custom Ice Cream Sandwich ROM, called XPerience v2, without unlocking the boot loader.  It did me quite well, but for some reason (maybe it was the huge amount of apps that I installed) it got very slow, and very buggy, till last week, I had no alternative, I had to change something.  It took 5 minutes to boot, and I often missed calls because the display wouldn’t wake up in time.

Now the question was: do I unlock the bootloader or not?  Previously, I had not unlocked it because I didn’t want to void the warranty, and also I wanted to have access to some of the Xclusive Xperia wares, such as that app that identifies the song.  Well, now after more than a year with the thing, the warranty is void anyhow, and I have never once used that app.  So I decided to bite the bullet and unlock the bootloader.

This decision was aided somewhat by the fact that even after 3 hours, I couldn’t re-install ClockWorkMod on the locked bootloader!  I had managed before, but this time there was some strange version mis-match between the Android Debugger on my phone, and the one on the computer.

So here, in this blog post, I am providing a step-by-step guide to reset your phone to factory defaults, unlock the bootloader, install CWM, and finally install the ROM of your choice.  There are a number of ways to do this; the path outlined here is not necessarily the easiest, nor the quickest, but it worked for me.

The fact is, there’s a lot of How-to guides out there, so this How-to is basically going to say “Click, Follow Instructions”.

Step 1: Get Ready

You need:

  1. Your Xperia U ST25i (that’s what I had)
  2. A working computer with Windows XP or 7 (yes, I did this on Windows.  You can try on Linux, it might work, I have no idea!).  I don’t recommend using WIndows ME, Vista, or other such variant, as they are more than full of bugs, and something might go wrong.  Something might go wrong anyway!  You have been warned…
  3. The USB cable to connect your phone to your computer.
  4. A good internet connection (preferably, other than your phone).
  5. A bunch of software tools.
  6. Patience, and the willingness to sacrifice your phone to the Gods of Chance.

Backup your stuff and prepare a blank slate:

  1. Boot Windows, connect the phone to the computer, turn on and unlock the phone, and wait till the dust settles, drivers install, etc.
  2. If you haven’t already, install PC Companion so that you can browse the files on your device.
  3. Copy everything from your phone to a backup folder on your computer.
  4. Do a factory reset on your phone by following these instructions. Come back when you’re done!
  5. When it’s booted up again, go through the little intro, don’t bother connecting to your Google account, and enable USB Debugging in Settings > Developer options.

Download some tools:

  1. The Xperia FlashTool.  Install it by running that file (don’t worry, it doesn’t have a virus that I’m aware of).
  2. Install the drivers, by going to the folder where FlashTool was installed (C:>Flashtool/drivers) and run the driver installer.  Select the driver for Xperia U, and the two drivers at the bottom of the list, and install them.
  3. And that’s the only tool you really need.

Download the software for your phone:

This one is a little tricky: there’s no central repository for hosting these files, so you usually have to go through a number of links, flashy advertisements, etc, clicking on the wrong download buttons, etc.  But it can be done!

  1. Download the .54 version of firmware for the Xperia U, by following the links on this page.  The one you want is called ST25i_6.1.1.B.1.54 GENERIC – user_Sony
  2. Download the Memory Tweak kernel from this page.  That is what I used, but you may want to Download the CWM kernel for the Xperia U, from one this page instead.
  3. Download the ROM of your choice from the lists at this page.  (I used CM10, but might switch to Paranoid Android).

Some things you need to know:

  1. With the phone off, hold the volume down button and plug into the computer.  The LED bar will light up green, and the phone is now in FlashTool mode.  This is used to flash the firmware from .ftf files.
  2. With the phone off, hold the volume UP button and plug into computer.  The LED bar will light up blue, and the phone is now in FastBoot mode.  This is used to flash kernels from .img, .sis, and .something else files.
  3. With the phone off, turn it on.  Once you see the Sony logo, press the volume down button quickly and repeatedly.  The Indicator LED will flash different colors, and the phone will boot into Recovery mode, once you’ve gotten CWM installed.
  4. If you brick your phone (it’s not working anymore), put it in Flashtool mode and re-flash the stock firmware (the first thing that you downloaded above).  In the worst case scenario, I had to remove the battery, let it sit for a while, and then it went into fastboot mode.  Usually, you can always recover the phone this way.
  5. By now, the phone’s battery should be fully charged.
Step 2: Complete Stock Reset

Next we will reset our Xperia U to completely stock configuration: Sony software, nothing more.

  1. Disconnect the phone from computer, say goodbye to its current OS, and shut it down.

Run FlashTool.

  1. Click the flash (thunderbolt icon) button in FlashTool, choose FlashTool mode, and click OK.
  2. Click on the “…” button, and browse to the folder where you downloaded the Stock .54 firmware, and click Open.
  3. The ROM will show up in the available ROMs list.  Choose the right one, and click “Flash”.
  4. Follow the directions.  Instead of using the back button, use the volume down button, to put the phone in FlashTool mode.
  5. When it finishes, it will tell you to unplug the phone and start it up.
  6. Start up the phone, it will boot very slowly.  The first boot is always slow.  After it’s booted, it will show the setup wizard, and then the LED will start to flash and it will show you the Factory Setup Screen.  Click Power Off.
  7. It will shut down eventually.  Turn it on again.  It’s much faster this time!When it’s booted up again, go through the little intro, don’t bother connecting to your Google account, and enable USB Debugging in Settings > Developer options.
  8. Now you have a practically brand new phone!
Step 3: Unlock Bootloader

Here you can bite the bullet, and unlock the bootloader.  Or, you can branch out and find how to root your phone without unlocking the bootloader (yes it is possible!).  If you go that way, skip this and the next step, root and install CWM on your own before going to the final step.

  1. FlashTool should still be open on your computer.  If not, open it!
  2. With your phone on and debug mode enabled, plug it into the computer.
  3. In FlashTool, click the BLU button (BootLoader Unlock), and follow instructions.  It’s a little complicated, you have to get an unlock code from Sony, but it’s an easy process.
  4. Continue to follow the instructions in FlashTool.
  5. Finally, it will tell you to unplug and start your phone.
  6. Turn on the phone, wait patiently, turn off at the factory setup screen, turn on again, go through the wizard.
  7. Now you have a practically brand new UNLOCKED phone!
Step 4: Root and Install CWM
  1. Unzip the Memory Tool file to a folder in your computer.
  2. Rename the “ftr” file to “Memory_Tweak.img”.
  3. FlashTool should still be open on your computer.  If not, open it!
  4. Turn off phone, and boot it into FastBoot mode.
  5. Click the Flash Icon, choose FastBoot mode, click OK.
  6. Click “Select Kernel to Flash”, find “Memory_Tweak.img” and click OK.
  7. Close that dialog.  Behind it, the memory tweak kernel has been flashed.
  8. Follow instructions, if any.
  9. Unplug the phone, and turn it on.  As soon as you see the Sony logo, press the volume down button quickly and repeatedly.
  10. It should boot into CWM (Recovery).  You can use the power button to enter, volume up/down for moving up and down, and the camera button for back.  Power off for now.
Step 5: Install the ROM of your Choosing

You are now free!  You can install ANY ROM you want, through CWM, which is the preferred way to install ROMs.

If you chose above not to unlock the bootloader, then you are not so free: you can only install ROMS that are marked as OK for locked bootloaders.  If by mistake you flash the wrong ROM, just repeat this tutorial.

  1. Turn on the phone, go to the OS, enable USB Debug mode (if it somehow got disabled).
  2. Plug the phone into your computer, and go browse the device.
  3. Copy the ROM’s zip file that you have downloaded to the internal storage.
  4. When it’s finished copying, shut down the phone.
  5. Follow the instructions from where you found your ROM.  This is usually to boot into recovery, run some cleaning scripts, and then flash the ROM.  It’s pretty self-explanatory.
  6. When it’s done, power off and boot into your new ROM!  (Remember that the first boot usually takes a long time).
  7. Congratulations!

One Response to HOWTO: Install JellyBean on Sony Xperia U (Unlocked Bootloader)

  1. Reading it again… I see I was really tired when I wrote it. Ah well… such is life!
    Note to self: As quantity of literary output increases, quality is bound to suffer, especially when I proofread at 1 AM!