[FP4] Sailfish OS - 4.5.0.24 for Fairphone 4

Thank you for your time @oli.sax. You reply is informative as I am not up-to-date with the community ports. By the way, I have tried Waydroid a few days ago under EndeavourOS (essentially Arch Linux) and I can tell that, while networking and apps installation works, banking apps do not work :-./.

Kind regards

1 Like

I’m afraid that you might be right. As there is no answer from @mal anymore, I think that it might be the safe bet to sell the Fairphone and keep the Sony :frowning:

I didn’t remember to answer, I still plan to continue porting. I did actually start a new clean build not long ago but didn’t yet test it.

5 Likes

That’s really great news, @mal :slight_smile: Hooray, maybe I can keep my Fairphone after all and sell the Sony? That would be really cool :slight_smile:
Can we support you in any way?

2 Likes

That is really great news!

1 Like

List updated :slight_smile:

For GPS it took me approximately 1 minute to get a fix :satellite: (walking outside)

And with the web browser, I’m not able to connect to this forum :sob:

2 Likes

The web browser thing is expected, as the current browser is based on FF78. But there is hope, as there is work on upgrading this ancient piece of software!

3 Likes

Some restrictions using this Sailfish port on the FP4 .
First:
I did not get bluetooth running. The dot is blinking but did not stay on. If i go back and entering bluetooth again, the dot is off. Therefore it is also not possible to connect anything to the phone.
Second:
On phonecall (e.g. to my mailbox) the speaker (with speaker dot on or off) are very loud. Reducing the volume did not work fluently it seams the speaker are on or off.

Everything else works fine (see above). Additional i use codereader, whisperfish ;-), Fotokopierer, Seaprint, MeeCast (replacing the jolla weather app), OSM Scout Server (have enought space for cards ;-)), mediaplayer, …
Some apps are not available for 64bit on openrepos (or not installable on the fp4).

Hope to get @mal s version soon ™ ;-). But also many thanks to @dimac4455 for showing Sailfish on FP4 is possible …

4 Likes

bluetoothctl list did not find any bluetooth device … :thinking:. Maybe the kernel did not have the binary blobs?

1 Like

I can confirm this behaviour on Sailfish OS 4.5.0.24

Just for curiosity, I flashed (*) the “old” previous image Sailfish OS 4.5.0.18 and in this case Bluetooth is working fine, I was able to be detected and pair with my other phone :slight_smile:

So this is clearly a regression of this version…

(*) Here is what I did: from SFOS 4.5.0.24 go to TWRP, format data, mount system, flash zip and reboot :slight_smile:
NOT flashing hybris-boot again, NOT flashing factory FPOS Android 11 either.
(I made a TWRP backup of /Data partition before format data)

4 Likes

Today I had a look at Waydroid on SFOS.
I followed the instructions here, installed the packages Waydroid, Waydroid Settings and Waydroid Gbinder Config Hybris from the Chum GUI.

Then when typing “waydroid init” in Terminal the first error occured :upside_down_face:

ERROR: Binder node “binder” for waydroid not found

Looking up for solution, I found in this article two hints to investigate:

  1. Install anbox-modules with dkms to install the required modules [1]

This repository contains the kernel modules necessary to run the Anbox Android container runtime. They’re split out of the original Anbox repository to make packaging in various Linux distributions easier.

  1. Add those kernel options and recompile the kernel:

CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=m
CONFIG_ANDROID_BINDERFS=n
CONFIG_ANDROID_BINDER_DEVICES=“binder,hwbinder,vndbinder”

The modules can either be compiled into the kernel (y), into modules (m), or not at all (n)

But are we sure the kernel is missing something? On UbuntuTouch, Waydroid works out of the box, perhaps they adapted the kernel accordingly?

Typing modprobe binder_linux [2] gives

modprobe: FATAL: Module binder_linux not found in directory /lib/modules/4.19.157-perf-g6e9050291f12-dirty

However, looking at the result of zcat /proc/config.gz | grep -Ei 'psi|binder' [3] it seems that similar commands to the ones mentioned above are included. This can be found as well in the kernel file :slight_smile: android_kernel_fairphone_sm7225/arch/arm64/configs/lineage_FP4_defconfig

CONFIG_PCI=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=y
CONFIG_ANDROID_BINDER_DEVICES=“binder,hwbinder,vndbinder”
#CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set

(Note that I’m not familiar with kernel so I’m not sure if it’s the good file to look at or not…)

To be continued, I guess I’ll try the “anbox-modules” path :wink:

2 Likes

I’m trying to understand better this kernel thing.

First, when typing this command ls -alh /dev/binder /dev/ashmem it seems that the files exists…

crw-rw-rw-    1 root     root       10,  57 Feb 22 14:41 /dev/ashmem
lrwxrwxrwx    1 root     root          20 Feb 22 14:41 /dev/binder -> /dev/binderfs/binder

But typing devel-su modprobe binder_linux doesn’t find anything, and devel-su lsmod is empty!

Reading about it [1], it seems that the letters m/y matter:

do you even have any modules (M)?
or is everything built-in (Y)?
Anything marked Y will always be active and won’t show up in lsmod.

And that to list all kernel modules, this is the way to go [2]:

[defaultuser@FP4 ~]$ zcat /proc/config.gz | grep MODULES
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MODULES=y
CONFIG_MODULES_TREE_LOOKUP=y
[defaultuser@FP4 ~]$ zcat /proc/config.gz | grep =m
CONFIG_MSM_RDBG=m
CONFIG_DVB_MPQ=m
CONFIG_DVB_MPQ_DEMUX=m
CONFIG_LCD_CLASS_DEVICE=m
CONFIG_QCOM_LLCC_PERFMON=m

