Tuesday, November 26, 2013

Firmware upgrade for Xperia U in Linux (II)

[Long post]

Edited (08th-Jun-2014): Updated the firmware download site.

In my previous post I explained that one of the things that made the installing process more difficult was the lack of a general picture of the process. There are lots of pages explaining recipes to install, but I find it difficult to follow recipes if I don't manage to understand the underlying logic.

The following is my visualization of the whole process (this is less than a week of knowledge, so I cannot say I'm an expert: take it with a grain of salt). You can get a more accurate picture of the Android architecture in other pages. And you can get the process in detail from XDA.

First, components

As far as I understand there are three components in an Android system


  1. The bootloader. This is a piece of software that usually loads the system, enables Android recovery image and image upgrades. Sometimes it is called the kernel, so I understand it is the underlying component of the Android
  2. The second one is called the system. It would include shared libraries and components. When people says Android is Java, I understand that it is probably related to this set.
  3. And the third one is called Gapps. Gapps it is not a component in its own. It's a package with Google applications. For licence reasons, you cannot distribute them attached to other components, so you almost always will find a package with Gapps.


OK. Now to the process. Again. You'll probably void the warranty and you could brick your phone. If you're not comfortable installing your own operating system at your computer, DON'T EVEN BOTHER reading further. If you are reading this, you have Linux at home and that's means that you are more than average Joe, but do it at tour own risk.

Second, the modes. Fastboot and the like


"Fastboot??? What the h***ll is that. Gonzalo, you told me this was going to be easy".

I nearly bricked a BQ Maxwell tablet upgrading to the official firmware, so, please, don't think this is easy.

Fastboot is a mode in the phone that allows to unlock and flash the bootloader. In the Xperia U you get that mode turning the phone off, then pressing the Volume up button and while pressing, connecting the USB cable to the computer. But you should already know if you had read the Sony document as I told you. The light in the phone should be blue.

There is also another mode called Flash mode. "Fastboot mode and Flash mode are different? Is there no other F-word?". To enter Flash mode, shutdown the mobile, disconnect the cable from the computer, press the Volume down, connect to the computer and release the volume down. The light in the phone should be green.

 Recovery mode. It is a mode that allows to do some powerful things from the phone. To enter that mode, power off the phone, then power on and after you see the SONY logo, press repeatedly volume down button (-) until you see recovery. While in the previous two modes the screen is powered off, in this mode, you can navigate the menus. To navigate in the recovery mode, you use volume up and volume down, and select with the Power button.

You will sometimes read about Normal mode. Normal mode is the phone on as usual, sometimes with the the debug options activated.

Updating. One twist.

After reading about components and modes, the first thing to do it would seem to update the bootloader. But...

...you cannot update the kernel directly because to avoid people messing around, kernels tend to be locked down by the manufacturer. Besides, sometimes you buy phones locked by the telco company (so that you get it cheaper, but you cannot change the company).

So before you update the kernel, you need to unlock (or root, as it sometimes called) the bootloader.

Unlocking the bootloader

I must confess I'm pleasantly surprised with Sony about the unlocking process. It has a very informative page with a step-to-step guide. Unfortunately, it doesn't work with Linux, but you should read it in detail because it is almost there. You'll need to install Android SDK. You'll need to follow most of the steps.. Also, you will need a code, you're going to get by email from that page. So go read, click next and fill the details with your email and IMEI, because you do really need the code.

When going for Linux, you're going to follow the same steps. BUT. Instead of the steps related to the USB drivers (i.e step 9), you need UDEV rules. UDEV is the way Linux uses to recognize new components, in particular USB devices. You will need the USB ID for your phone version, both in usual mode, in Fastboot mode and in Flash mode.



Back to the UDEV rules, these are the ones I got for Xperia U ST25i.



But you should get yours using the tool lsusb.

After you have the correct rules (and you have restarted the UDEV with "sudo service udev restart") connected in fastboot mode, you will be able to follow steps in the Sony Page and unlock the bootloader. And then to the next step

Flashing the kernel

This part should be easy but it gets a bit tricky. You are going to use a tool called Flashtool. But the tricky part is that Flashtool needs libusb-dev. From what I've been able to understand, that library suffered some fork, so you'll end up asking how the h*ll should you install that library. And if you've got a 64 bits linux version, things are not going to be easier. You may end up screwing the whole system because ia32-libs (don't follow that route).

Good thing about the Internet is that you are not alone. So in this page, you'll get to ease the problematic steps. Basically, compile libusb-dev from source and modify Flashtool.

