Adaptations/libhybris/Install SailfishOS for fp2

Notes for installing Sailfish OS on the Fairphone 2 (fp2).

Hardware Support

 * }

Status
Items marked with FIX have a known fix and will be included in next release.
 * Jolla Store works.
 * Double tap to wake does not work. (Probably not supported by firmware)
 * Please report if there are still random failures of finding resolutions for secondary camera by camera module detection service during installation or update.
 * To solve the issue remove /etc/droid-cameradetect-module-main.conf and /etc/droid-cameradetect-module-front.conf and run "systemctl restart droid-cameradetect"
 * Repeat the previous instruction until both cameras work (configuration is at /etc/dconf/db/vendor.d/jolla-camera-hw.txt and the validity of resolutions for secondary camera can be checked also manually)

Requirements for installation

 * Opensource OS 18.04 Android from Fairphone.
 * Latest Sailfish OS release: http://sailfish-fairphone.dy.fi/images/fp2/sailfishos-fp2-sibon-release-4.3.0.15-release4.zip.
 * Computer with fastboot installed for fastboot installation.

Installation steps

 * If you want to update from an existing release, check the OTA update section below.


 * If instead you want to use Sailfish OS installation zip, all data in Sailfish OS will be removed, so backup everything you might need.
 * Calibrate proximity sensor in Android before installing Sailfish OS.
 * Requires Fairphone Opensource OS 18.04 https://storage.googleapis.com/fairphone-updates/6cb84543-9614-425d-9ab4-9e80baca2b8f/fp2-sibon-18.04.1-manual.zip (or Fairphone OS 18.04), not tested on other releases.
 * Install the required Android version (if not installed already) using fastboot and the steps below.
 * Extract filesystem images from Android zip on your computer.
 * Enter fastboot mode on your phone by turning off device, when device is powered down press and hold volume down button and then plug USB cable.
 * Open a terminal on your computer and go to the folder where you extracted the file system images.
 * Check that the device is detected with fastboot devices
 * ./flash.sh
 * Flash script will automatically reboot the device but you don't need to boot to Android, you can instead shutdown the device and then boot to TWRP for Sailfish OS installation.
 * Sailfish OS installation
 * Copy the downloaded Sailfish OS zip to sdcard or to somewhere outside sailfish rootfs in userdata partition
 * Boot to TWRP recovery (when device is powered down press and hold volume up button and power buttons until TWRP starts), disable Zip file signature verification and install Sailfish OS zip over Android (without erasing system partition).
 * Reboot

Over-the-Air updates (OTA)

 * Backup of Sailfish OS user files to a sdcard or to another device is strongly encouraged before updating Sailfish OS.
 * These instructions assume you are using at least 3.2.0.12 Beta8 release
 * IMPORTANT! If you are updating from any older release (beta4 or earlier) you can now flash modem partition from 18.04 Fairphone Open OS release by extracting the fastboot images from the manual installation zip as described in installation instructions above.
 * Check previous chapter for instructions how to use fastboot.
 * fastboot flash modem NON-HLOS.bin
 * Open shell with normal nemo user preferrably via ssh.
 * Updating Sailfish OS via commandline:


 * Updating from Sailfish OS 4.2.0.21

ssu release 4.3.0.15 ssu lr ssu lr | grep openrepos devel-su zypper clean -a devel-su zypper ref -f version --dup sync poweroff
 * 1) Check the output that you have repos adaptation-community and adaptation-community-common
 * 2) if either of those is missing run these commands
 * 3) devel-su touch /usr/share/ssu/features.d/adaptation-community.ini
 * 4) devel-su touch /usr/share/ssu/features.d/adaptation-community-common.ini
 * 1) You may have many of OpenRepos enabled. It's recommended to disable them, even
 * 2) though version --dup will do its best-effort to isolate repositories:
 * 1) if above fails, try again
 * 2) version --dup


 * Updating from Sailfish OS 4.1.0.24


 * Update to 4.2.0.21 first.


 * Updating from versions older than Sailfish OS 4.1.0.24


 * If you are updating from Sailfish OS 3.2.0.12 (beta8) release first update to 3.3.0.16


 * Updating from 3.3.0.16 (release1) or newer releases

IMPORTANT! Before updating from 3.3.0.16 to 3.4.0.24 you need to add to the device file /lib/systemd/system/dsme.service.d/sandboxing-disable.conf with the following content and then reboot the device

[Service] PrivateNetwork=false

You can remove the file after you have successfully booted to Sailfish OS 3.4.0.24

IMPORTANT! You need to update from 3.3.0.16 first to 3.4.0.24 (note the hack mentioned above), then update to 4.0.1.48 and finally update to 4.1.0.24. Always reboot after each update.

