We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2020-02-02 16:29:20 +0300

olf gravatar image

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's installation guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

Preparation

First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but all preinstalled apps will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.

Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

Flashing Sailfish OS

Attach the device to an USB root hub, to which no other device is attached:

  • Execute lsusb in the terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, do not worry to use an USB port which also supports USB 3 (often colour coded in blue), you should still see the device being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub) between the device and your computer's USB port!


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla.

  • [This does not seem to be necessary: Please check (i.e., not performing this point) and report back.]
    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options: Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again after that).
  • You sure can omit steps which you have already carried out in the section "Preparation", but only exactly these steps. Missing out a significant step will let flashing Sailfish OS fail or result in an unusable Sailfish OS installation. Don't be afraid, you can usually simply flash the device again in this case.
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

Basic configuration of Sailfish OS

First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

Booting a Sailfish OS recovery image per fastboot boot
  1. Locate the file recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend way of booting a Sailfish OS recovery image:

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release
    Hence, if you have upgraded the SailfishOS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image. Never use an older recovery image than the installed SailfishOS release!
  • Do not flash the Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.
Shrinking the "home" LVM volume and extending the "root" one

Don't be afraid of loosing a little space on your "home" volume, all user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).

a. for devices / SailfishOS releases without home volume encryption

  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot

b. for devices/ SailfishOS releases with home volume encryption
(Xperia 10 series since SailfishOS 3.2.1)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 below on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.
F-Droid
  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.
Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

Further recommendations

Guides for utilising an SD card to consider
  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's installation guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but all preinstalled apps will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.

Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attach the device to an USB root hub, to which no other device is attached:

  • Execute lsusb in the terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, do not worry to use an USB port which also supports USB 3 (often colour coded in blue), you should still see the device being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub) between the device and your computer's USB port!


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla.

  • [This does not seem to be necessary: Please check (i.e.,(i.e., by not performing this point) point initially) and report back.]
    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options: Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again after that).
  • You sure can omit steps which you have already carried out in the section "Preparation", but only exactly these steps. Missing out a significant step will let flashing Sailfish OS fail or result in an unusable Sailfish OS installation. Don't be afraid, you can usually simply flash the device again in this case.
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend way of booting a Sailfish OS recovery image:

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release
    Hence, if you have upgraded the SailfishOS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image. Never use an older recovery image than the installed SailfishOS release!
  • Do not flash the Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Don't be afraid of loosing a little space on your "home" volume, all user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).

a.

3.3.2.a for devices / SailfishOS releases without home volume encryption

  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot

b.

3.3.2.b for devices/ devices / SailfishOS releases with home volume encryption

(Xperia 10 series since SailfishOS 3.2.1)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 below on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.3 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab. and is rendered better (e.g., its formatting) there.

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's installation guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but all preinstalled apps will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.

Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attach the device to an USB root hub, to which no other device is attached:

  • Execute lsusb in the terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, do not worry to use an USB port which also supports USB 3 (often colour coded in blue), you should still see the device being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub) between the device and your computer's USB port!


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla.

  • [This does not seem to be necessary: Please check (i.e., by not performing this point initially) and report back.]
    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options: Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again after that).
  • You sure can omit steps which you have already carried out in the section "Preparation", but only exactly these steps. Missing out a significant step will let flashing Sailfish OS fail or result in an unusable Sailfish OS installation. Don't be afraid, you can usually simply flash the device again in this case.
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend way of booting a Sailfish OS recovery image:

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release
    Hence, if you have upgraded the SailfishOS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image. Never use an older recovery image than the installed SailfishOS release!
  • Do not flash the Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Don't be afraid of loosing a little space on your "home" volume, all user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).
3.3.2.a for ... on devices / SailfishOS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b for ... on devices / SailfishOS releases with home volume encryption

(Xperia 10 series since SailfishOS 3.2.1)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 below (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.3 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source source of this guide is at GitlabGitlab.com and is rendered much better there and is rendered better (e.g., its formatting) there.formatting, especially enumerations across paragraphs) than at TJC (except for the TOC).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's installation guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but all preinstalled apps will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.

Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attach the device to an USB root hub, to which no other device is attached:

  • Execute lsusb in the a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, do not worry to use an USB port which also supports USB 3 (often colour coded in blue), you should still see the device being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub) between the device and your computer's USB port!


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla.

  • [This does not seem to be necessary: Please check (i.e., by not performing this point initially) and report back.]
    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options: Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again after that).
  • You sure can omit steps which you have already carried out in the section "Preparation", but only exactly these steps. Missing out a significant step will let flashing Sailfish OS fail or result in an unusable Sailfish OS installation. Don't be afraid, you can usually simply flash the device again in this case.
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend way of booting a Sailfish OS recovery image:

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release
    Hence, if you have upgraded the SailfishOS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image. Never use an older recovery image than the installed SailfishOS release!
  • Do not flash the Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Don't be afraid of loosing a little space on your "home" volume, all user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).
3.3.2.a ... on devices / SailfishOS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / SailfishOS releases with home volume encryption

(Xperia 10 series since SailfishOS 3.2.1)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.3 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered much better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's installation guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but all preinstalled apps will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.

Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attach the device to an USB root hub, to which no other device is attached:

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, do not worry to use an USB port which also supports USB 3 (often colour coded in blue), you should still see the device being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub) between the device and your computer's USB port!


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla.

  • [This does not seem to be necessary: Please check (i.e., by not performing this point initially) and report back.]
    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options: Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again after that).
  • You sure can omit steps which you have already carried out in the section "Preparation", but only exactly these steps. Missing out a significant step will let flashing Sailfish OS fail or result in an unusable Sailfish OS installation. Don't be afraid, you can usually simply flash the device again in this case.
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend way of booting a Sailfish OS recovery image:

  • Always use a downloaded recovery image, which matches the installed Sailfish OS releaserelease.
    Hence, if you have upgraded the SailfishOS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image. Never use an older recovery image than the installed SailfishOS release!
  • Do not flash the Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Don't be afraid of loosing a little space on your "home" volume, all user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).