And then flahsing the kernel should be easy. Flashtool allows lots of things, but I only flashed the kernel  with the firmware Flashtool came with. Once connected, I think you can flash either in Fast boot and in flash mode.

Flashing the system and Gapps

The last part is very easy. First download the system and Gapps. If you're going to pick the latest versions, do it from Maclaw. The download is a bit unintuitive (click Sony Xperia U, click CianogenMod in the right, and then download both files). Edited: If you want Android 4.4.3, see this post. The better place is from XDA. Once downloaded, copy them to the phone in normal mode.

And reboot in Recovery mode. In Recovery mode you should do a backup. Just in case.

Then follow the process "Install zip->Choose zip from /storage/sdcard0 and select the folder where you copied the file" to load first the system file. And then do the same process with the Gapps file.

And then wipe data/factory reset, followed by wipe cache partition and followed by "advanced->Wipe dalvik cache"

And then "reboot system now"

One last note


One of the things I struggled with was reading about a sdcard "Where is the SDCARD in an Xperia U?".

I understand it is a sort of internal storage. Anyway, there is no socket to put a SDCARD inside, so forget about it.




Sunday, November 24, 2013

Firmware upgrade for Xperia U in Linux (I)

About a year ago I received some wonderful presents from a group of friends :D. One of them was an Xperia U.

Sony Xperia U (ST25i) has a stock Android 2.3, which a year ago was already a bit old. Fortunately, Sony had already published Android 4.04 for the Xperia U, and the same day I received, I installed ICS (Android is famous for putting sweet names to its versions).

The phone worked quite well. But new Android versions came, and it was obvious Xperia U wouldn't get an updated.

So I decided to explore the Android unofficial update scene. And I ended up installing a custom firmware. And I don't regret it.

I have the new shiny Android KitKat 4.4. The phone works really great. Fluid. Visually more pleasant. No crapware (why do they force to install apps nobody uses?).

