You are here

Upgrading Sony's Xperia Ray from Android 2.3.4 (Gingerbread) to Cyanogenmod 10 (Jellybean 4.1) via Linux

Submitted by Druss on Sun, 2014-12-14 13:29

So I wanted to upgrade my Sony Xperia Ray from its now old (and official) Gingerbread version of Android to the relatively more modern Jellybean. The most reliable alternative out there is Cyanogenmod.

While the Cyanogenmod wiki was generally useful, here's what I think is a cleaner guide. I performed the upgrade via a Kubuntu Trusty (14.04) laptop.

N.B. Cyanogenmod only provides a Jellybean 4.1 upgrade for the Ray via it's 10.0 package. 10.1 and later are all not available for the Ray officially. I've yet to see anything semi-reliable that offers to do better than Jellybean 4.1.

  1. Backup everything; particularly your contacts. Don't trust Google's auto-sync feature. Export your contacts or use an app like this random one. Also, don't store the backups on the phone! Save them to a laptop, import your contacts to Gmail, etc.
  2. Install required packages on lInux:
    sudo apt-get install android-tools-fastboot android-tools-adb
    You will be asked to reboot your system.
  3. Download the latest Cyanogenmod packages for the Sony Xperia Ray (codenamed "Urushi", a type of lacquer apparently). The nightly is an unstable version, but it's from October 2013 and most peeps on various fora reckon that it's fine to use. is, therefore, what I downloaded.
  4. If you want your Android phone sans Google, then don't bother with this step. But you probably do as El GOOG just makes life easier. If so, download the Google Apps package for CM 10. The file I downloaded was
  5. Now, this is important: Make sure that you either perform any of the following steps which involve the LInux terminal as root or use sudo.
  6. The first step in the upgrade process is the unlocking of the bootloader. A couple of years ago, this was something of a complicated process as manufacturers weren't terribly helpful and believed that "openness" was wrong and hurt their brand/bottomline, things have now changed. Unlocking the Xperia Ray is as simple as following this official Sony unlocker guide. Scroll down and choose the Xperia Ray and following the prompt. There is no clean alternative to this process which involves giving Sony your e-mail address, IMEI number, and voiding your warranty. The process ends with Sony giving you a code (something like A1B3374CCC37C731) and telling you how to unlock it (mainly on windows). Just retain the code from the page and use it in the following steps for lInux.
  7. In the phone's settings, look in the Applications menu and Developer options for a USB Debugging option and turn it on.
  8. Now, switch off the phone.
  9. Connect the phone to the laptop's USB port. As you connect the cable to the laptop/phone to finish the connection, press the VOLUME UP button (with a long press) or perhaps trying pressing the UP and Down buttons on the rocker. This pops the phone into what is known as a fastboot mode.

    Note: there will be no indicator on the phone that it has worked as it is currently switched off.

  10. To check if the phone has entered fastboot mode and is accessible via the laptop, enter the following in a terminal:
    sudo fastboot devices

    If the phone is accessible, you will see something like the following:

    $ sudo fastboot devices
    BX711V3JXX&ZLP  fastboot

    If you don't see this, then disconnect the cable and repeat the previous step until this works. Another alternative command I've seen in guides to test connectivity is the following:

    $ sudo fastboot getvar version
    version: 0.3
    finished. total time: 0.000s
  11. Once connectivity has been established, unlock the bootloader. There is no going back after this in terms of your warranty!
    sudo fastboot -i 0x0fce oem unlock 0xSONYKEY
    where SONYKEY represents the unlock key that Sony gave you. This would make the command look something like:
    sudo fastboot -i 0x0fce oem unlock 0xA1B3374CCC37C731

    I don't remember the exact output, but the tool performed a few steps and then said "Done!" which was very satisfying!

  12. Now that Sony has unlocked the phone for us, we can now install a cusom boot image. Unzip the Cyanogenmod ZIP file ( that you downloaded earlier and look for a file within named boot.img. We need to transfer this to the phone as its new bootloader. To do this type:
    fastboot flash boot boot.img
    I don't remember what message this results in, but there's a confirmation of success, IIRC.

    Now, type sudo fastboot reboot to boot the phone.

  13. it's time to install Cyanogenmod! As the phone starts up, immediately start pressing the buttons on the volume rocker repeatedly until you see a bright blue menu (the ClockworkMod recovery menu) on the screen. This menu can be navigated using the volume rocker buttons for UP and DOWN and the HOME/Power button to SELECT an option.
  14. First select the backup and restore menu (and the backup option within) to backup the current install just in case the shit hitteth the fan.
  15. Press the phone's BACK button to go back to the main menu and choose wipe data/factory reset and select Yes after much button pressing.
  16. Back on the main menu, choose install zip from sideload which will give you the folllowing message:
    Sideload started
    Now send the package you want to apply to the device with "adb sideload <filename>" ...
  17. To send the package, we will need to go back to the Linux terminal to type (remember the sudo/root warning):
    $ sudo adb sideload

    which will result in:
    sending: 'sideload'  100%

    On the phone's screen, you will see something like:

    Finding update package...
    Opening update package...
    Installing update...

    And that's it. There's NO confirmation that the installation has succeeding or even completed. However, if you are able to navigate the blue menu above using the volume buttons, then the installation is over. I waited an extra while just to be sure! Not terribly user-friendly!

  18. If you're interested in installing the Google apps package you downloaded earlier, you can do it now. I however performed this step (by returning to after I got CM working. $ sudo adb sideload
    This install does give you an "Installation completed" message :|

  19. And that's it really. Now select the reboot system now option in the blue menu and if you wait for a while, you will see the wonderful cyanogenmod animated logo booting into your new OS!

I must say though that the "Free Xperia" logo is ridiculously fugly :/

I hope that this has helped somebody out there :) Please leave a note if I've made any errors.


Hello, i'm an Xperia Ray owner.
I've ever root my phone but it seems not perfect.. n i still really curious how to maximize my Xperia ray without broke it..
found your post and wonder is there a way if my laptop using win 10.

thank you

It should actually be a little easier to install Clockworkmod on Windows. Google tells me that a guide like this one should do it. However, please note that Cyanogenmod is no longer supported. Its successor, LineageOS, does not support Xperia Ray (Urushi) afaict.

I still occasionally use my Ray. It's reasonably stable although limited by space and memory.