[ROM][GNU/Linux][OTA][3.4.0.24] Sailfish OS for OnePlus 5

Search This thread

deathmist

Senior Member
Jun 2, 2019
65
186
This work is released under the permissive MIT license.

6lIuAZv.png


(click above image for higher resolution and quality images!)

Code:
#include <std_disclaimer.h>
/*
* I am NOT responsible for data loss, you getting fired because the alarm app failed or if you brick
* your device. Please do some research if you have any concerns about features included in this OS
* port before flashing! YOU are choosing to do these modifications, and if you point the finger at me
* for messing up your device, I will laugh at you.
* BOOM goes the dynamite!
*/

Hello, fellow XDA developers & users alike!
I think it's been long enough that we've not had alternative non-Android operating systems in a usable state for the popular OnePlus 5* devices, so here is a Sailfish OS port after over 6 months in development!

I'd really appreciate it if you give feedback and report bugs so I can attempt to fix them as best I can 🤞



Features
  • Slick and clean Sailfish OS UI/UX
  • Fully gesture driven navigation of the OS (physical back buttons may or may not work depending on the app)
  • Ambiences: a combination of system background, primary UI colors, sounds & volume levels
  • Sleep mode gestures e.g. double-tap to wake, music controls, 'V' for toggling flashlight etc
  • Ability to control configurable ambiences with the notification slider
  • Independent & alternative OS not based on Android (droid base is only used for drivers & HAL in SFOS)
  • Run regular GNU/Linux (armhf) tools and utilities natively out of the box from Jolla, OpenRepos, other custom repositories or direct binary format
  • Privacy-first OS with no spyware or bloatware pre-installed
  • Dual-booting between LineageOS & Sailfish OS with a simple zip flash in recovery (boot-switcher, linked below)
  • OS version OTAs, look at the merproject wiki page (see 'OTA updates' below)
  • A stable hardware adaptation (port) with basically everything working, but please also read about the problems right below
  • And more to explore...


Problems
  • No Android apps (APK) will run inside Sailfish OS as is the norm with community ports; you can just dual-boot with LineageOS (see FAQ below)
  • There is no VoLTE / VoWiFi support in SFOS (see FAQ below)
  • Even though NFC works, it's implementation is quite basic in Sailfish OS currently
  • Produced video recordings from the camera are unusable right now due to corruption of the beginning in recordings & artifacts when moving even slightly
  • Flashlight misbehaves for picture taking by taking too long to activate and causing nearly pitch black images (it also turns on/off rapidly a few times when disabling)
  • Some audio does not get routed properly to/from (Bluetooth) headsets
  • Sailfish OS Developer mode (SSH via USB cable) doesn't work
  • Rarely waking up from sleep mode can take a long time (up to about 15 seconds)


How to install
  1. Backup all your data from the device to a computer
  2. Download Pie Firmware 9.0.11, TWRP 3.4.x image, the LineageOS 16.0 base ROM & a Sailfish OS release
  3. Install device firmware version 9.0.11 (not the ROM!)
  4. Flash TWRP 3.4.x as your recovery
  5. Reformat /data to ext4 and check it for issues
  6. Reboot to recovery
  7. Wipe cache & dalvik
  8. Flash LineageOS 16.0
  9. Flash anything else you normally flash for Android e.g. GApps, Magisk, no dm_verity etc
  10. Flash Sailfish OS (the zip that contains rootfs.tar.bz2) from inside CI artifacts archive
  11. Reboot and enjoy!
You can also flash my boot-switcher zip (or switch between hybris-boot and droid-boot images created on /sdcard) afterwards for simple dual-booting of the 2 operating systems!


Links & source
sailfishos-oneplus5: All project repos & source
important: Info and detailed guides about flashing, self-building etc
android_kernel_oneplus_msm8998: The used kernel source
sailfishos.org: General info about the OS as well as contributing, translation, app development etc



Changelog
wiki.merproject.org: Place with general info about the port status, OTAs etc
droid-config commits: Stuff modified on the Sailfish OS side



OTA updates
See "OTA (Over-the-Air) update" section under the libhybris adaptation wiki page.


