Large parts of the OS are open source though. Not just the Linux kernel and userland, but also some specific things:
Sailfish: https://github.com/sailfishos Android layer: https://github.com/libhybris/libhybris