ssu release 3.3.0.16 ssu lr ssu lr | grep openrepos devel-su zypper clean -a devel-su zypper ref -f version --dup sync poweroff
 * 1) In the command below replace the version with the target version (remember to use the intermediate releases first).
 * 1) Check the output that you have repos adaptation-community and adaptation-community-common
 * 2) if either of those is missing run these commands
 * 3) devel-su touch /usr/share/ssu/features.d/adaptation-community.ini
 * 4) devel-su touch /usr/share/ssu/features.d/adaptation-community-common.ini
 * 1) You may have many of OpenRepos enabled. It's recommended to disable them, even
 * 2) though version --dup will do its best-effort to isolate repositories:
 * 1) if above fails, try again
 * 2) version --dup

Report bugs

 * Software-related bugs (Sailfish OS): first search in https://forum.sailfishos.org/.
 * App bugs (e.g. an app doesn't scale well on different screens): contact its developer.
 * Problems which depend on hardware: at the Nemo Mobile Project: search existing http://bit.ly/port-bugs; add new http://bit.ly/port-new-bug.
 * Please do not contact Fairphone, Jolla Care or Jolla Developer Care, as this is community's build for other phones.

Changelog
Release4 - 30 March 2022
 * Sailfish OS 4.3.0.15
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.

Release3 - 22 October 2021
 * Sailfish OS 4.2.0.21
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.

Release2 - 22 August 2021
 * Sailfish OS 4.1.0.24
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Kernel update from Fairphone Open Android 9 release
 * Device shutdown issue fixed

Release1 - 9 August 2020
 * Sailfish OS 3.3.0.16
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Enable tracking emergency numbers provided by network
 * Some performance improvements to video decoding

Beta9 - 3 January 2020
 * Sailfish OS 3.2.1.20
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.

Beta8 - 26 November 2019
 * Sailfish OS 3.2.0.12
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Enabled mpeg2 hardware decoder

Beta7 - 3 September 2019
 * Sailfish OS 3.1.0.12
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.

Beta6 - 31 May 2019
 * Sailfish OS 3.0.3.9
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Fixed random failure to update camera configurations when installing or updating Sailfish OS

Beta5 - 8 April 2019
 * Sailfish OS 3.0.2.8
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Enabled on-demand proximity sensor support which makes using firmware from 18.04 possible
 * Fixed browser crash when seeking Youtube videos
 * Fixed distortion of some Youtube videos in browser

Beta4 - 2 February 2019
 * Sailfish OS 3.0.1.11
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Camera improvements (requires a separate community camera app)
 * Effects (i.e. color filters)
 * Exposure modes (including HDR)

Beta3 - 15 November 2018
 * Sailfish OS 3.0.0.8
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Camera improvements
 * Video flash torch re-enabled
 * More supported manual ISO values
 * Enabled step counter sensor

Beta2 - 22 September 2018
 * Sailfish OS 2.2.1.18
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.

Beta1 - 21 June 2018
 * Sailfish OS 2.2.0.29
 * Fairphone Opensource OS 18.04 or Fairphone OS 18.04 required.
 * Compass sensor fixed
 * Improved virtual keyboard feedback
 * WebGL fixed in browser

Alpha6 - 21 April 2018
 * Sailfish OS 2.1.4.14
 * Fairphone Opensource OS 18.03 or Fairphone OS 18.03 required.
 * Added Bluetooth LE support
 * Performance improvement

Alpha5 - 5 March 2018
 * Sailfish OS 2.1.3.7
 * First release based on Android 6 base
 * Fairphone Opensource OS 18.02 or Fairphone OS 18.02 required.
 * Support for new Fairphone display and camera modules.
 * Camera button supported in Sailfish camera app.
 * Improved vibrator effects.

Alpha4 - 27 June 2017
 * Sailfish OS 2.1.0.11
 * OTA-only release, no new installation zip.
 * Fairphone Opensource OS 16.10 or Fairphone OS 1.8.1 recommended, not tested on other releases.
 * Fix LED regression in alpha3.

Alpha3 - 21 December 2016
 * Sailfish OS 2.0.5.6
 * Fairphone Opensource OS 16.10 or Fairphone OS 1.8.1 recommended, not tested on other releases.
 * Dual-SIM support added.
 * FM Radio Media app plugin added.
 * MMS sending and receiving fixed.
 * Disabled persistent debug telnet from USB interface on release images.
 * Offline charging UI fixed.
 * Initial display brightness after boot fixed.
 * Speakerphone volume control fixed.
 * OBEX configurations added.
 * MLSDB for using cell phone tower info for obtaining location.
 * Bluetooth state now remembered after reboot.
 * Fix mobile network settings randomly missing.
 * Flash torch option for video recording added.
 * Volume keys disabled when display is off.
 * Camera Exif fixes.
 * Flashlight shortcut added.

Alpha2 - 9 August 2016
 * Sailfish OS 2.0.1.11
 * Requires Fairphone Opensource OS 16.06 or Fairphone OS 1.4.2, not tested on other releases.
 * Bluetooth MAC address fixed.
 * Bluetooth MAC address now shown in Settings->About product.
 * WLAN MAC address fixed.
 * Sending MMS messages fixed partially.
 * Camera and audio/video codecs work with FP Android >= 1.2.8.
 * Larger 16:9 image resolution for camera.
 * FM Radio support (no preinstalled app, harbour-piratefm works).
 * Display brightness control improvements.