miercuri, 2 martie 2011

Sony Ericsson Xperia X10 Android upgrade on Linux

Recently I had to upgrade my Sony-Ericsson Xperia X10, which proved in the end to be quite a challenging task. For those of you facing the same kind of problems here is the story of how I did it.

First I've tried to upgrade it over-the-air (WiFi or 3G), but it failed with a message saying something like "not enough memory". Later I've found that actually this feature (upgrade over-the-air) is not yet implemented. So, because of this I had to fall back to the old-fashion-method of upgrading it using the Sony Ericsson PC Companion.

Now, for the average Windows user this should not be a problem, since PC Companion is a windoze application: download the stuff, install it, plug the phone and follow the instructions and that's it.

But for Linux geeks like myself, this can be a little bit of a pain the ... neck, since Sony Ericsson does not provide any kind of support for Linux. Just as a side note, to me this seems ridicule, since you're selling a product which runs on Linux (Android), but you don't offer any Linux support... Yeah, but that's life!

First thing is to forget about the idea of trying to run PC Companion in Wine. It's just not working. At least not for myself.

My approach was to run PC Companion on a Windows XP virtual machine, running on my Linux with the help of Virtualbox, which is a free virtualization platform available on Linux.

So let's get started!



1. VirtualBox

1.1 Getting the stuff
2 options are available:
- install from repositories
- download from http://www.virtualbox.org/wiki/Linux_Downloads the appropriate package for your Linux distribution and proceed to installation

In any case make sure that you get at least version  4.0.4


1.2 VirtualBox Extension Pax
Download VirtualBox 4.0.4 Oracle VM VirtualBox Extension Pack from here: http://www.virtualbox.org/wiki/Downloads
Open VirtualBox and in the main menu go to File -> Preferences -> Extensions and use the Add Package button to load the Extension Pack



1.3 Configure your user
VirtualBox accesses USB devices through special files in the file system. When VirtualBox is installed, these are made available to all users in the vboxusers system group. In order to be able to access USB from guest systems, make sure that you are a member of this group. See detailed info here http://www.virtualbox.org/manual/ch03.html#settings-usb

So add your user to that specific group.

sudo usermod -a vboxusers YOUR_USER_NAME

Logout and login to apply changes


2. Installing Windows.

1.1 Get yourself a copy of Windows.
You can get a trial of Windows Home Server edition version from M$ website: http://www.microsoft.com/windows/products/winfamily/windowshomeserver/eval.mspx

1.2 Create and Install the Windows virtual machine
If you don't know how to, here is a pretty decent tutorial: http://ubuntuguide.net/installi-windows-xp-inside-ubuntu-using-virtualbox


3. Getting to the real stuff

3.1 Configure the virtual machine USB  settings.

In VirtualBox  main window, right click on the Windows VM and select Settings.
In the settings window, go to USB
- check Enable USB controller
- check Enable USB 2.0 (EHCI) controller
- add an empty filter (press Insert key on your keyboard)
- click on OK button
Note: the virtual machine instance must be Powered Off, otherwise you cannot access the settings.






3.2 Upgrade the phone
Inside the Windows virtual machine, download Sony Ericsson PC Companion and install it.

Plug your phone into your PC/laptop using the USB cable. PC Companion should be able to detect it.

From this point on, you should be able to follow the normal guided SW upgrade procedure.


Good luck and spread the word if you found this article useful.

About me

I'm a telecom engineer with passion for engineering stuff. Just to make sure that I am clear about what engineering means, please see the definition published in Wikipedia (or click on the link above)

"Engineering is the discipline, art, and profession of acquiring and applying scientific, mathematical, economic, social, and practical knowledge to design and build structures, machines, devices, systems, materials and processes that safely realize improvements to the lives of people."

My personal engineering projects cover microelectronics, computer programming, computer networks to ecological energy sources, wood working and more. And I've created this blog to share my experiences in exploring the above mentioned domains.

Hope you will find it useful!
Sergio