Installing Sailfish X on XA2 using Windows

Please make sure you read the whole page of instructions before starting.

IMPORTANT – Do not skip this step

Use your Xperia XA2 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

  1. A. Sony Xperia XA2 Single SIM (H3113 & H3123 & H3133) or Sony Xperia XA2 Dual SIM (H4113 & H4133) Sony Xperia XA2 Plus Single-SIM (H3413) or Sony Xperia XA2 Plus Dual-SIM (H4413 & H4493) Sony Xperia XA2 Ultra Single-SIM (H3213 & H3223) or Sony Xperia XA2 Ultra Dual-SIM (H4213 & H4233), verified to have an unlockable bootloader.
    B. USB-C cable
    C. Internet connection
    D. Windows computer
    E. Sailfish X from Jolla shop.

What you need to do

1. Skip the Android update

  • It is not necessary to update your device to the latest version of Android. You can skip the update if prompted.
  • NOTE: do not update your XA2 device to Android version 9 as installing Sailfish OS then would break the device.

2. Install the fastboot driver

2.0 While the device is off: Hold down the Volume Up button gently and connect your device to your computer via USB. The LED next to the speaker on the device should light up blue. If it turns green then disconnect the cable and try again.
2.1 Download the Xperia™ X fastboot drivers from Sony’s website. (NOTE: You will find a driver for Sony Xperia X – not the XA2 – and that is the correct driver)
2.2 Right click the xperia-x-driver.zip file, and click “Extract” it to a directory.
2.3 Open the ‘Device Manager’:
2.3.1 On Windows 7, right-click the ‘Computer’ icon on the desktop and choose ‘Manage’. When the Computer Management application appears, choose the ‘Device Manager’ in the tree.
2.3.2 On Windows 8 & 10, Device Manager can be found by right-clicking the Start button, or by pressing Windows+X on the keyboard.
2.4 Find the ‘Android’ device in the tree. If it is not correctly installed, it will show a warning sign.
2.5 Right-click it and choose ‘Update driver’
2.6 then ‘Browse my computer for driver software’,
2.7 Select “Let me pick from a list of available drives on my computer”
2.8 Select “Show All Devices” and click next
2.9 Select “Have disk…”
2.10 Select “Browse …” and go to the directory where you extracted the driver package at step 2.2
2.11 Select the driver information file called sa0114adb.inf in that directory and click “Open”
2.12 Click “OK”
2.13 Then you should see “Sony sa0114 ADB Interface Driver” in the “Model” list.
2.14 Click “Next”
2.15 Then you might see “Update Driver Warning” for this you need to select “Yes”
2.16 After this you should see “Windows has successfully updated your drivers” and you can click “Close”. Windows Device Manager has now the item “Sony sa0114” in the tree.
Now your device will be ready for unlocking.

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:

The zip files are like this: SailfishOS-VERSION1-DEVICE-VERSION2.zip.

Examples:
Sailfish_OS-Jolla-3.0.0.5-h3113-0.0.7.2.zip (this image can be used for H3113, H3123 & H3133)
Sailfish_OS-Jolla-3.0.0.5-h4113-0.0.7.2.zip (this image can be used for H4113 & H4133)
Sailfish_OS-Jolla-3.0.0.5-h3213-0.0.7.2.zip (this image can be used for H3213 & H3223)
Sailfish_OS-Jolla-3.0.0.5-h4213-0.0.7.2.zip (this image can be used for H4213 & H233)
Sailfish_OS-Jolla-3.0.0.5-h3413-0.0.7.2.zip (this image can be used for H3413)
Sailfish_OS-Jolla-3.0.0.5-h4413-0.0.7.2.zip (this image can be used for H4413 & H4493)

3.2 Extract this file to a directory, resulting in a dozen of files. In that directory you can also find the fastboot binary file fastboot.exe that will be needed in section 4.

4. Unlock the bootloader

4.0 In order to unlock the phone you need to get the unlock key (unlock code) that can be requested from Sony Open Devices website.

  • scroll down the page
  • select your device  Xperia™ XA2
  • scroll down the updated page
  • enter the IMEI code (from Settings menu) of your device to the line near the bottom of the page
  • read and accept the first two tick boxes
  • 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 volume up 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 When your device is connected (blue LED is lit), using Windows File Explorer go to the folder where you unzipped Sailfish OS in step 3.2 (as it has the file ‘fastboot.exe’). Press Shift, then right-click the folder background (not files) and select “Open command prompt to this directory” (Windows 7) or “Open PowerShell window here” (Windows 10).

