Sailfish OS 5.1.0.11 for the Samsung Galaxy A51 (SM-A515F, “a51”)
This is an unofficial port for the Exynos 9611 Galaxy A51. I could not find any
existing A51 adaptation, so all of this is new work on a hybris-20.0 /
LineageOS 20 base.
Device: Samsung Galaxy A51, SM-A515F, a51, Exynos 9611, Mali-G72 MP3
Release: 5.1.0.11 (HADK, hybris-20.0)
Sources and download: GitHub - IlyaKotomin/sailfishos-a51: Unofficial Sailfish OS 5.1.0.11 port for the Samsung Galaxy A51 (SM-A515F) — Bluetooth, NFC, audio, sensors and logcat working; telephony not · GitHub
(the image, TWRP and checksums are on the Releases page there)
This is alpha, and telephony does not work. No calls, no SMS, no mobile
data. Everything else below works, but you should treat this as a second phone.
What works
-
Display, brightness, and touch
-
Wi-Fi
-
Bluetooth: scanning, pairing, SDP, A2DP / AVRCP / HFP
-
NFC: tag reading, tested with MIFARE Classic
-
Audio: speaker, earpiece and headphones, and it switches automatically
when you plug headphones in
- All seven sensors: accelerometer, gyroscope, compass, magnetometer,
rotation, ambient light, orientation
-
Auto-rotation
-
Adaptive brightness, with a toggle that actually works
-
Both cameras, front and rear
-
Battery reporting and charging
-
Vibration and the hardware keys
-
Hardware GL compositing
-
logcat and Android logging
-
SSH from first boot
-
Android apps through Waydroid, as a post-install step
What does not work
- Telephony. Samsung’s
cbdboots the modem toONLINEandrildruns,
but rild never opens /dev/umts_ipc0, so ofono sees no modems. This is the
one I would most like help with.
-
Fingerprint reader. Nothing supports it on this device.
-
USB networking. The port refuses to bring the gadget up on purpose,
because writing the configfs gadget panics this kernel. Use Wi-Fi instead.
The USB address on the developer page is a label with nothing behind it.
Not tested yet
Calls and SMS (the modem blocks them anyway), microphone recording, camera
flash, video recording, a real GPS fix, the SD card slot, and MTP.
A warning if you have a REV02 board
The audio routing assumes a Richtek RT5510 amp, which is what REV01 boards
have. REV02 switched to a TI TAS2562 and will need a different path. Samsung’s
DTBO only declares the TI part in the REV02 overlay. So if you have a REV02 and
get no sound at all, that is why.
Screenshots
Bluetooth scanning, finding nearby devices with their names. This is the fix I
describe further down. More photos in a reply below, and in the repo.
About these photos: they are camera shots, not screen captures, and this
particular phone has a replacement screen rather than the original Samsung
panel. So the cutout shape and the colours you see are the replacement’s, not
what a stock A51 looks like, and not something the port is doing. The device
itself is a genuine SM-A515F.
Installing
You need stock Android 13 A515FXXU8HWI1, an unlocked bootloader, and TWRP
3.7.1_12-0 for a51. TWRP is attached to the release, mirrored from twrp.me so
the versions are known to match.
Full steps are in docs/INSTALL.md in the repo.
Two steps people miss on Samsung hardware:
- After unlocking, boot Android again and connect to Wi-Fi once.
VaultKeeper only blesses the unlock once the device has been online. Until
then the bootloader still rejects unofficial images, and flashing TWRP fails
with “Only official released binaries are allowed to be flashed”. That looks
like a bad download, but it is not.
- Run
multidisablertwice in TWRP, then Format Data. This turns off
encryption and stops stock recovery being put back. It does erase the phone.
If you already have Sailfish on the device, neither of those applies. Just push
the new zip and flash it, and your home directory survives.
Check what you downloaded before you flash it:
sha256sum -c SHA256SUMS
Notes for other porters
Three of these are not device-specific, so they might be worth stealing. They
are all written up in more detail in docs/KNOWN-ISSUES.md and
docs/PORTING-NOTES.md in the repo.
