There's SailfishOS, which is an alternative to Android and iPhone. It's a mobile Linux OS with an optional support for Android apps.
It's not the world's most advanced mobile OS, but a good way to escape the Apple and Google ecosystems.
It is possible to purchase the OS and install it to Sony Xperia phones. https://shop.jolla.com