Sailfish OS porting

Rickyloc

Member
Jun 8, 2017
24
2
3
Hey buddy. I wanna flash this but I want to dualboot with another room like you. I can't get dualboot patcher to ever work. You think you could point me in the right direction?
 

deathmist

Senior Member
Jun 2, 2019
61
154
53
Hey buddy. I wanna flash this but I want to dualboot with another room like you. I can't get dualboot patcher to ever work. You think you could point me in the right direction?
Theoretically any (currently Oreo-based) ROM should work fine, tho I'm only 100% sure with LineageOS 15.1 installed your hardware, audio, calls, display, sensors, WLAN etc will even work properly under SFOS due to CAF vs non-CAF sources and other differences. You can remove the LineageOS install/version check from the "updater-binary" shell script inside the switcher zip by following the displayed error code and zip it back up like it was before. I could add a warning like "LineageOS install not detected! Press volume up to continue anyway or use volume down to stop flashing" instead of instantly stopping if it doesn't detect LOS to be installed.
Not sure if I could implement something like that yet but I'll experiment sometime soon ;)
 

deathmist

Senior Member
Jun 2, 2019
61
154
53
News about Pie rebase

I know it's been a bit quiet around here recently, but for a good reason: I've been working hard to get the LineageOS 16.0 Pie rebase working. So far it boots with UI, WLAN, BT, sensors and MTP (which was broken since the beginning of my 15.1 Oreo based port) all working seemingly fine! And the UI feels a bit smoother now too than before on 15.1 :victory:
There are still however some massive issues like audio, cellular data (maybe ofono too so no calling yet?) & RTC alarms / hw clock only partially working or not at all so it's definitely no daily driver yet, but it's getting closer every day.
This rebase will also translate over perfectly to the 5T when I get it working respectably first on the regular 5 non-T (the only variant I own personally) :cool:
I'll be investing all my resources on 16.0 now since it "works" and drop support entirely for 15.1 so there will be no more SFOS builds based on Oreo. I may still update the LineageOS zip I provide once to keep up-to-date with the security patches unless I get the new base working properly already in a few weeks or so. Stay tuned for Pie based builds! ;)
 
Last edited:

srikaran

Member
May 15, 2008
31
10
0
Stumbled across this today. I had used Sailfish on my old OnePlus One (Bacon) and wasn't aware of this effort for the 5. I am travelling right now, be back mid next week and will flash this and check it out. Let's see if the update to Pie would be ready by then too, else don't mind using 15.1 as well as base, as long as SFOS works fine. Thanks a ton for the efforts.
 

Rickyloc

Member
Jun 8, 2017
24
2
3
i flashed this os and it works great but i need help getting back tk android. idk why but i cabt boot into TWRP. i get a black screem and blue.light. i dont understand how to use adb or fastboot either with jolla any help is appreciated
sd

---------- Post added at 10:04 PM ---------- Previous post was at 10:02 PM ----------

I flashed this onto my oneplus 5. Everything runs great. But i'm ready to go back to android. I can't boot into twrp and I don't know how to run adb commands with jolla. When I boot to recovery I get a black screen and a blue led light. Any help would be appreciated.
 

deathmist

Senior Member
Jun 2, 2019
61
154
53
i flashed this os and it works great but i need help getting back tk android. idk why but i cabt boot into TWRP. i get a black screem and blue.light. i dont understand how to use adb or fastboot either with jolla any help is appreciated
sd

---------- Post added at 10:04 PM ---------- Previous post was at 10:02 PM ----------

I flashed this onto my oneplus 5. Everything runs great. But i'm ready to go back to android. I can't boot into twrp and I don't know how to run adb commands with jolla. When I boot to recovery I get a black screen and a blue led light. Any help would be appreciated.
huh? the used install scripts DO NOT touch your recovery partition, the issue is on your part. After reading about it I have a feeling you didn't follow my flashing guide: it seems to be caused by firmware and TWRP version mismatch. You'll have to install/boot a TWRP 3.2.x image as mentioned in the guide via fastboot now. Boot into fastboot mode (Power + VolumeUp when powered off) and follow a guide like this one while ignoring any and all Android specific steps like adb, settings changes etc.
as you're likely going back to Android 9 you need to flash latest OOS 9.0 firmware, and any new TWRP 3.3.x image (like one from here) to recovery partition and reboot.

if you installed GApps, magisk etc before SFOS (normal LineageOS 15.1 setup) you can switch between the 2 operating systems by flashing my boot switcher zip.

