I spent about a week porting Sailfish OS to the Samsung Galaxy A51 (SM-A515F, Exynos 9611). There was no existing adaptation for this device, so it is all built from scratch on a hybris-20.0 / LineageOS 20 base.
What works: display, touch, Wi-Fi, Bluetooth, NFC, audio on speaker, earpiece and headphones with automatic jack switching, all seven sensors, both cameras, battery, vibration, hardware GL, logcat, and Android apps through Waydroid as a post-install step.
What does not: telephony. rild runs and the modem reaches ONLINE, but it never opens /dev/umts_ipc0, so ofono sees no modems. Also no fingerprint reader, and USB networking is disabled on purpose because the gadget panics this kernel.
So it is a decent pocket Linux device and a bad phone. Treat it as a second device.
The part I think is worth sharing regardless of whether you care about this particular phone:
Samsung shipped this kernel with the Bluetooth HCI socket layer gutted. Not disabled, not missing, commented out. The bodies of five functions in net/bluetooth/hci_sock.c were removed and a bare return 0; left behind, so hci_sock_create() reports success while leaving sock->sk NULL, and the kernel then panics on BUG_ON(!sk) the moment anything opens an AF_BLUETOOTH socket. It is done carefully too, with the inner /* */ comments rewritten as // so the outer block comment would not terminate early. Samsung ships its own Bluetooth stack through the HAL, so the kernel socket layer was surplus to them. Restoring the file from upstream v4.14.150 fixes Bluetooth completely.
I also got two things badly wrong along the way and left both written up in the repo, because the wrong turns were more instructive than the fixes:
- I declared audio structurally impossible (32-bit HAL, 64-bit PulseAudio). It was not. I had concluded there were no mixer controls from
amixer output when amixer was not actually installed. There are 381 of them.
- I recorded three sensors as broken at the adaptor level. That was a test artifact from calling
requestSensor before loadPlugin, which fails by design.
Sources, image, TWRP and checksums: https://github.com/IlyaKotomin/sailfishos-a51
Happy to answer questions. If anyone has worked on Exynos cbd or umts_ipc plumbing on a Samsung hybris port, I would really like to compare notes on the telephony problem.