Building a Linux Phone
Building a Linux Phone
Hello all!
Due to the recent statements by Google (as well as their track record the last few years) I've decided I do not want to use Android as a phone operating system anymore. But Apple is just as bad, if not worse. So I've decided to build my own custom device.
I am working on building a phone using a single board computer, right now I'm using the raspberry pi 5. This is still a proof of concept, but I want to share my ideas with others, so like minded individuals can start messing around with this idea in their own homes to further this goal.
You can view more images of the device here, as well as the step by step instructions here (these are still very rough and incomplete) https://github.com/muhammadmanwar/cheaphone OR https://codeberg.org/muhammadmanwar/cheaphone
Right now it just runs raspberry pi OS, with a different desktop look and feel. Everything that normally works in a pi 5 works on this device, additionally I am experimenting with a Mobile Broadband modem, to allow the device to text and call, as well as access internet, like a normal phone off wifi
The total cost is around 200 dollars, not including the 3d printer to make the custom case.
This project is barely off the ground, and I've got a lot to learn before I can stop relying strictly on the raspberry pi 5, my end goal is to custom design SBCs, and release those designs for free alongside the plans for the device, so that interested parties can select their own System on a Chip to use for the device. I need to get into designing boards, I'm interested in trying Stephen Hawes' Lumen PnP (https://www.youtube.com/watch?v=JlkTcxh-9gA) for that phase.
But that's for the future, for now, I'm hoping to get more people interested in the prototype so that I'm not the only one noodling around on this idea. I'd love some feedback, and if anyone was willing to put one together for testing, I would appreciate it greatly!
I'm sure you are already aware, but just in case, there's a lot of prior work in getting a truly Linux mobile phone.
There are ready-made devices like PinePhone (the PinePhone Pro looks the most promising one of the bunch), Librem 5, and Liberux Nexx. I think at least some of those companies publish schematics for their boards, you should probably check those out if you want to design your own.
There is also another direction, taken by postmarketOS and the like, to install Linux on a phone that shipped with Android out of the box.
It should be easy enough to install postmarketOS on your device, since it seems to have support for raspberry pi. The benefit of postmarketOS here is that it makes it really easy to install mobile Linux UI shells, like phosh, gnome-mobile, plasma-mobile, or sxmo. This will let you try all of them out and maybe pick one as a starting point for your software stack.
And the software side of it is the really annoying part. We're missing so many components: Connected standby, an app lifecycle management, maybe sandboxing and a detailed, user-facing permission system. And then we need to go ahead and rewrite all the important Linux software to use these (not yet existing) interfaces.
I own a Pinephone, and I feel the Linux phone is within reach since the Nokia 900 (and its predecessors) and that was in 2009, so 16 years now. I believe any effort is very welcome, though. We badly need a good and free operating systems for this important device we all carry around and use hundreds of times each day.
Let's not forget all the software that was done and kinda ready for the openmoko device. There were a few distros for that alone. Some were pretty stable but the biggest issue came down always to phone call quality and connectivity. I'm completely out of the loop but back then all the chips were so closed in themselves that they were basically black boxes. A huge effort was made to try and get them to work as well as possible, with varying degrees of success. I wonder if it continues being the same nowadays.
The N900 was such an amazing device, I still have it around and the UX was the best I've had in a phone, Maemo was truly great and way advanced to its time. That UX with the screen sizes we have today... I keep dreaming.
The one main remaining barrier (apart from thousands of paper cuts everywhere and lack of apps), is indeed process lifecycle management. It's the most complicated one to do, because in order to work well it requires apps to cooperate in some way, either by completely and honestly shutting down when not doing any work, or by providing ways to check if there's any work to be done without running the rest of the app, or both ideally. None of the apps currently do that, so the only options are (1) just let apps do whatever they want, draining the battery, or (2) send SIGSTP to apps that are not in the foreground, losing background notifications and such.
PureOS disagrees.
A user facing permission system like what MacOS has is one of the things Linux is missing.
On linux an "app" is not as well defined due to the open structure of linux, which is the main problem in implementing this.
I want to be able to deny apps information and abilities, and also to give them false information.
I'll have to advocate for the Librem 5 over the Pinephone Pro for the following reasons:
I own a Librem5, and let me tell ya, it's not a daily phone, hardware is just way too slow. Even with sxmo it lags a lot, opening a browser is a whole ordeal for it. Meanwhile when I tried my friend's PinePhone Pro, it felt a lot better. Oh, and for context, I'm currently semi-dailying a OnePlus 6 with NixOS.
Do you have a source? i could not find anything.
When i look at postmarketos device wiki . librem 5 seems better, the chart lists the pinephone support for things like calls and SMS as partial. the librem 5 is the more expensive option but it seems like in practice at least some of the money for it went to good use. freedom isn't free i guess.
Pine64 discontinued the PinePhone Pro unfortunately