btw ADB is not a thing in Sailfish OS as it's NOT an Android ROM. Instead use SSH after setting a developer password in settings (communication like telnet via cable is not working properly currently for some reason): username is nemo and password whatever you set it to before.
 

deathmist

Senior Member
Jun 2, 2019
61
154
53
Any new update? :(
I'm in an internship currently so development has been a bit slow due to lack of time and I'm stuck with cellular data not working on 16.0 while everything else mostly works.
I kind of want to release testing builds already, but they're not really that useful if you can't stay online while on the go.
The cellular data errors just indicate OEM codes with nothing specific which makes resolving that issue difficult to say the least.
I've finally made an initial version of the official SFOS install page for OP5/5T devices tho which can be found here and I'll update the contents there as things change.
 
  • Like
Reactions: decon4

deathmist

Senior Member
Jun 2, 2019
61
154
53
SFOS 3.2.0 (Torronsuo) & Pie rebase

Exciting news everyone! I've finally decided to drop the initial Pie rebased Sailfish OS 3.2.0 (Torronsuo) port: check out the latest release details right here!
This is definitely not a perfect release still, BUT I finally have OTAs working on both devices (5 / 5T) so I feel comfortable putting this out already as I think I can resolve most of the remaining issues via over the air updates :good:

Feel free to check it out. Keep in mind that I think for now this is more of a tinkering release until I at least resolve the Wi-Fi issue when booting back to Android side and non-functional cellular data (& hotspot connection sharing by extension) on Sailfish OS!
 

deathmist

Senior Member
Jun 2, 2019
61
154
53
Just putting this out there: if people are already trying the Pie (16.0) -based port out, WLAN on Android breaks because SELinux contexts for some files will get unlabeled each time after booting SFOS. I'm looking into a fix; likely manual definition of the contexts are needed in /etc/selinux/...
For now tho you can "fix" it again by entering a root shell on Android and running
Code:
restorecon /persist/rfs/msm/mpss/server_check.txt /persist/wlan_mac.bin
& rebooting right after. Then WLAN and hotspot toggles should work properly again (on Android).
There may be other files that get their SELinux contexts "unlabeled" so you can run the snippet from here in a root ADB shell and run restorecon on each of the returned files as well, if need be :good:
btw SFOS 3.2.1 is around the corner so people can test OTA as well soon once it gets added to OBS possibly using sfos-upgrade from OpenRepos in command line (upgrade from settings UI only works on official devices currently sadly :/ )
 
Last edited:

deathmist

Senior Member
Jun 2, 2019
61
154
53
Upgrade to Sailfish OS 3.2.1 (Nuuksio)

As of today the OP5/5T ports have both been updated to Sailfish OS 3.2.1 (Nuuksio); check out the latest release details right here! I've also updated & added OTA info to the merproject device wiki page as well :cool:
Major issues from the previous release are still present however, so without Android SELinux dual-boot workarounds and being able to live with no mobile data in SFOS this is no daily driver yet. Help from other knowledgeable people is massively appreciated!
 

deathmist

Senior Member
Jun 2, 2019
61
154
53
Important notice!

Just a heads up for any possible user of the Pie rebase builds:
Sadly (for now) these builds will NOT be maintained going forward, and doing an OTA starting anytime this week will 100% break your Sailfish OS install!
I recommend not using these half-broken builds and instead backing up all data, setting up and waiting on LineageOS 15.1 till I get everything sorted out on OBS end for OTAs on Oreo base instead. (please don't install older Oreo SFOS builds!)
I decided to do this due to lack of progress on my part (or other interested devs), but I will NOT remove hybris-16.0 or master branches from any of the projects as to still be able to do Pie based local builds for debugging the bizarre SELinux & mobile data / hotspot issues present there, and it doesn't make sense to lose progress either way as I'm also planning to do a final rebase on Android Q whenever OnePlus decides to do the upgrade during next summer (and when the new hybris base is ready of course).
Expect a lot more things to work software wise on the next Oreo-based SFOS builds (including mobile data, hotspot sharing, MTP etc) that I'll be putting up on the CI later this week.
I'll also try to finally do a proper initial XDA release thread for the port by the end of this week hopefully. Look forward to a much more stable, mature & up-to-date Sailfish OS port for the OnePlus 5 & 5T! :fingers-crossed:
 

crowdofone

Member
Jul 2, 2007
15
3
0
Been following this project with interest. Sad to hear about your troubles working out the kinks on Pie. Expect going back to Oreo was a hard choice, but can imagine the frustration and wanting to be able to focus on a working port. Really looking forward to seeing the continuing evolution :)