It still has some issues pending (at this moment, Bluetooth does not work yet), but for me it is no longer a matter of testing a Custom Firmware. It is much much better than the official Sony 4.0.4 version. Besides, the scene for the Xperia is very active and vital (yesterday I installed a 22nd November version that didn't have wifi working, and this morning I installed another version where wifi works)

The real process is very easy, but I had some issues getting to there. Because of two things:


  1. I didn't even know the most basic terminology about the process (not that I am an expert know, you know) and I couldn't manage to get a mental picture of it.
  2. Most of the pages are Microsoft Windows based. I have Linux at home. Linux Mint 64bits, to get things more complicated (as we'll see). 


So in my next post I'll try to explain the process in a sort of newbie post. HOWEVER. Word of caution. You'll probably void the warranty and you could brick your phone. So this is not something for the faint of heart.

UPDATED: Link to the detailed post.

Friday, November 8, 2013

Companies, developers and recruitment

A few months ago I reported my business unit was offered for sale. Not much to report about it (I know very little and I can write even less)

Obviously, most of us in the business unit, decided to brush up our Linkedin pages and get into the job market, just in case.

I remember in particular one interview. It didn't start well when I replied "Sí, I mean, yes" after listening my name with a perfect Spanish z sound (as it turned out, one of the interviewers was Spanish too). It didn't continue well due to my inability to reply to the typical Java interview questions (such as Big-Oh notation complexity for a java hashlist look up or differences between Spring container and JEE container). I didn't pass the test.

But for me as an experience, the interview finished wonderfully when the Spanish guy asked "What are you looking for? What's your ideal job?"

I think it is very difficult to match companies and people.

Companies would really like people that could commit to the project and I certainly prefer a company where I feel my work makes a difference. However, companies tend to look for people that can hit the ground running at the lower cost. And developers tend to look for companies with better conditions and more buzzwords.

One could think that model is flawed. But the fact is that the alternative is not always better. In a past life I had to do some recruitment. And the worst selection was a guy I thought he was going to fit perfectly in the culture. And as an interviewee I've never asked if I would be able to fully manage my own machine or if I would personally know the people managing the servers.

So back again to the interview "What are you looking for? What's your ideal job?". Putting in words, I want a place challenging, where I can learn new things and do different tasks day in day out. I want a place where I can commit and where my job makes a difference. I won't talk about my current job except to say people are wonderful. I don't know about the future in my current job. And I'm really proud that people still remember me from my previous job. I do remember them too. So people are very important too.

But, the fact is that suddenly, I realized how difficult matching companies with people is. Because I certainly could have answered all those questions, and that wouldn't have made me more suitable for the job (in fact I aced the concurrency ones which I have a more solid knowledge background but less experience). I remember selecting people we used to ask for digital signature experience and hitting the ground running didn't have anything to do with that.

But even if I were an incredibly valued employee, I wouldn't have a clue if the job I was being offered is the one was looking for or if that's my ideal job.

Friday, November 1, 2013

One year

A year ago I was in a plane flying into London. I was in whirl, nearly panicking. My life about to change.

I'm somebody who loves being in his comfort zone. And then leaving your wife and daughters for 6 months. Leaving your country for who knows how much time.

It has been hard. There have been difficult times. In lots of different levels. Renting in London (well worth a million pages book). Eating in London (a shorter book :D). Weekend trips back to Spain waking up at 4am on a Saturday and back to London at 3pm on a gloomy Sunday. Talking to your family via Skype. Missing lots of things. Closing down the family home in Madrid and moving to London. Missing the light.

But I don't regret it at all. It is being a wonderful experience. My daughters are happy. My wife is happy. There are lots of great people all around.

And so far, it is working well. There's a new comfort zone around (sort of).

I don't know about the future.

But so far, so good.

Friday, August 30, 2013

Changes

A few days ago my company sent out this press release. It seems to be rather unimportant, but for me it means changes.

I work for that specific business unit. I cannot write too much. Because I don't know too much, but also because I don't want to tell too much. But there are some topics I would like to raise.
  1. In Spain, if your work is good and the company is doing great, whatever happens in between, has little importance. In the UK, it doesn't mind if your company is doing well and your job is fine. Your business unit is not going as it is expected and you can be transferred to a different company, relocated inside the company or most probably made redundant. Maybe it is not the country, but the kind of business. Obviously that behavior makes easier for companies to react to the market (hiring when they need and firing when they don't). We'll see how it ends, but it does not help people to feel part of a company.
  2. I haven't been in this situation in Spain. But when something like this is announced to the employees, I wouldn't discard uncomfortable scenes, bad temper, crying and shouting. Here, the only bad reply was from one of the people announcing the news. Sad faces, good questions and nothing more.Again, maybe is not the country but the kind of business.
  3. After almost 9 months alone, my family finally came to London. My connections in London are minimal. My salary is the only income. I expected my English fluency would be better after 9 months here. And I'm the last in (so I might be the first out). My situation is not stellar, but others had difficult situations too (to name one example, one colleague was told a couple of days before getting married). Despite that, people have been surprisingly friendly and supportive.
  4. I managed to learn a new expression: retention package. And apparently, when there is not going to be one, it is obvious you should be brushing up your Linkedin profile.
What will happen? I don't know. Most probably, the business unit will be closed. And me?  I'm concerned, but not terrified. At this moment there are several options. It doesn't seem immediate. And apparently there are lots of jobs for IT people in London. 

Let's wait and see.

Tuesday, July 16, 2013

IKEA vs Greenwich

This post started as a way of comparing different ways of managing customer relationships. It ended up as rant, but I'm not going to delete it. But I will write another post in the future with some suggestions.

A good experience: IKEA.
I recently bought some furniture from IKEA, using their online services in the UK. The furniture was delivered on Friday morning, and in the evening I discovered that there was package less than expected.

I contacted their online customer service that evening, and received an automated reply that my comment had been received and that they aimed to reply it in three days. I could have contacted them on the phone, but I didn't use do it while I was in Spain and in English it's more difficult for me.

On Sunday evening (on Sunday!!!!) I received a reply apologizing for the problem, and informing me that the package will be delivered by courier in 5-7 days. But in the mean time, if I really needed the package I could go to any IKEA store and ask for the package.

I will recommend their services. Yes they fail, but on the customer relationship, they set reasonable expectations (3 days for an email is good), and they manage to fulfill them.

A bad experience: Royal Borough of Greenwich
I recently moved into the Royal Borough of Greenwich. I filled in their online form for that. I received an automated reply informing that I should receive a letter in ten working days with the tax amount (in the UK the people living in a property pay the property tax).

Nearly 20 working days later, I hadn't receive the promised letter. So I contacted them again.

One could think "why bother? No letter, no taxes". Well. Two reasons.


  1. I have two daughters and I need to apply to get a school for them. But I cannot apply without a "Correct proof of address" and "Correct proof is a current council tax bill/statement or council tax reference number". 
  2. If I'm going to have to pay amount x, I prefer to do it in as much months as possible. It is not the same to pay x/6 in 6 months than to pay the whole x in one month, and I prefer to do it in 6 months.


This time I received an automated reply with the following:

"Emails are treated with the same level of importance as other communications, i.e. post, telephone and fax. We will do our very best to respond to your email within 20 days."

20 days for replying an email?.

Are you kidding me?.

And you still say that email has the same importance for you as phone?

15 days later I contacted them again. This time by phone. 10 minutes on hold (telling me how good their web services are) and then a bizarre conversation later (I don't blame the person on the phone), I got to know that it is taking them from 4 to 6 weeks to process the moving (4/6 weeks to process something that is in a digital format!!!). Or maybe was her way of saying "Vuelva usted mañana"

They didn't set reasonable expectations (10 days for a letter is OK, 20 days for processing an email IS NOT) and they didn't fulfil (4/6 weeks for something they said it was going to be 10 days).

Now. You could bet I'm not happy with the experience. I'm not angry, but I would like to provide feedback to the Council. What should I do? It would seem pretty straightforward. You can go to the council complaints page.

Well, but I don't want to complaint as in "get my issue solved" (I expect it will get solved eventually), but as in "you are not having a nice relationship with your users and I, as a user, would like to tell you why".

Well. You can't.

It turns out that if you want to make a compliment, you can send an email. But if you want to complain, you have to download a form, print it, fill it and post it as a letter.

Yes. My dear friends. 2013 and you still have to send a letter.

OK. What form should I use. Well. It turns out it is a 6 page form with 1 page for the actual complain and 2 pages for my profile (Do you really need to know my religion or sexual orientation "to help [you] to ensure that we are providing our services fairly to all members of our community"?). You don't want to get my feedback, neither ensure you are providing your services fairly. You just want to cover your *ss.

Note: As a contrast, I also notified the Tower Hamlets Borough about the change of address. In less than a week I had a letter in the new address, with the difference between what I had paid and what I was expected to have paid, and how to get a refund. From what I've been told, and from my experience, THAT is the usual time it takes to process a council tax record.

Update (19/07/2013): A couple of days ago, I sent another email. Today I received an email from a real person, apologizing for the delay and confirming the Council Tax is set up and that I will receive the form in a few days. That's the way.

Monday, March 25, 2013

Escrache

Imagine you´re a Member of Parliament. And you have decided you are not going to give your support to something. And then you get a group of people protesting against you.

You would say. "Well, nothing new"

... calling you cockroach and threatening to kill you. 

You would say something like "Well, you know. People sometimes say things they don't really think."

... at the street in front of your home. 



... or even inside your building and hitting the door of your flat while your children are inside and you are not there.

I'm very worried. For several reasons
  • They are Member of Parliament. They are representing thousands of people.
  • MP are being harassed to make them vote something different (at best). Not trying to convince with reasons, but with fear.
  • They are being harassed not only at the Parliament or giving a speech in some random place. But at their homes. Threatening their neighbors with "it's not safe to live near an MP". Threatening their families.
  • The rhetoric (crockoachs, we are going to kill, you don't deserve living) shows the "objectification of the enemy". The enemy is everybody who does not think the same.
  • I hadn't heard the word escrache until a month ago. But it is another symptom of a trend. It is not something new. It is not something big. It's some little thing here. That comic strip there. A little piece of news over there
And last but not least, because the unemployment rate in Spain is over 26% for the general population and over 55% for people under 25 y.o.

Some people say "Yes it's violence but...". Yes. Violence is justified against people who think something different. And even other members of Parliament support this form of pressure.

However, every cloud has a silver lining. There are other MP that oppose to this trend.










Wednesday, February 6, 2013

Spanish budget deficit, 3Q2012


From time to time I visit the page where the internal comptroller in Spain posts its budget deficit figures. Last week there was a link to the calendar of future publications. The calendar was last updated past September, and didn´t show anything for 2013. Usually at the end of January appears 3rd quarter budget deficit. So when January ended with no new data, I knew the figures would be bad.

And they are terrible.

Take this document, and sum up deficit for the first three quarters of 2012.

13,991+31,176+20,169=65,336

Now take the data for the GDP

258,537+269,169+252,753=780,459

And now get the percentage.

Budget deficit for 3Q2012 was 8.37%. Down from 8.54% 2Q2012. And a commitment of 6.3% in Q42012

Austerity.

Yes, I know I wrote central government budget deficit was going great. I don´t what have happened. Maybe financial institutions help. Probably regional deficit. Who knows.