Installing Sailfish X on Xperia X using Linux
NOTE: If your device’s Android version is lower than 34.3.A.0.228 and you have already unlocked your device’s bootloader, then you will need to use a Windows tool for updating the Android version. See step 1.3 below.
NOTE 2: If you have an Xperia XA2 device then you are reading wrong instructions. These are the correct ones.
IMPORTANT – Do not skip this step
Use your Xperia X some time with Android OS. Check that phone calls can be made and received, that you can browse the Internet with a mobile data connection (turn WLAN off) and that the camera works. You might also want to check the touch display, loudspeaker and microphone.. Use the same SIM card as will be used with Sailfish X.
What you need to begin
- A. Sony Xperia™ X Single SIM (F5121) or Sony Xperia™ X Dual SIM (F5122), verified to have an unlockable bootloader.
B. Micro-USB data cable
C. Internet connection
D. Linux Computer
E. Sailfish X from Jolla shop.
What you need to do
1. Update to the latest Android software version
If your device has its bootloader locked:
1.1 Update to the latest version of Android over the air using your phone. You can go to “Settings > System > About Phone > Software Update”.
1.2 You might need to do the “Over The Air” update multiple times, so after completing the update go to “Settings > System > About Phone > Software Update” again and check for system updates.
1.3 After you are done updating, check in your phone’s Android version: “Settings > System > About phone > Build number”, and make sure the build number is 34.3.A.0.xxx (where xxx is 228 or higher), or is 34.4.A.yyy (where yyy can contain any number).
If your device has its bootloader unlocked BEFORE updating to the latest version of Android, you need to follow OPTION 2 of section 1 in Windows instructions first to update your device using Sony’s flashing tool Emma.
2. Install Fastboot tools on your computer
Here is how to install Fastboot tools on different Linux distributions using terminal:
apt-get install android-tools-fastboot
dnf install android-tools
3. Extract the Sailfish OS .zip file
3.1 You have purchased the Sailfish X license and are hence entitled to download the latest Sailfish OS .zip file from https://shop.jolla.com/downloads/ . You can download newer versions later, too.
The zip files are like this: SailfishOS-VERSION1-DEVICE-VERSION2.zip. Examples: Sailfish_OS-Jolla-220.127.116.11-f5121-0.2.1.20.zip and Sailfish_OS-Jolla-18.104.22.168-f5122-0.2.1.20.zip.
3.2 Extract this file to a directory: unzip SailfishOS-VERSION1-DEVICE-VERSION2.zip.
4. Unlock your bootloader
4.0 In order to unlock the phone you need to get the unlock key that can be requested from Sony Open Devices website.
– scroll down the page
– select your device Xperia™ X
– scroll down the updated page
– enter the IMEI code (from Settings menu) of your device to the line near the bottom of the page
– type your email address to the next line
– click “Submit” and the unlock code will appear
– copy the code to the text buffer of your computer.
After getting the key please follow the below actions to do the actual unlocking.
4.1 Enable “Developer options” by going to “Settings > System > About Phone” and tap the “Build Number” multiple times until you see a prompt saying “You are now a developer!”
4.2. Enable “OEM unlocking” and “USB debugging” from “Settings > System > Developer options” menu.
Note that your Xperia device must have an Internet connection when doing this.
4.3 Turn off your phone
4.4 Connect USB cable to PC
4.5 Press and hold the ‘Volume up’ button gently and connect the other end of the USB cable to your phone and wait for the LED to light up BLUE. If it turns green then disconnect the cable and try again.
4.6 Open Terminal on your Linux computer. Go to the folder where you unzipped Sailfish OS in step 3.2.
4.7 Run command shown in chapter 4 “Enter unlock key” of Sony instructions. Use the unlock key from chapter 4.0. Do not forget to add the ‘0x’ prefix and prepend the command with “sudo”.
The bootloader is now unlocked, allowing you to install Sailfish X to your device.
5. Getting the Sony vendor binary images
5.1 Download the Sony binary image named SW_binaries_for_Xperia_AOSP_M_MR1_3.10_v13_loire.zip for the Xperia™ X here.
5.2 Unzip the SW_binaries_for_Xperia_AOSP_M_MR1_3.10_v13_loire.zip file.
5.3 Copy the SW_binaries_for_Xperia_AOSP_M_MR1_3.10_v13_loire.img extracted from the zip and paste it to the same directory where you extracted the Sailfish OS .zip file. Once done, you should have SW_binaries_for_Xperia_AOSP_M_MR1_3.10_v13_loire.img in the same directory with fastboot.exe, flash-on-windows.bat, sailfish.img001 and some other files.
NOTE: do all the steps above regardless of the Android version you got while updating it, also in case of Oreo (Android 8).
6. Flashing Sailfish X to your Xperia™
Connect your device to your PC in Fastboot mode as follows:
NOTE: If your device is still connected and the blue LED lit from step 4.7 it is ok to keep it that way and skip to step 6.5 below.
6.1 Disconnect your Xperia™ device from your PC
6.2 Turn off the device. Leave it off for at least fifteen (15) seconds.
6.3 Connect one end of a USB cable to your PC
6.4 While holding the ‘Volume Up’ button gently, connect the other end of the USB cable to your Xperia™ device. The LED next to the speaker on the device should light up blue. If green, then disconnect cable and try again.
6.5 Open Terminal in the same directory where you extracted the Sailfish OS .zip file (see step 3.2)
6.6 Launch the flashing script by entering the command:
sudo bash ./flash.sh
6.7 When flashing has finished, reboot your device into Sailfish X!
- How can I check if my Xperia device can be unlocked?
A1: See the Sony Open Devices website for detailed information for each Xperia device. Scroll down to the bottom of this page, then select your device:
For the Xperia X (correct at the time of writing, Sony may update this information at any time):
In your device, open the dialler and enter *#*#7378423#*#* to access the service menu.
Tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then your device can be unlocked. If it says No, or if the status is missing, then unlocking is not possible.
- After flashing Sailfish X to my Xperia™, it gets stuck on the Sony logo when it is booting up, how can I fix it?
You should reflash the device with the instructions above. Make sure that you have the correct Vendor binary image from Sony (chapter 5).
- How does this affect my warranty with Sony?
The effect of unlocking your phone does affect your warranty, so you should make sure that you read Sony’s warnings during the unlocking process thoroughly. We also recommend that you verify that all the hardware is working properly before unlocking their devices, as although getting repairs for existing faults under warranty may still be possible after unlocking, it will be much easier before.