Active Topics

 


Reply
Thread Tools
Posts: 120 | Thanked: 843 times | Joined on Jul 2015 @ Berlin, Germany
#1
UPDATE: If your bootloader is still locked or if you updated to firmware 34.3.A.0.228 or newer before unlocking consider following the official
linux-instructions
instead! Otherwise their guide recommends using windows for updating so in that case this one is still useful if you don't want to deal with windows.

This is an unofficial Guide for installing the official Sailfish X image on your Xperia X (single sim-version, it might possibly work with the dual-sim version but that's untested) using Linux/MacOS.

Some people are reporting that this guide also works with the dual-sim version.

Please keep in mind that while I don't think it is possible to accidentally permanently damage your phone by following this tutorial it's still you who does the flashing and since these are unofficial instructions neither me nor Jolla is responsible for any damage that might happen in the process.

If your bootloader is still locked updating to the latest android-ota eliminates the need for the flashtool step (do the update before unlocking the bootloader). It may be needed to update multiple times (until android doesn't find any new updates anymore) so don't assume that you're done after updating once.

If you haven't already unlocked your bootloader you may want to consider backing up your drm-keys first.

First we'll need to unlock the bootloader, this will void your guarantee (at least officially, in some places this is not enforceable).

If you already unlocked our bootloader you can skip to the flashtool-step.

It will also will erase your drm-keys from your phone! They'll be lost forever unless you backed them up! (irrelevant for sailfish x but backing them up might be useful if you ever want to use stock android again)

Go to the developer-settings in Android (can be made visible by repeatedly tapping the build-version in the settings) and activate OEM unlock.

After that we'll need to install fastboot on your computer. To do that on Ubuntu/Debian run

Code:
sudo apt install android-tools-fastboot
On MacOS install homebrew and run

Code:
brew cask install android-platform-tools
Obtain your unlock-key by following the instructions here.

Get the device into fastboot mode by fully turning it off and plugging in the power-cable while holding volume up.

Run
Code:
fastboot oem unlock 0xYOUR_KEY
on MacOS and
Code:
sudo fastboot oem unlock 0xYOUR_KEY
on linux.

Congrats! Your bootloader is now unlocked

We will download and install the newest official firmware from Sony which allows flashing to a special partition (on Windows this step is done using Emma, but we don't have that on Linux/MacOS so we'll use the unofficial flashtool).

Download and install the unofficial flashtool for your platform.

Download this image (mirror, mirror 2) (source). If you have the dual-sim version (again, untested) you should look for the newest update for the f5122.

Fully turn off your phone.

Open flashtool.

Plug your phone into your computer. Flashtool should now recognize your phone. If it doesn't unplug it again and plug it back in while holding volume-down.

Click on the Flash-Symbol, select Flash Mode, select the folder where you downloaded the file and select the xperia-x firmware (34.3.*). Leave the rest of the settings alone unless you know what you're doing.

Click on the Flash button. This will now install the update so it will take a while. Don't get scared if it's stuck at preparing files for a long time, it's supposed to be that way. If an error pops up (can't quite remember what the message was) select continue.

After this is done unplug your phone, Quit Flashtool (hint for MacOS: cmd-q won't properly exit the program so be sure to click on File->Exit to exit Flashtool) and boot into Android once.

Now fully turn off your phone again and enter fastboot-mode (hold volume-up while plugging in your phone).
The led should now be blue.

Extract the Sailfish-X zip to a location of your choice.

Go to this site, accept the terms and conditions and extract the SW_binaries_for_Xperia_AOSP_M_MR1_3.10_v13_loire.i mg file to the unpacked folder.

cd to the location where you unpacked the zip and run
Code:
chmod +x flash.sh
to mark the flash.sh as executable.

Now run
Code:
sudo ./flash.sh
on Linux and
Code:
./flash.sh
on MacOS to flash Sailfish OS.

Finally reboot your phone and enjoy Sailfish OS!

Last edited by jakibaki; 2017-10-25 at 06:06.
 

The Following 33 Users Say Thank You to jakibaki For This Useful Post:
mrsellout's Avatar
Posts: 889 | Thanked: 2,087 times | Joined on Sep 2010 @ Manchester
#2
The Mega link is down
The file you are trying to download is no longer available.
 

The Following 2 Users Say Thank You to mrsellout For This Useful Post:
Posts: 120 | Thanked: 843 times | Joined on Jul 2015 @ Berlin, Germany
#3
Originally Posted by mrsellout View Post
The Mega link is down
I updated the link to a new one which works for me. At least one person in the irc is having trouble with it though so I'll also link to a mirror in a few minutes.
 

The Following 6 Users Say Thank You to jakibaki For This Useful Post:
Posts: 144 | Thanked: 134 times | Joined on Jan 2010 @ Hamburg
#4
I have my xperia x already unlocked, flashed with TWRP and a custom rom.

Do I have to go back to the official Sony rom before flashing? And do I need this drm-keys for the steps described above?
 

The Following 2 Users Say Thank You to mbo For This Useful Post:
Posts: 120 | Thanked: 843 times | Joined on Jul 2015 @ Berlin, Germany
#5
Originally Posted by mbo View Post
I have my xperia x already unlocked, flashed with TWRP and a custom rom.

Do I have to go back to the official Sony rom before flashing? And do I need this drm-keys for the steps described above?
You don't need any drm keys.

If you didn't run ota while on an official sony rom in the last few days you'll need to install the update. It enables a special partition to be written to from fastboot-mode which is needed to install sailfish-x. (there is a workaround but this way is much easier)

Last edited by jakibaki; 2017-10-11 at 17:14.
 

The Following 3 Users Say Thank You to jakibaki For This Useful Post:
Posts: 287 | Thanked: 618 times | Joined on Jan 2011 @ Estonia
#6
Thanks jakibaki for your instructions!

One additional question: If I installed the community build, performed these countermeasures:
devel-su
mkdir ~/oem
mount /dev/disk/by-partlabel/oem ~/oem
rm -rf ~/oem/*
cp -ar /system/vendor/* ~/oem
umount ~/oem
rmdir ~/oem
then do I still have to use emma to return to the latest Android for XperiaX or can I just flash official downloaded SailfishX over the community build?
 

The Following 2 Users Say Thank You to acrux For This Useful Post:
Posts: 120 | Thanked: 843 times | Joined on Jul 2015 @ Berlin, Germany
#7
Originally Posted by acrux View Post
Thanks jakibaki for your instructions!

One additional question: If I installed the community build, performed these countermeasures:
devel-su
mkdir ~/oem
mount /dev/disk/by-partlabel/oem ~/oem
rm -rf ~/oem/*
cp -ar /system/vendor/* ~/oem
umount ~/oem
rmdir ~/oem
then do I still have to use emma to return to the latest Android for XperiaX or can I just flash official downloaded SailfishX over the community build?
That should also work. Just remove the oem line from the flash.sh script before flashing

EDIT: Turns out there are some problems with that way because the blobs were updated. Read this if you really don't want to use flashtool.

Last edited by jakibaki; 2017-10-12 at 05:50.
 

The Following 3 Users Say Thank You to jakibaki For This Useful Post:
Posts: 57 | Thanked: 140 times | Joined on May 2015
#8
Sony sent me an unlock key like 146xxxxxxxxxx761. However
sudo fastboot oem unlock <MY_KEY> failed:

FAILED (remote: Incorrect format for unlock data. Should be on the form "0x)

Just added "0x" before the unlock key, then okay.
 

The Following 3 Users Say Thank You to objectifnul For This Useful Post:
Posts: 120 | Thanked: 843 times | Joined on Jul 2015 @ Berlin, Germany
#9
Originally Posted by objectifnul View Post
Just added "0x" before the unlock key, then okay.
Thanks for the hint, I'll clarify it in the guide
 

The Following 2 Users Say Thank You to jakibaki For This Useful Post:
Posts: 1,746 | Thanked: 1,832 times | Joined on Dec 2010
#10
i flashed that then flashed sfos but network isnt working :/ guessing something didnt flash?
 

The Following User Says Thank You to m4r0v3r For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 10:52.