Special thanks to
@kimmoli for gesture-daemon & triambience
@nathanchance for maintaining the OP5 linux-stable merged kernel tree
@Mister_Magister, mal, r0kk3rz, @rinigus, @PiggZ, spiiroin, jusa, vknecht, NotKit and everyone else at #sailfishos-porters
The port was made possible thanks to you all!



FAQ
What does "SFOS" mean?
Sailfish OS; it's simply a common abbreviation.

Can I run [insert name here] Android app in Sailfish OS?
If there is no currently maintained client or similar app in the Jolla Store or (my preference) OpenRepos, then probably not. I may look into bringing Android app support via Anbox or similar project much later on; no ETAs.

Does VoLTE or VoWiFi work in Sailfish OS?
As of SFOS 3.4.0, these are still not implemented, but should be coming later in perhaps Sailfish OS 4.

How can I skip the SFOS beginner tutorial?
Tap each corner of the screen once starting from top-left going clockwise.

I found a bug, what can I do?
See "Report bugs" section under the libhybris adaptation wiki page.

XDA:DevDB Information
[ROM][GNU/Linux][OTA][3.4.0.24] Sailfish OS for OnePlus 5, ROM for the OnePlus 5

Contributors
deathmist
Source Code: https://github.com/sailfishos-oneplus5

ROM OS Version: 9.x Pie
ROM Kernel: Linux 4.x
ROM Firmware Required: 9.0.11 (Pie)
Based On: LineageOS 16.0

Version Information
Status:
Stable
Current Stable Version: 3.4.0.24 (Pallas-Yllästunturi)

Created 2020-01-17
Last Updated 2020-12-10
 
Last edited:

deathmist

Senior Member
Jun 2, 2019
65
186
Thanks for developing this. If no APK's work, how are we supposed to use the apps we use in Android?

Depends on the app really. WhatsApp, Snapchat etc are an absolute no-go since they are very much against any kind of 3rd party clients and any & all work on those in OpenRepos hasn't even been started or has been discontinued.
For Telegram however there are clients like Depecher and Telegra'me (both depend on tdlibjson, install this first if you're gonna try them out!), but they also aren't perfect due to only a few people usually (or sometimes just one person) working on the projects on their free time instead of a big corporations putting in the work.
If you only need a select set of applications/games infrequently, the dual-boot setup may just work for you.
Otherwise read the FAQ.
 
Last edited:
  • Like
Reactions: pleomaxell

pleomaxell

Senior Member
Oct 20, 2012
333
75
Depends on the app really. WhatsApp, Snapchat etc are an absolute no-go since they are very much against any kind of 3rd party clients and any & all work on those in OpenRepos hasn't even been started or has been discontinued.
For Telegram however there are clients like Depecher and Telegra'me (both depend on tdlibjson, install this first if you're gonna try them out!), but they also aren't perfect due to only a few people usually (or sometimes just one person) working on the projects on their free time instead of a big corporations putting in the work.
If you only need a select set of applications/games infrequently, the dual-boot setup may just work for you.
Otherwise read the FAQ.

Thanks for the clarification.
 

deathmist

Senior Member
Jun 2, 2019
65
186
There has been a long-standing issue with NFC always getting re-enabled after a reboot in SFOS. Obviously this is not what you'd want as it causes unnecessary battery drain even when NFC is entirely unused.
This was happening due to a directory ownership issue and should be fixed in the next Sailfish OS release officially.

For now though I fixed this manually on the new uploaded Sailfish OS image (zip), BUT if you already have the OS installed (flashed build <=20200117), you can just reinstall nfcd from a terminal & toggle the option once in Settings to fix the same issue:
Code:
devel-su zypper in --force nfcd
 
Last edited:

deathmist

Senior Member
Jun 2, 2019
65
186
Please do a youtube tutorial because if i do that it will not work!

"Its doesnt work!" is really vague and I literally cannot help you if you don't tell me more about the issue you're having.
What doesn't work? Does it error with some message or code, then what? Did you follow each 11 steps under "How to install"? Did you flash ANY Android kernels or zips AFTER step 10?