NOTE 1: Windows 10 PowerShell requires the commands in the following way, e.g. “.\fastboot.exe devices”
NOTE 2: PowerShell can also be launched from Windows 10 search utility (near bottom left corner). Then proceed to the Sailfish folder using the ‘cd’ command.
NOTE 3: The default command prompt (“cmd”)  of Windows may work better than Power Shell. You can launch it at the search utility of Windows (the magnifying glass at bottom left) by typing “cmd” there. Then proceed to the Sailfish folder using the ‘cd’ command.

4.7 Run the command shown in chapter 4 “Enter unlock key” of Sony instructions – but please pay attention to the slightly different command variants explained below. Use the unlock key from chapter 4.0. Do not forget to add the ‘0x’ prefix.

a) If you use the default command prompt (“cmd”)  of Windows:
fastboot -i 0x0fce oem unlock 0x[your unlock code]

b) If you use the Windows PowerShell:
./fastboot.exe -i 0x0fce oem unlock 0x[your unlock code]

NOTE: If the commands above should fail with an error message about the “-i” option, please try using the shorter command variants below:

a) If you use the default command prompt (“cmd”) of Windows:
fastboot oem unlock 0x[your unlock code]

b) If you use the Windows PowerShell:
./fastboot.exe oem unlock 0x[your unlock code]

5. Getting the Sony vendor binary images

NOTE: With version v17B of Sony vendor image we have observed a decrease in the perceived signal strength of the 5GHz WLAN access points (investigations ongoing). Version v16 should work better in this respect. Therefore we would not recommend flashing v17B for the time being if you use WLAN networks in the 5GHz band.
-The renewed flashing scripts of update 3.0.3.10 allow you to use either of the two versions.
-You can also change the vendor image later by reflashing just the image of your choice (and not Sailfish OS) by following the instructions in here.

5.1 Download one of the the Sony binary images for the Xperia™ XA2 . Version 16 from here. Or version 17B from here. The downloaded files have the following names:

SW_binaries_for_Xperia_Android_8.1.6.4_r1_v16_nile.zip
SW_binaries_for_Xperia_Android_8.1.6.4_r1_v17B_nile.zip

5.2 Unzip the file you want to use.

5.3 Copy the unzipped file (below) and paste it to the same directory where you extracted the Sailfish OS .zip file.  The unzipped files have the names:
SW_binaries_for_Xperia_Android_8.1.6.4_r1_v16_nile.zip
SW_binaries_for_Xperia_Android_8.1.6.4_r1_v17_nile.img

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.6 below.

6.1 Turn off the device. Leave it off for at least fifteen (15) seconds.
6.2 Connect one end of a USB cable to your PC
6.3 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.4 On Windows, fastboot drivers are needed to properly detect the device, as was needed for the unlocking process (step 4.7) . If you need to install them, see the instructions in section 2 above.

6.5  Using Windows File Manager go to your Sailfish folder (see step 3.2).
6.6 Double-click ‘flash-on-windows.bat’. A console window appears.
If Windows warns you that it ‘Protected your PC’ by stopping the script from launching, click ‘More Info’ then ‘Run anyway’.
6.7 Follow the instructions in the console window.
6.8 When flashing has finished, detach cable and reboot your device into Sailfish X!

Happy flashing! 🙂

7. Booting up to Sailfish X

7.1 Press the Power button. A harmless warning about the bootloader (please ignore) is shown.
7.2 Your Xperia starts soon running the first boot up, a.k.a. Startup Wizard, during which it will ask you to:
  • select the display language for the phone
  • accept the End User License Agreement
  • set the security code for the device lock – optional
  • connect to the Internet
  • set the date & time
  • sign in to your Jolla account – the same that you used for buying the license, as this makes the so-called licensed content  (including Android Support) appear in Jolla Store for your device
  • install the default Sailfish apps, Android Support (can be installed later, too) and Aptoide Store
  • run Sailfish tutorial “Learn basics” – this can be skipped by touching the 4 corners starting from top-left in clockwise direction
7.3 You can now install more Sailfish apps from Jolla Store and Android apps from Aptoide Store (and from other Android stores).