By the way, I could go further with anbox-tools because the first step is to install dkms and I don’t know how to do that. devel-su pkcon install dkms says there is no package.

Later I’ll have a look to the differences with the Ubuntu Touch kernel, to see if here Binder is shipped as module or not…

Hi @mal, did you have a chance to test it? (If you need testers, I’d be glad to help :wink: )

1 Like
Here is the result (on UbuntuTouch-OTA4)

1/ modprobe binder-linux

modprobe: FATAL: Module binder-linux not found in directory /lib/modules/4.19.157-perf+

2/ lsmod → empty

3/ zcat /proc/config.gz | grep MODULES

CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MODULES=y
CONFIG_MODULES_TREE_LOOKUP=y

zcat /proc/config.gz | grep=m → empty

4/ ls -alh /dev/binder /dev/ashmem

crw-rw-rw- 1 root root 10, 57 Jan 25 13:41 /dev/ashmem
lrwxrwxrwx 1 root root 20 Jan 25 13:41 /dev/binder → /dev/binderfs/binder

5/ sudo waydroid init

[14:56:53] Already initialized

6/ /dev/binderfs$ ls -al

crw-rw-rw- 1 root root 504, 4 Jan 25 13:41 anbox-binder
crw-rw-rw- 1 root root 504, 5 Jan 25 13:41 anbox-hwbinder
crw-rw-rw- 1 root root 504, 6 Jan 25 13:41 anbox-vndbinder
crw-rw-rw- 1 root root 504, 1 Jan 25 13:41 binder
crw------- 1 root root 504, 0 Jan 25 13:41 binder-control
drwxr-xr-x 3 root root 0 Jan 25 13:41 binder_logs
crw-rw-rw- 1 root root 504, 2 Jan 25 13:41 hwbinder
crw-rw-rw- 1 root root 504, 3 Jan 25 13:41 vndbinder

TLDR; Seems identical… except anbox-binder, anbox-hwbinder and anbox-vndbinder on the /dev/binderfs/ folder

I’m experiencing the exact same behavior:
4.5.0.18: No mobile data
4.5.0.24: No Bluetooth

I’ll stick around on 4.5.0.24 for now, hoping that Bluetooth will get fixed, I prefer to keep working mobile data :stuck_out_tongue:

That’s odd, I don’t have issues with either mobile data or bluetooth.

1 Like

I reflashed to 4.5.0.18 and bluetooth was working fine, back on the .24 release it simply won’t enable; the button blinks but then stays off.

Some things I tried to no avail on the commandline:

[root@FP4 defaultuser]# systemctl restart bluetooth.service
[root@FP4 defaultuser]# systemctl status bluetooth.service
● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2024-04-02 16:53:42 CEST; 5s ago
     Docs: man:bluetoothd(8)
 Main PID: 22643 (bluetoothd)
   Status: "Running"
   Memory: 444.0K
   CGroup: /system.slice/bluetooth.service
           └─22643 /usr/libexec/bluetooth/bluetoothd -n

Apr 02 16:53:42 FP4 bluetoothd[22643]: bluetoothd[22643]: Starting SDP server
Apr 02 16:53:42 FP4 bluetoothd[22643]: Starting SDP server
Apr 02 16:53:42 FP4 bluetoothd[22643]: bluetoothd[22643]: profiles/network/bnep.c:bnep_init() kernel lacks bnep-
Apr 02 16:53:42 FP4 bluetoothd[22643]: bluetoothd[22643]: src/plugin.c:plugin_init() System does not support net
Apr 02 16:53:42 FP4 bluetoothd[22643]: profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support
Apr 02 16:53:42 FP4 bluetoothd[22643]: src/plugin.c:plugin_init() System does not support network plugin
Apr 02 16:53:42 FP4 bluetoothd[22643]: bluetoothd[22643]: Bluetooth management interface 1.14 initialized
Apr 02 16:53:42 FP4 bluetoothd[22643]: Bluetooth management interface 1.14 initialized
Apr 02 16:53:42 FP4 bluetoothd[22643]: bluetoothd[22643]: Registered as neard handover agent
Apr 02 16:53:42 FP4 bluetoothd[22643]: Registered as neard handover agent

and

[root@FP4 defaultuser]# dbus-send --system --print-reply --dest=net.connman /net/connman/technology/bluetooth net.connman.Technology.SetProperty string:"Powered" variant:boolean:false
method return time=1712069813.714905 sender=:1.24 -> destination=:1.400 serial=19320 reply_serial=2
[root@FP4 defaultuser]# dbus-send --system --print-reply --dest=net.connman /net/connman/technology/bluetooth net.connman.Technology.SetProperty string:"Powered" variant:boolean:true
method return time=1712069818.629351 sender=:1.24 -> destination=:1.401 serial=19322 reply_serial=2
[root@FP4 defaultuser]# dbus-send --system --print-reply --dest=net.connman /net/connman/technology/bluetooth net.connman.Technology.SetProperty string:"Powered" variant:boolean:true
Error net.connman.Error.AlreadyEnabled: Already enabled

and

[root@FP4 defaultuser]# bluebinder 
Failed to open /dev/vhci deviceUnable to open virtual device

(process:23128): GLib-CRITICAL **: 16:58:02.502: g_io_channel_shutdown: assertion 'channel != NULL' failed

(process:23128): GLib-CRITICAL **: 16:58:02.504: g_io_channel_unref: assertion 'channel != NULL' failed

But it’s all shots in the dark, from things I’m finding on the internet, if you have any suggestions as to what I might try then please do!
Further up in this thread there are a couple of other users experiencing the same issues.

Sorry, I somehow mixed devices. Need to test properly.

1 Like

No worries, though do let me know if you figure something out! :smile:

Have you postponed the release of the port until after the release of SFOS 4.6?

1 Like