3.3.2.a ... on devices / SailfishOS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / SailfishOS releases with home volume encryption

(Xperia 10 series since SailfishOS 3.2.1)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.3 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered much better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's installation flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but all preinstalled apps will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.

Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attach the device to an USB root hub, to which no other device is attached:

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, do not worry to use an USB port which also supports USB 3 (often colour coded in blue), you should still see the device being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub) between the device and your computer's USB port!


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla.

  • [This does not seem to be necessary: Please check (i.e., by not performing this point initially) and report back.]
    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options: Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again after that).
  • You sure can omit steps which you have already carried out in the section "Preparation", but only exactly these steps. Missing out a significant step will let flashing Sailfish OS fail or result in an unusable Sailfish OS installation. Don't be afraid, you can usually simply flash the device again in this case.
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend way of booting a Sailfish OS recovery image:

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the SailfishOS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image. Never use an older recovery image than the installed SailfishOS release!
  • Do not flash the Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Don't be afraid of loosing a little space on your "home" volume, all user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).
3.3.2.a ... on devices / SailfishOS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / SailfishOS releases with home volume encryption

(Xperia 10 series since SailfishOS 3.2.1)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.3 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered much better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock. (which must be off).
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but all using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid) on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attach the device to an USB root hub, to which no other device is attached:

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, do not worry to use an USB port which also supports USB 3 (often colour coded in blue), you should still see the device being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub) hub, adapters) between the device and your computer's USB port!port, except for a single cable of at most 2 meters length.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla., starting with section 3 (you have already performed actions equivalent to the steps described in Jolla's sections 1 and 2).

  • [This does not seem to be necessary: Please check (i.e., by[Is an internet connection for altering the "developer options" really necessary?
    As I missed to check, you may (by trying to alter the "developer options" without internet access) and report back in a comment here.]
    not performing this point initially) and report back.]
    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options: (per Jolla's section 6 "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again after that).
  • You sure can omit steps which you have already carried out in the section "Preparation", but only exactly these steps. Missing out a significant step will let flashing Sailfish OS fail or result in an unusable Sailfish OS installation. Don't be afraid, you can usually simply flash the device again in this case.thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend way of booting a Sailfish OS recovery image:

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the SailfishOS Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image. image.
    Never use an older recovery image than the installed SailfishOS Sailfish OS release!
  • Do not flash the Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Don't be afraid of loosing a little space on your "home" volume, all user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).
3.3.2.a ... on devices / SailfishOS Sailfish OS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / SailfishOS Sailfish OS releases with home volume encryption

(Xperia 10 series since SailfishOS 3.2.1)Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.3 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered much better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock (which must be off).
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attach the device Attaching your Xperia to an USB "USB root hub, hub" (internal to your computer), to which no other device is attached:attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Plug the device into Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without any internal USB devices attached (that (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in their the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do not worry to use try an USB port which also supports USB 3 (often colour coded in blue), you blue): You should still see the device your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your device, Xperia, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub, adapters) between the device your Xperia and your computer's USB port, except for a single cable of at most 2 meters length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with section 3 "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections 1 and 2).before).

  • [Is an internet connection for altering the "developer options" really necessary?
    As I missed to check, you may (by trying to alter the "developer options" without internet access) and report back in a comment here.]

    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section 6 "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file recovery.imghybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the generally recommend general way of booting a Sailfish OS recovery image:image on devices reflashed from Android.

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash the an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Don't Do not be afraid of loosing a little space on your "home" volume, all your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page).man-page) then.
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.3

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered much better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and time in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock (which must be off)..
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single cable of at most 2 meters length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • [Is an internet connection for altering the "developer options" really necessary?
    As I missed to check, you may (by trying to alter the "developer options" without internet access) and report back in a comment here.]

    An Xperia needs internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home 10G
  3. e2fsck -f /dev/sailfish/home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home
  9. e2fsck -f /dev/sailfish/home
  10. resize2fs /dev/sailfish/root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • SailfishOS Wiki: https://sailfishos.org/wiki/SailfishOS"Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered much better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC).TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date and date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single cable of at most 2 meters length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • [Is an internet connection for altering the "developer options" really necessary?
    As I missed to check, you may (by trying to alter the "developer options" without internet access) and report back in a comment here.]

    An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is compromised comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption
  1. e2fsck -f /dev/sailfish/home/dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/sailfish/home /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/sailfish/home/dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/sailfish/home/dev/mapper/sailfish-home
  9. e2fsck -f /dev/sailfish/home/dev/mapper/sailfish-home
  10. resize2fs /dev/sailfish/root/dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= 7500M) -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/sailfish/home/dev/mapper/crypt-home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/sailfish/root/dev/mapper/sailfish-root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman.Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, if it turned out to connect to an USB 3 root hub when plugged into that port and there is no other port available which is attached to a bus with no other devices.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single cable of at most 2 meters length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option below, because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption
  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/mapper/crypt-home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/mapper/sailfish-root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of  of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly walk browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achive achieve the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port.port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, or if it turned out to connect to you are really desperate an USB 3 root hub when plugged into that port connected with an USB and2 there is no other port available which is attached to a bus with no other devices.cable to your computer.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single cable USB 2 cable of at most 2 meters length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75-l -x75 option below, for the lvm lvresize  sailfish/home command (below), because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M-L -x500M instead (see lvm man-page) then.
    If the "root" volume size is not 2500 MiB or its number of extents the not 625, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperias X and XA2 flashed with Sailfish OS 3.2.1 or older, regardless to which Sailfish OS release this Xperia was subsequently upgraded per OTA / "Sailfish OS updates")

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) (= -5500M) for a 8000 MiB, -375 extents (= -1500M) (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(Xperia (All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) (= -5500M) for a 8000 MiB, -375 extents (= -1500M) (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/mapper/crypt-home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/mapper/sailfish-root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart preloaded services" in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

  • https://together.jolla.com/question/195850/guide-creating-partitions-on-sd-card-optionally-encrypted/
  • https://together.jolla.com/question/203539/guide-externalising-android_storage-and-other-directories-files-to-sd-card/

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, or if you are really desperate an USB 3 hub connected with an USB 2 cable to your computer.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable of at most 2 meters length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer.computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option for the lvm lvresize  sailfish/home command (below), because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
    If the "root" volume size is not 2500 MiB or its number of extents the not 625, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperias X and XA2 flashed with Sailfish OS 3.2.1 or older, regardless to which Sailfish OS release this Xperia was subsequently upgraded per OTA / "Sailfish OS updates")

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/mapper/crypt-home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/mapper/sailfish-root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select "Restart Restart preloaded services" services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license program.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, or if you are really desperate an USB 3 hub connected with an USB 2 cable to your computer.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable of at most 2 meters metres length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") [1], which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option for the lvm lvresize  sailfish/home command (below), because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
    If the "root" volume size is not 2500 MiB or its number of extents the not 625, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperias X and XA2 flashed with Sailfish OS 3.2.1 or older, regardless to which Sailfish OS release this Xperia was subsequently upgraded per OTA / "Sailfish OS updates")

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. mkdir /backup
  3. cd /backup
  4. cryptsetup -v luksDump /dev/mapper/sailfish-home | tee luksdump_sailfish-home.txt
  5. cryptsetup -v --header-backup-file luks-header-backup_sailfish-home.bin luksHeaderBackup /dev/mapper/sailfish-home
  6. cd /
  7. e2fsck -f /dev/mapper/crypt-home
  8. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  9. e2fsck -f /dev/mapper/crypt-home
  10. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  11. cryptsetup close crypt-home
  12. lvm lvchange -a n sailfish/home
  13. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  14. lvm lvresize -l +100%FREE sailfish/root
  15. lvm lvchange -a y sailfish/home
  16. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  17. cryptsetup resize /dev/mapper/sailfish-home
  18. resize2fs -f /dev/mapper/crypt-home
  19. e2fsck -f /dev/mapper/crypt-home
  20. cryptsetup close crypt-home
  21. resize2fs /dev/mapper/sailfish-root
  22. Hit Ctrl-D (or type exit)
  23. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programprogramme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, or if you are really desperate an USB 3 hub connected with an USB 2 cable to your computer.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable of at most 2 metres length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your language, preferably English UK or English US (unfortunately English EU aka English DK is not available)
  2. Enter new security code
  3. Enable WLAN
  4. Select time and date
  5. Enter your Jolla Store credentials to log in
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC") ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option for the lvm lvresize  sailfish/home command (below), because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
    If the "root" volume size is not 2500 MiB or its number of extents the not 625, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperias X and XA2 flashed with Sailfish OS 3.2.1 or older, regardless to which Sailfish OS release this Xperia was subsequently upgraded per OTA / "Sailfish OS updates")

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit)
  18. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity and reconnecting without entering the PIN connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)
  • Connect your Xperia to a USB port, which is attached to this bus
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, or if you are really desperate an USB 3 hub connected with an USB 2 cable to your computer.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable of at most 2 metres length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select your a language, preferably English UK or English US (unfortunately English EU aka English DK is not available)available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security codecode.
  3. Enable WLANWLAN.
  4. Select time and datedate.
  5. Enter your Jolla Store credentials to log inin.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option for the lvm lvresize  sailfish/home command (below), because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
    If the "root" volume size is not 2500 MiB or its number of extents the not 625, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperias Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or older, regardless to lower which were upgraded to Sailfish OS release this Xperia was subsequently upgraded 3.3.0 or higher per OTA / "Sailfish OS updates")updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)
  12. Select 2 for Reboot
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All (All Xperias newly flashed with Sailfish OS 3.3.0 or higher, higher, Xperia 10 series since Sailfish OS 3.2.0)3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit)
  18. Select 2 for Reboot

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialization)initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal windowwindow.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else)else).
  • Connect your Xperia to a USB port, which is attached to this busbus.
  • For example, an Xperia X on bus 003 looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, or if you are really desperate an USB 3 hub connected with an USB 2 cable to your computer.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable of at most 2 metres length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data for that (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menumenu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, do not use the -l -x75 option for the lvm lvresize  sailfish/home command (below), because the values are calculated for a (logical) extent size of 4 MiB, aiming at allocating an even number of extents. You may resort to use the option -L -x500M instead (see lvm man-page) then.
    If the "root" volume size is not 2500 MiB or its number of extents the not 625, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit)).
  12. Select 2 for Reboot Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit)).
  18. Select 2 for Reboot Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window.window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a an USB port, which is attached to this bus.
  • For Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an USB root hub with other devices, do try an USB port which also supports USB 3 (often colour coded in blue): blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to an USB 2 root hub.
    If it turns out to be logically attached to an USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an USB 2 hub between an USB 3 port and your Xperia, or if you are really desperate an USB 3 hub connected with an USB 2 cable to your computer.
  • In general, do not put anything (e.g. an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable of at most 2 metres length.

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch on WLAN (preferred for privacy) or alternatively mobile data on for that this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 MiB) GiB) aim at a "root" LVM size of 4000 MiB for regular use respectively 6000 MiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB to these values, because the "home" volume size is well above 38 at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB.MiB or just aim at 10000 MiB (the maximum for this scheme, see next point).
  • As 10000 MiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at 0: X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change in the future, for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB, MiB or the "root" volume is not comprised of 625 extents, do not use the -l -x75-l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for a (logical) extent size of 4 MiB, these preconditions, aiming at allocating an even number of extents. You may might resort to use the option -L -x500M-L -xxxxM instead (see lvm man-page) (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB or its number of extents the not 625, MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -875 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -875 extents (= -3500M) for a 6000 MiB, -1375 extents (= -5500M) for a 8000 MiB, -375 extents (= -1500M) for a 4000 MiB or -1875 extents (= -7500M) for a 10000 MiB "root" volume size:
    lvm lvresize -l -1375 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the app "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to an a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to an a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share an a USB root hub with other devices, do try an a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to an a USB 2 root hub.
    If it turns out to be logically attached to an a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting an a USB 2 hub between an a USB 3 port and your Xperia, or if you are really desperate an a USB 3 hub connected with an a USB 2 cable to your computer.
  • In general, do not put anything (e.g. (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length.length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish XSailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4000 MiB 4 GiB for regular use respectively 6000 MiB 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2000 MiB 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2000 MiB 2 GiB or just aim at 10000 MiB 10 GiB (the maximum for this scheme, see next point).
  • As 10000 MiB 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10000 MiB 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -875 -911 extents (= -3500M) (= -3644M) for a 6000 MiB, -1375 6 GiB, -1423 extents (= -5500M) (= -5692M) for a 8000 MiB, -375 8 GiB, -399 extents (= -1500M) (= -1596M) for a 4000 MiB 4 GiB or -1875 -1935 extents (= -7500M) (= -7740M) for a 10000 MiB 10 GiB "root" volume size:
    lvm lvresize -l -875 -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -875 -911 extents (= -3500M) (= -3644M) for a 6000 MiB, -1375 6 GiB, -1423 extents (= -5500M) (= -5692M) for a 8000 MiB, -375 8 GiB, -399 extents (= -1500M) (= -1596M) for a 4000 MiB 4 GiB or -1875 -1935 extents (= -7500M) (= -7740M) for a 10000 MiB 10 GiB "root" volume size:
    lvm lvresize -l -1375 -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Install the Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store app is working fine (you will need it a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with an a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share a USB root hub with other devices, do try a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to a USB 2 root hub.
    If it turns out to be logically attached to a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting a USB 2 hub between a USB 3 port and your Xperia, or if you are really desperate a USB 3 hub connected with a USB 2 cable to your computer.
  • In general, do not put anything (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4 GiB for regular use respectively 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2 GiB or just aim at 10 GiB (the maximum for this scheme, see next point).
  • As 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store is working fine (you will need a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android apps support"):App Support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android app support" App Support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share a USB root hub with other devices, do try a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to a USB 2 root hub.
    If it turns out to be logically attached to a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting a USB 2 hub between a USB 3 port and your Xperia, or if you are really desperate a USB 3 hub connected with a USB 2 cable to your computer.
  • In general, do not put anything (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN.WLAN and log in to a WLAN network.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not select the "Store" app (actually a special Aptoide client version; skip its installation per "Next" without selecting it), if it is offered (since Sailfish OS 3.3.0), because of the security issues using Aptoide bears plus the multiple security breaches Aptoide had. See also section 4.4.4, while the advice in section 4.1 does not affect this "Store" app, because it is a specially built version of the Aptoide client app (and hence can be installed and updated in paralell to the original Aptoide client).
  9. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4 GiB for regular use respectively 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2 GiB or just aim at 10 GiB (the maximum for this scheme, see next point).
  • As 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store is working fine (you will need a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android App Support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android App Support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share a USB root hub with other devices, do try a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to a USB 2 root hub.
    If it turns out to be logically attached to a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting a USB 2 hub between a USB 3 port and your Xperia, or if you are really desperate a USB 3 hub connected with a USB 2 cable to your computer.
  • In general, do not put anything (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN and log in to a WLAN network.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. Do not select the "Store" app (actually a special Aptoide client version; skip its installation per "Next" without selecting it), if it is offered (since Sailfish OS 3.3.0), because of the security issues using Aptoide bears plus the multiple security breaches Aptoide had. See also section 4.4.4, while the advice in section 4.1 does not affect this "Store" app, because it is a specially built version of the Aptoide client app (and hence can be installed and updated in paralell to the original Aptoide client)..
  9. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4 GiB for regular use respectively 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2 GiB or just aim at 10 GiB (the maximum for this scheme, see next point).
  • As 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store is working fine (you will need a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android App Support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android App Support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share a USB root hub with other devices, do try a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to a USB 2 root hub.
    If it turns out to be logically attached to a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting a USB 2 hub between a USB 3 port and your Xperia, or if you are really desperate a USB 3 hub connected with a USB 2 cable to your computer.
  • In general, do not put anything (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN and log in to a WLAN network.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference.
  8. preference (only offered here, if you are entitled for it).
    Do not select the "Store" app (actually a special Aptoide client version; skip its installation per "Next" without selecting it), version), if it is offered here (since Sailfish OS 3.3.0), because of the security issues using Aptoide bears plus the multiple security breaches Aptoide had. See also section 4.4.4.
  9. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4 GiB for regular use respectively 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2 GiB or just aim at 10 GiB (the maximum for this scheme, see next point).
  • As 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store is working fine (you will need a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android App Support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android App Support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, plus never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share a USB root hub with other devices, do try a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to a USB 2 root hub.
    If it turns out to be logically attached to a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting a USB 2 hub between a USB 3 port and your Xperia, or if you are really desperate a USB 3 hub connected with a USB 2 cable to your computer.
  • In general, do not put anything (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN and log in to a WLAN network.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference (only offered here, if you are entitled for it).
    Do not select the "Store" app (actually a special Aptoide client version), if it is offered here (since Sailfish OS 3.3.0), because of the security issues using Aptoide bears plus the multiple security breaches Aptoide had. See also section 4.4.4.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4 GiB for regular use respectively 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2 GiB or just aim at 10 GiB (the maximum for this scheme, see next point).
  • As 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store is working fine (you will need a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android App Support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android App Support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing unchecked apps from somewhere, somewhere (specifcally "someone"), plus (when doing this manually) never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

  • TJC: https://together.jolla.com/questions/
    Mind that the Askbot release running TJC has a couple of flaws.
    E.g., Askbot's search function returns many seemingly unrelated results, though the search suggestions (i.e., in its JavaScript-based drop-down list) are quite spot on although usually sorted from old (at the top) to new (at the bottom)!
  • Jolla's Zendesk instance: https://jolla.zendesk.com/
  • Community documentation:
    e.g. https://github.com/sailfishos-community/awesome-sailfishos
  • TMO: https://talk.maemo.org/
  • "Sailfish OS cheat sheet"
  • Developer documentation (link list)

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share a USB root hub with other devices, do try a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to a USB 2 root hub.
    If it turns out to be logically attached to a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting a USB 2 hub between a USB 3 port and your Xperia, or if you are really desperate a USB 3 hub connected with a USB 2 cable to your computer.
  • In general, do not put anything (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN and log in to a WLAN network.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference (only offered here, if you are entitled for it).
    Do not select the "Store" app (actually a special Aptoide client version), if it is offered here (since Sailfish OS 3.3.0), because of the security issues using Aptoide bears plus the multiple security breaches Aptoide had. See also section 4.4.4.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4 GiB for regular use respectively 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2 GiB or just aim at 10 GiB (the maximum for this scheme, see next point).
  • As 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store is working fine (you will need a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android App Support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android App Support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing apps from somewhere (specifcally "someone"), plus (when doing this manually) never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).

Guide: Installing Sailfish X on Xperias

Guide for installing Sailfish X on Sony Xperias

This guide aims at setting up an Xperia step by step, extending Jolla's flashing guide by preparatory and follow up measures, plus specific considerations WRT privacy.


Table of content

1 Preparation

1.1 First steps

  1. Buy a Sony Xperia model, which is supported by Sailfish OS via the Sailfish X end user license programme.
    For more details see available devices supported by Sailfish OS.
  2. Unbox your Xperia, but do not insert a SIM or SD card yet.
  3. Start your Xperia by pressing the power button for a few seconds.
    BTW, it should be charged between 40% and 55% when new.
  4. Choose No, Off, Cancel, Skip, Disable, Dismiss, Decline, Deny for really everything during the initial setup:
    Google account, WLAN, Bluetooth, GPS, Mobile network, Sony support, device PIN and fingerprint (because that would trigger the device encryption unnecessarily) etc.!
  5. Do not upgrade Android!
    Otherwise you may not be able to install Sailfish OS.
    Furthermore there is zero benefit for the Sailfish OS installation later on, as it uses its own firmware binaries (which you will download later) etc.
  6. Thoroughly browse through the Settings subsections and switch off everything with regard to online, location and other potentially privacy relevant functions / services. Pay attention to not accidentally switch on something which may receive or transmit data, as many functions / services are off by default.
    Note that you have to go online in part 2 of the preparation, thus do this diligently.
    • Pay special attention to the settings in the Google subsection.
    • Note that settings might even be "logically inverted", e.g. setting Settings -> Google -> Ads -> Opt out of Ads Personalisation to on actually switches the personalised ads off!
  7. Check your device hardware with Sony's device test tool per Settings -> System -> About phone -> Support -> Decline -> Run all tests:
    • The GPS test will fail, even if "location access" is granted (hence don't!), as it runs too briefly to obtain a GPS fix without A-GPS.
      This test will be performed in a different manner, later.
    • The "Nearby" test will fail without a location fix, location access by the Sony test tool and Google Chrome, plus acknowledging the use of Google Chrome.
      Skip it!
  8. Go to Settings -> System -> Date & Time and switch off both "Automatic date & time" and "Automatic timezone". Then set the correct date, time and timezone in order to obtain a GPS fix (in the next step) reasonably quick.
    Also switch on Settings -> Lock screen & security -> Privacy: Location -> Use location on for the next step.
  9. Open the Service menu as described by Sony (by entering *#*#7378423#*#* in the dialler app).
    • Service info -> Configuration -> Rooting status: must state "Bootloader unlock allowed: Yes".
    • Service tests -> GPS runs indefinitely and should obtain a GPS fix within approximately 10 minutes.
    • You may perform other tests in Service tests, but many of them are tedious.
    • You may also look at other information in Service info, e.g. SIM lock.
  10. Switch Settings -> Lock screen & security -> Privacy: Location -> Use location off again.
  11. Go back to Settings -> System -> About phone
    • Compare the IMEI(s) with the ones on the original cardboard box from Sony (the IMEI(s) are on a printed label at its small side): They ought to be the same. If not, you bought your Xperia from a likely fraudulent seller.
    • Tap seven times on Settings -> About phone -> Build number to check if you can enable the "Developer mode". If this fails, the device is locked and Sailfish OS cannot be installed.
  12. Switch your Xperia off.

1.2 Further preparation (modem initialisation)

  1. Insert a working SIM card, preferably the one you will be using later.
  2. Start your Xperia.
  3. Enter the PIN of your SIM card.
  4. Let the Xperia rest for at least 10 minutes at a location with at least medium mobile network reception.
    • The SIM card might reboot once or twice, resulting in a brief loss of mobile network connectivity; you may have to enter the SIM-PIN again.
    • You should perform a telephone call after waiting for 10 minutes to check that this is working fine.
    • You may additionally switch on mobile data and check internet access, but using any of the preinstalled apps for that will likely push device specific data (i.e., privacy relevant data) to Sony, Google etc.
      Hence you may as well skip this mobile data test!
      Or alternatively (but tediously) transfer a privacy protecting network speed test app (e.g. download the latest APK of Speedtest from F-Droid on your PC) per Bluetooth, install it (needs "untrusted sources" enabled) and use that.
      When done, switch mobile data (plus Bluetooth and "untrusted sources") off again.


Up to this point ...

  • your Xperia did not have a chance to transmit privacy relevant (e.g., device specific or personal) data to a third party, except for modem specific and SIM card data to your mobile network provider (which is unavoidable when using a SIM card).
  • all measures are fully reversible by performing a "factory reset" of Android: After that your Xperia will be in exactly the state, when you received it (if it was new or factory reset before).

2 Flashing Sailfish OS

Attaching your Xperia to a "USB root hub" (internal to your computer), to which no other device is attached (neither internally or externally):

  • Execute lsusb in a terminal window, without having your Xperia connected.
  • Look for a bus which solely has a Linux Foundation 2.0 root hub attached (i.e., nothing else).
  • Connect your Xperia to a USB port, which is attached to this bus.
  • Execute lsusb again; for example, an Xperia X on bus 003 then looks like this:
    Bus 003 Device 015: ID 05c6:0afe Qualcomm, Inc. Xperia X
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
  • Under Windows you should be able to achieve the same by the help of the device manager's tree view.

Note that:

  • If there are no buses without internal USB devices attached (this is the case for many notebooks), you may disable those devices (e.g. cameras, card readers) in the firmware (UEFI- / "BIOS"-) setup and retry then.
  • Although pure USB 2 ports are preferable, if there are none or these share a USB root hub with other devices, do try a USB port which also supports USB 3 (often colour coded in blue; on Intel machines lsusb may also show a "rate adaptor" attached to this bus, which is harmless): You should still see your Xperia being attached to a USB 2 root hub.
    If it turns out to be logically attached to a USB 3 root hub then, flashing will likely fail, hence use a different USB port or try to temporarily force all USB 3 ports to USB 2 mode.
    As a last resort measure, you may try putting a USB 2 hub between a USB 3 port and your Xperia, or if you are really desperate a USB 3 hub connected with a USB 2 cable to your computer.
  • In general, do not put anything (e.g., an external USB hub, adapters) between your Xperia and your computer's USB port, except for a single USB 2 cable (or a USB 3 cable plugged into a pure USB 2 port) of at most 2 metres length. The USB cable which came with your Xperia should work fine (at least at a USB 2 port).

After having determined a suitable USB port for the subsequent unlocking and flashing, unplug your Xperia from the USB cable.


Diligently follow the model specific (and host OS specific) guide for flashing Sailfish X by Jolla, starting with the section "Install the fastboot driver to your computer" (you have already performed actions equivalent to the steps described in Jolla's first sections before).

  • An Xperia needs an internet connection for altering the "Developer options" (after enabling them) in Settings -> System -> Advanced -> Developer options (per Jolla's section "Enable developer options on your phone"): Deliberately switch WLAN (preferred for privacy) or alternatively mobile data on for this (and off again thereafter).
  • Note that the unavoidable steps of altering the "Developer options" and (even more so) of unlocking the bootloader are not fully reversible.

For details and troubleshooting, covering the whole section 2 of this guide, see also Jolla's "Checklist for issues in installing Sailfish X".

3 Basic configuration of Sailfish OS

3.1 First boot ("initial bring-up")

  1. Select a language, preferably English UK or English US (unfortunately English EU aka English DK is not available).
    Note that you can add (and remove) arbitrary languages (localisations, dictionaries and keyboard layouts) later (after the initial setup) and Sailfish OS knows no "primary" language.
  2. Enter a new security code.
  3. Enable WLAN and log in to a WLAN network.
  4. Select time and date.
  5. Enter your Jolla Store credentials to log in.
  6. Initial selection of Jolla provided apps:
    • Do not select Jolla's Weather app (actually by Foreca), because MeeCast is a better, Open Source and privacy conscious alternative, which can be installed later per Storeman.
    • You may select Exchange Active Sync (EAS) support depending on your needs.
    • Do select everything else for installation, even if you think you will not need them: Some other apps depend on them being installed, they do nothing if not used and they are all quite small.
    • If the XT9 support is not available (free and community versions of Sailfish OS), install Presage per Storeman later on.
  7. Do select Android App Support, depending on your preference (only offered here, if you are entitled for it).
    Do not select the "Store" app (actually a special Aptoide client version), if it is offered here (since Sailfish OS 3.3.0), because of the security issues using Aptoide bears plus the multiple security breaches Aptoide had. See also section 4.4.4.
  8. Do not set up the fingerprint sensor yet ("Skip"), as it may result in issues doing it now. You can perform this action any time later.

All these apps can also be installed or uninstalled (and reinstalled) later per the Jolla Store app, but privacy relevant data cannot be recalled once given away.
Note that most of them are proprietary licensed by Jolla.

3.2 Enabling "developer mode"

Optional, but absolutely recommended!

  1. Switch on Settings -> Developer tools -> Developer mode, followed by also switching on Remote connection there and setting a root password of your choice.
  2. Wait for the Terminal app to become installed and open it.
  3. Execute devel-su in the Terminal and enter your root password.
  4. If becoming root in the Terminal went fine, enter Ctrl-D twice or type exit twice (or just brutally close the Terminal app).

3.3 Increasing the "root" LVM volume size

Optional, although strongly recommended.

There are multiple descriptions of the issues the tiny (2500 MiB) default "root" volume size might cause later at Together.Jolla.com ("TJC": [1], [2], [3], [4] etc.), which affects all devices since Sailfish OS started using LVM (i.e., all since the Jolla C).

3.3.1 Booting a Sailfish OS recovery image per fastboot boot

  1. Locate the file hybris-recovery.img in the unpacked Sailfish X directory on your host computer.
  2. Power down your Xperia and connect its USB cable to your host computer (but not the Xperia, yet). Bring your Xperia into recovery boot mode be pressing the "Volume up" button when plugging in your Xperia to USB. Release the button when its LED has become blue.
  3. Execute fastboot boot hybris-recovery.img on your host computer. You may need to execute the fastboot command as root, e.g. by prepending a sudo.
  4. Wait until booting the recovery image finished: It displays a message in a very tiny font at the top of your Xperia's screen.
  5. Execute telnet 10.42.66.66 on your host computer.

This is the general way of booting a Sailfish OS recovery image on devices reflashed from Android.
For details and troubleshooting, see Jolla's Zendesk article "Xperia devices: How to use the Recovery Mode".

  • Always use a downloaded recovery image, which matches the installed Sailfish OS release.
    Hence, if you have upgraded the Sailfish OS installation on the device per OTA update and want to use the recovery image, do download the recent installation image, unpack it and boot that recovery image.
    Never use an older recovery image than the installed Sailfish OS release!
  • Do not flash an Xperia's recovery partition with it (which is technically possible and basically working), as this recovery image will be outdated and not matching anymore after a Sailfish OS update on your Xperia.
    Furthermore you lose Sony's original Android recovery as a fallback by overwriting it with a Sailfish OS recovery.

3.3.2 Shrinking the "home" LVM volume and extending the "root" one

Do not be afraid of loosing a little space on your "home" volume, your user data (music, pictures / photographs, offline maps, videos etc.) can be seamlessly outsourced to an SD card.

  • For devices with 32 GiB internal FLASH memory (resulting in an original "home" volume size of approximately 20 GiB) aim at a "root" LVM size of 4 GiB for regular use respectively 6 GiB if you plan to install a lot of native software (Android APKs are installed on the "home" volume).
  • For devices with 64 GiB of internal FLASH memory you might add additional 2 GiB to these values, because the "home" volume size is at least 37 GiB (even after resizing).
  • If you really plan to install gcc and compile software on the device (which is technically feasible, but you should rather use the SailfishOS SDK on an x86 computer for that), add another 2 GiB or just aim at 10 GiB (the maximum for this scheme, see next point).
  • As 10 GiB "root" LVM volume size is very spacious, more does not seem to make any sense. Thus the values chosen below only work for increasing the "root" volume size to at most 10 GiB (on both, 32 GiB and 64 GiB devices).
  • For 64 GiB devices, the values of 10G and 22000000 (below) might be tripled to 30G and 66000000 in order to reduce unnecessary shrinking and expanding later on.
  • When executing the steps of either section 3.3.2 (a or b), you may encounter the output (e.g. of a lvm lvresize command):
    /dev/mmcblk0rpmb: read failed after 0 of 4096 at X: Input/output error
    This specific error message is harmless and rather a bug.
    Mind that any other error message likely constitutes a real error.
  1. Select 3 for Shell in the recovery menu.
  2. Check per lvm lvdisplay that the "root" volume is comprised of 625 (logical) extents each 4 MiB in size. Note that while the extent size on all devices using LVM has been 4 MiB, that may change for future devices, as the (physical) extent size shall be equal or larger than the erase block size of the device's eMMC FLASH memory (see cat /sys/block/mmcblk0/device/preferred_erase_size and cat /sys/block/mmcblk0/queue/discard_granularity). Future device's eMMCs may have a larger erase block size, hopefully Jolla then increases the physical and consequently the logical extent size accordingly.
    If the extent size is not 4 MiB or the "root" volume is not comprised of 625 extents, do not use the -l -xxxx option for the lvm lvresize  sailfish/home command (below), because the values are calculated for these preconditions, aiming at allocating an even number of extents. You might resort to use the option -L -xxxxM instead (with one of the values given in parentheses; see lvresize man-page for details) then.
    If the "root" volume size is not 2500 MiB, you need to recalculate the value for the lvm lvresize -l -xxxx sailfish/home command (below).
3.3.2.a ... on devices / Sailfish OS releases without home volume encryption

(All Xperia X and XA2 with Sailfish OS 3.2.1 or lower installed, plus those Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower which were upgraded to Sailfish OS 3.3.0 or higher per OTA / "Sailfish OS updates" but the device encryption was not activated)

  1. e2fsck -f /dev/mapper/sailfish-home
  2. Shrink size of "home" file-system to 10 GiB (you might use 30G on 64 GiB devices):
    resize2fs /dev/mapper/sailfish-home 10G
  3. e2fsck -f /dev/mapper/sailfish-home
  4. lvm lvchange -a n sailfish/home
  5. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -911 sailfish/home
  6. lvm lvresize -l +100%FREE sailfish/root
  7. lvm lvchange -a y sailfish/home
  8. resize2fs /dev/mapper/sailfish-home
  9. e2fsck -f /dev/mapper/sailfish-home
  10. resize2fs /dev/mapper/sailfish-root
  11. Hit Ctrl-D (or type exit).
  12. Select 2 for Reboot.
3.3.2.b ... on devices / Sailfish OS releases with home volume encryption

(All Xperias newly flashed with Sailfish OS 3.3.0 or higher, Xperia 10 series since Sailfish OS 3.2.0, plus Xperia X and XA2 originally flashed with Sailfish OS 3.2.1 or lower on which the device encryption was activated after being upgraded to Sailfish OS 3.3.0 or higher)

  1. Open the cryptsetup container (using your security code) per
    cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  2. e2fsck -f /dev/mapper/crypt-home
  3. Shrink size of "home" file-system to 10 GiB (you might use 30G and 66000000 (below) on 64 GiB devices):
    resize2fs -f /dev/mapper/crypt-home 10G
  4. e2fsck -f /dev/mapper/crypt-home
  5. Shrink size of cryptsetup-container to 10,49 GiB (22000000 sectors á 512 Bytes; you might use 66000000 = 31,47 GiB on 64 GiB devices):
    cryptsetup resize -b 22000000 /dev/mapper/sailfish-home
  6. cryptsetup close crypt-home
  7. lvm lvchange -a n sailfish/home
  8. Shrink "home" volume by -911 extents (= -3644M) for a 6 GiB, -1423 extents (= -5692M) for a 8 GiB, -399 extents (= -1596M) for a 4 GiB or -1935 extents (= -7740M) for a 10 GiB "root" volume size:
    lvm lvresize -l -1423 sailfish/home
  9. lvm lvresize -l +100%FREE sailfish/root
  10. lvm lvchange -a y sailfish/home
  11. cryptsetup luksOpen /dev/mapper/sailfish-home crypt-home
  12. cryptsetup resize /dev/mapper/sailfish-home
  13. resize2fs -f /dev/mapper/crypt-home
  14. e2fsck -f /dev/mapper/crypt-home
  15. cryptsetup close crypt-home
  16. resize2fs /dev/mapper/sailfish-root
  17. Hit Ctrl-D (or type exit).
  18. Select 2 for Reboot.

4 Installing software

  • Always check when the latest version of an app was released, regardless which app store you are using: If it is from before 2017 it likely does not run well.
  • Also always read an app's description in any of the store client apps thoroughly before installing it.
  • Additionally read the recent comments of an app in the Jolla Store client app respectively Storeman (for apps at OpenRepos.net).

4.1 Using the Jolla Store

Open the Jolla Store app and install the "File Browser" (by Kari) to check if the Jolla Store is working fine (you will need a file browser sooner or later, anyway).

Advice for users of the Android runtime environment ("Android App Support"):
Do not install any Android apps from the Jolla Store (those with their icons labeled with a small, overlayed Android, plus the line "Android app" atop their description), not even the app stores' client apps offered there (F-Droid, Aptoide, Yandex etc.), otherwise you may later run into troubles when updating these apps.
Alternatively you may solely install Android apps from the Jolla Store (and never use any other Android store app), which is not really feasible (due to the small and awkward selection of Android apps in the Jolla Store).

4.2 Using OpenRepos.net (Sailfish OS community app repositories)

Optional, although strongly recommended.

  1. Download the RPM (for armv7hl) of the current Storeman release from OpenRepos per the Sailfish OS Browser:
    https://openrepos.net/content/osetr/storeman
  2. Enable Settings -> Untrusted software -> Allow untrusted software.
  3. Start the File Browser app and go to Downloads. Tap on the downloaded Storeman RPM and select Install in the top pulley.
  4. Disable Settings -> Untrusted software -> Allow untrusted software again.

4.3 Installing Patchmanager

Optional, although recommended.

  1. Install Patchmanager 3 (by coderus) per Storeman:
    Search for "Patchmanager" per Storeman's top pulley, select "Patchmanager 3", enable its repository (per top pulley) and ultimately install it.
  2. Reboot your Xperia.
  3. Browse Patchmanager's web-catalog in Settings -> Patchmanager -> (top pulley) Web catalog and install a Patch which sounds interesting for you and which is compatible with the installed Sailfish OS release.
    Go back to Patchmanager's main page and apply this Patch there.
    Select Restart preloaded services in the top pulley and see what it does.

4.4 Installing Android app stores' client apps

This requires the Android runtime environment ("Android App Support" / AlienDalvik) being installed and running, which is only available for paid Sailfish X licenses.

  • Note that installing APKs on Sailfish OS does not require "Untrusted sources" enabled, because the Android runtime environment with all its installed APKs is separated from the Sailfish OS installation proper and its native apps.
  • Also note that APKs (Android apps) must be built for the ARMv7-A architecture (32 bit), because Sailfish OS currently still solely uses 32 bit user space binaries.

4.4.1 F-Droid

  1. Download the recent F-Droid client app in the Sailfish OS Browser:
    https://f-droid.org/
  2. Start the File Browser app and go to Downloads.
    Tap on the downloaded F-Droid client APK and select Install in the top pulley.

4.4.2 A proper Android file-manager

As the "AlienDalvik" Android runtime environment does not provide any preinstalled apps, one needs a proper file-manager for Android to serve Android file intents:
Start the F-Droid client app (if it is its first start ever on this device, wait a couple of minutes for it to synchronise its repositories) and install the OI File Manager.

4.4.3 Google Play Store per Aurora Store / YALP Store app

For accessing the Google Play Store, install the Aurora Store app per F-Droid client app on all Xperias, except the Xperia X (for which the YALP Store app works, also available per F-Droid client app).
Note that Google regularly disables the "shared accounts" these apps offer to use, so you might need to enter the account information of an own Google account.

4.4.4 Other Android app sources

Other Android apps stores or manually downloading and installing APKs is not recommended due the negative security implications: Downloading and installing apps from somewhere (specifcally "someone"), plus (when doing this manually) never being informed about their updates.
If you really want to pursue this, start with the app ApkTrack from F-Droid.

5 Further recommendations

5.2 Guides for utilising an SD card to consider

6 Further guidance and sources of information

For further information always search first at

For issues with a device using a paid license, you may open a Zendesk support request after having exhausted searching aforementioned sources of information and including everything relevant you found and have tried.


Have fun with Sailfish OS on your Xperia!

P.S.: The original source of this guide is at Gitlab.com and is rendered better there (e.g., its formatting, especially enumerations across paragraphs) than at TJC (except for the TOC and the line spacings in this footer).