I just reflashed my device from Pie following the instructions and got thru the initial Sailfish OS setup.
I also tested flashing boot-switcher and got through the Android setup, THOUGH seemingly without also flashing no_verity before Sailfish (maybe not needed, but I always flash this normally anyway) and wiping caches again I didn't get past LineageOS logo for the first time (may have to add this under the thread).

I've noticed the LineageOS 15.1 base ROM has an issue with the System process being unresponsive for the first minute after a boot every single time, may have to investigate that as Sailfish OS doesn't even touch /system or /vendor (and boot image is just a backup taken before hybris-boot gets flashed)...
 
Last edited:

deathmist

Senior Member
Jun 2, 2019
65
186
It says Error 10. I did all the steps according to the instructions. up to the point where lineage os is installed everything works but after that nothing more!

Error 10 during Sailfish OS flashing points to the installer not being able to extract the SFOS rootfs => said line in install script
Could you upload your /tmp/recovery.log from the device AFTER trying to install Sailfish OS using the steps to say pastebin and link it here (or send a PM)? I feel like the Sailfish archive must be corrupted or something else is wrong on your end.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 19
    This work is released under the permissive MIT license.

    6lIuAZv.png


    (click above image for higher resolution and quality images!)

    Code:
    #include <std_disclaimer.h>
    /*
    * I am NOT responsible for data loss, you getting fired because the alarm app failed or if you brick
    * your device. Please do some research if you have any concerns about features included in this OS
    * port before flashing! YOU are choosing to do these modifications, and if you point the finger at me
    * for messing up your device, I will laugh at you.
    * BOOM goes the dynamite!
    */

    Hello, fellow XDA developers & users alike!
    I think it's been long enough that we've not had alternative non-Android operating systems in a usable state for the popular OnePlus 5* devices, so here is a Sailfish OS port after over 6 months in development!

    I'd really appreciate it if you give feedback and report bugs so I can attempt to fix them as best I can 🤞



    Features
    • Slick and clean Sailfish OS UI/UX
    • Fully gesture driven navigation of the OS (physical back buttons may or may not work depending on the app)
    • Ambiences: a combination of system background, primary UI colors, sounds & volume levels
    • Sleep mode gestures e.g. double-tap to wake, music controls, 'V' for toggling flashlight etc
    • Ability to control configurable ambiences with the notification slider
    • Independent & alternative OS not based on Android (droid base is only used for drivers & HAL in SFOS)
    • Run regular GNU/Linux (armhf) tools and utilities natively out of the box from Jolla, OpenRepos, other custom repositories or direct binary format
    • Privacy-first OS with no spyware or bloatware pre-installed
    • Dual-booting between LineageOS & Sailfish OS with a simple zip flash in recovery (boot-switcher, linked below)
    • OS version OTAs, look at the merproject wiki page (see 'OTA updates' below)
    • A stable hardware adaptation (port) with basically everything working, but please also read about the problems right below
    • And more to explore...


    Problems
    • No Android apps (APK) will run inside Sailfish OS as is the norm with community ports; you can just dual-boot with LineageOS (see FAQ below)
    • There is no VoLTE / VoWiFi support in SFOS (see FAQ below)
    • Even though NFC works, it's implementation is quite basic in Sailfish OS currently
    • Produced video recordings from the camera are unusable right now due to corruption of the beginning in recordings & artifacts when moving even slightly
    • Flashlight misbehaves for picture taking by taking too long to activate and causing nearly pitch black images (it also turns on/off rapidly a few times when disabling)
    • Some audio does not get routed properly to/from (Bluetooth) headsets
    • Sailfish OS Developer mode (SSH via USB cable) doesn't work
    • Rarely waking up from sleep mode can take a long time (up to about 15 seconds)


    How to install
    1. Backup all your data from the device to a computer
    2. Download Pie Firmware 9.0.11, TWRP 3.4.x image, the LineageOS 16.0 base ROM & a Sailfish OS release
    3. Install device firmware version 9.0.11 (not the ROM!)
    4. Flash TWRP 3.4.x as your recovery
    5. Reformat /data to ext4 and check it for issues
    6. Reboot to recovery
    7. Wipe cache & dalvik
    8. Flash LineageOS 16.0
    9. Flash anything else you normally flash for Android e.g. GApps, Magisk, no dm_verity etc
    10. Flash Sailfish OS (the zip that contains rootfs.tar.bz2) from inside CI artifacts archive
    11. Reboot and enjoy!
    You can also flash my boot-switcher zip (or switch between hybris-boot and droid-boot images created on /sdcard) afterwards for simple dual-booting of the 2 operating systems!


    Links & source
    sailfishos-oneplus5: All project repos & source
    important: Info and detailed guides about flashing, self-building etc
    android_kernel_oneplus_msm8998: The used kernel source
    sailfishos.org: General info about the OS as well as contributing, translation, app development etc



    Changelog
    wiki.merproject.org: Place with general info about the port status, OTAs etc
    droid-config commits: Stuff modified on the Sailfish OS side



    OTA updates
    See "OTA (Over-the-Air) update" section under the libhybris adaptation wiki page.


    Special thanks to
    @kimmoli for gesture-daemon & triambience
    @nathanchance for maintaining the OP5 linux-stable merged kernel tree
    @Mister_Magister, mal, r0kk3rz, @rinigus, @PiggZ, spiiroin, jusa, vknecht, NotKit and everyone else at #sailfishos-porters
    The port was made possible thanks to you all!



    FAQ
    What does "SFOS" mean?
    Sailfish OS; it's simply a common abbreviation.

    Can I run [insert name here] Android app in Sailfish OS?
    If there is no currently maintained client or similar app in the Jolla Store or (my preference) OpenRepos, then probably not. I may look into bringing Android app support via Anbox or similar project much later on; no ETAs.

    Does VoLTE or VoWiFi work in Sailfish OS?
    As of SFOS 3.4.0, these are still not implemented, but should be coming later in perhaps Sailfish OS 4.

    How can I skip the SFOS beginner tutorial?
    Tap each corner of the screen once starting from top-left going clockwise.

    I found a bug, what can I do?
    See "Report bugs" section under the libhybris adaptation wiki page.

    XDA:DevDB Information
    [ROM][GNU/Linux][OTA][3.4.0.24] Sailfish OS for OnePlus 5, ROM for the OnePlus 5

    Contributors
    deathmist
    Source Code: https://github.com/sailfishos-oneplus5

    ROM OS Version: 9.x Pie
    ROM Kernel: Linux 4.x
    ROM Firmware Required: 9.0.11 (Pie)
    Based On: LineageOS 16.0

    Version Information
    Status:
    Stable
    Current Stable Version: 3.4.0.24 (Pallas-Yllästunturi)

    Created 2020-01-17
    Last Updated 2020-12-10
    10
    Pie rebase

    Good news: I started messing around with 16.0 Pie base and cellular data during my SFOS 3.3 upgrade testing just now, and cellular data works on the Pie base using dummy_netd!
    Expect a base upgrade from 15.1 Oreo -> 16.0 Pie on the next SFOS upgrade as well unless I find something else of importance that is still broken :fingers-crossed:
    I'll give more details on the upgrade process when we get there but expect a full /data wipe at least -> prepare to backup all your stuff! :)
    7
    Upgrade to Sailfish OS 3.3.0 (Rokua)

    Hello everyone!

    The port has now been upgraded to SFOS 3.3.0 and HAL components are now all based on Android 9 Pie! :cool:
    Check out the details of this release here!
    3
    Upgrade to Sailfish OS 3.4.0 (Pallas-Yllästunturi)

    Hello everyone!

    The port has now been upgraded to SFOS 3.4.0! :)
    Check out the details of this release here!
    2
    Hi! Does this port will be updated to Sailfish 4?
    Yes, and I've already successfully updated & booted a local aarch64 SFOS 4.0.1.48 build. I'm waiting for OBS to get aarch64 target support (we'll see how long that whole thing will last) and I'm also curious how an upgrade from the previous armv7hl builds will go.

    Additionally I've been dabbling with upgrading the Hybris HAL base from Pie (16.0) to Q (17.1), but I've not yet been successful. When I have more time in the near future I'll certainly spend some more time on it.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone