this post was submitted on 26 Feb 2024
158 points (97.6% liked)

Linux Phones

5004 readers
4 users here now

Community about running GNU/Linux on phones. Projects like Ubuntu Touch, Plasma Mobile, PostmarketOS, Mobian etc. Either on former Android phones or hardware like the PinePhone.

See also:

Related chats:

founded 4 years ago
MODERATORS
 

Most parts work, still not sure why Bluetooth gives me errors in dmesg, audio out works, microphone input not yet... I'm getting there.

But graphics, charging, low standby power consumption, LTE, wifi... those all work already.

The fact that postmarketOS has support and also that there are people working on mainline support, makes this a task that is not as difficult as I thought, as most work was already done for another distro.

Otherwise it runs more fluid than Android ever did on it and it has a great standby time (forgot to turn it off at around 80 % and a few days later it was at 58 %).

For now stuck on merging the Kernel patches from the sdm670-mainline project with those from Mobian, not really something I can do without knowing C. I just hope someone with the right skills does it at some point.

Then I just need to make some smaller merge requests, like one to add a udev rule for vibration support and so on.

Not much missing before I can finally use it as a daily driver.

all 41 comments
sorted by: hot top controversial new old
[–] poVoq 17 points 8 months ago (1 children)

Excellent! As nice as PmOS is, Mobian seems more at home for me and I am definitely looking forward to try it on my Fairphone 5 sometimes in the nearish future.

[–] 01189998819991197253@infosec.pub 8 points 8 months ago* (last edited 8 months ago) (1 children)

What's PmOS? I'm intrigued

Edit: PostmarketOS. I made the connection. I must be more tired than I thought.

[–] lemmy_user_838586@lemmy.ml 12 points 8 months ago* (last edited 8 months ago) (1 children)

Awesome work! If you don't mind me asking, what help/sources did you use to get this far in porting efforts? I have some free time on my hands and would like to try porting a newer phone such a pixel 4a or similar

[–] erebion@lemmy.sdf.org 18 points 8 months ago (1 children)

Oh, I don't mind questions. :)

Help: A lot via the Mobian Ports ( #mobian-ports:matrix.org ) Matrix room and the postmarketOS offtopic ( #offtopic:postmarketos.org ) Matrix room.

Sources: Not much there yet. As soon as there are official builds for the Pixel 3a, I will start writing docs. I already have a lot of notes on what I had to do. But first I need to have someone merge the Kernel patches, as I don't know C, which makes resolving merge conflicts really hard, it turns out. Once that is done, there are just a few smaller merge requests left and builds will appear magically.

The whole process is not that difficult if there are already Kernel patches available. In the case of the Pixel 3a, I only had to clone the sdm670-mainline repo ( https://gitlab.com/sdm670-mainline/linux-patches ) , compile the kernel (two commands) and get a .deb, which I used with mobian-recipes ( https://salsa.debian.org/Mobian-team/mobian-recipes/ ) to build an image. I then wrote a config file for droid-juicer ( https://gitlab.com/mobian1/droid-juicer/-/merge_requests/4 ) which tells it what files on the vendor and modem partitions it should get, then those are copied to /usr/lib/firmware/updates/.

That was easy as dmesg will just tell you what files it cannot load because they are missing. Just find those, write the config, run droid-juicer, reboot... boom. Display, Wifi, LTE and so on working.

Then smaller stuff like udev rules for vibration and an initramfs hook ( https://salsa.debian.org/DebianOnMobile-team/qcom-phone-utils/-/blob/debian/latest/initramfs-tools/hooks/qcom-firmware?ref_type=heads ) so that firmware files get integrated into initramfs and components start to work early during boot.

The most difficult part would be merging the Kernel patches with other patches and resoving the merge conflicts... At least to me, as I don't know C.

If there are no mainlining efforts for a phone yet, then I don't know what to do, as that requires a Kernel dev.

For the Pixel 4a you mentioned, there is a postmarketOS port. So this should be doable. ( https://wiki.postmarketos.org/wiki/Google_Pixel_4a_(google-sunfish) )

That's all not that hard, my main difficulty was finding out what to do. Everything I did so far would be an afternoon of work, if I had just found the necessary information much quicker. Instead I spent two weeks, of which 95 % was finding info, lol.

Just join the Mobian Matrix room, we should be able to help you, even though I know far less than the others there...so far. :p

I do hope that's helpful and I'll happily try to answer more questions. :)

Kernel mainlining effort for the SoC in thr Pixel 4a: https://github.com/sm7150-mainline/linux

[–] version_unsorted@lemm.ee 3 points 8 months ago (1 children)

I know C and I have a pixel 3a. I could probably help out with the kernel patches if you want. I'm not totally clear what work needs to be done. You just need someone to help get those patches merged against the mobian upstream kernel?

[–] erebion@lemmy.sdf.org 3 points 8 months ago (1 children)

Cool! Well, it's just a merge conflict. I don't knoe how to combine the patches. Should be pretty easy for someone that does not need to google for every line of C.

I can give you notes* later on what to do to get to the conflict, then maybe you can resolve it and push the result to some repo? :)

*Just 3 or 4 commands, I think, including the Debian gbp command

[–] version_unsorted@lemm.ee 3 points 8 months ago (2 children)

Yeah sure. I'll pull it all down and reproduce and try to get the conflicts sorted out and push the repo up somewhere. I've never built a Debian kernel before but I'm sure I can figure it out!

[–] lemmeee@sh.itjust.works 9 points 8 months ago (1 children)

Impressive! I'm looking at postmarketOS wiki and it's amazing how many phones are supported now. But it seems they are not working as well as PinePhone or Librem 5 yet.

forgot to turn it off at around 80 % and a few days later it was at 58 %

Damn, I wish my PinePhone was this energy efficient!

[–] erebion@lemmy.sdf.org 6 points 8 months ago (2 children)

Same, my Pinephone does that within an hour maybe xD

[–] PowerCore7@lemm.ee 4 points 8 months ago (2 children)

A64 (the SoC for PinePhone) is mostly intended for set-top boxes (i.e. smart TV), so it is really not designed for power efficiency.

It's really a bummer that most "smartphone" SoCs cannot easily be purchased, and have no proper documentations. Thinkers and smaller manufacturers are stuck with mostly Allwinner and Rockchip SoCs (most of which are engineered as embedded processors) if they want to design something from starch at all.

[–] lemmeee@sh.itjust.works 3 points 8 months ago* (last edited 8 months ago)

That's what I thought and it seems like even those SoCs didn't have very good mainline Linux support.

Edit: I wonder if it would be possible to take some newer Rockchip SoC and underclock it so that it uses less power? Maybe that would help a little and it would still probably be faster than PinePhone Pro.

[–] just_a_frog@c.im 1 points 8 months ago (1 children)

@PowerCore7 @erebion

If they wanna design something from starch, they'd probably be better of trying sourdough.

*badum-tss*

[–] erebion@lemmy.sdf.org 1 points 8 months ago

Exactly my thought, but isn't that breadboarding then?

[–] lemmeee@sh.itjust.works 1 points 8 months ago

The keyboard addon helps a lot, but it makes the phone big and heavy. I wonder what it's like with those extended battery cases that you can buy or 3D print.

[–] bradboimler@startrek.website 7 points 8 months ago (1 children)

Wish more newer pixels could get support I have tried and failed many times outside of my skills unfortunately.

[–] erebion@lemmy.sdf.org 5 points 8 months ago* (last edited 8 months ago) (1 children)

You could join the Mobian Matrix room or the PostmarketOS room I have mentioned in another post on this thread (or whatever the right term is... Comment on a post? Sub-post?). I did not know anything about porting two weeks ago, but asking dumb questions helps learning.

[–] bradboimler@startrek.website 3 points 8 months ago

I have joined it and asked like I said above my skills at least for now I'll give a go again when I get time busy with college right now.

[–] SubArcticTundra@lemmy.ml 7 points 8 months ago

Mmmmmm Phosh

[–] mrshy@lemmy.ml 4 points 8 months ago

Really interesting install here. I'm keen on developments to Mobian and related hardware.

[–] Cwilliams@beehaw.org 4 points 8 months ago (3 children)

Are Phosh and Gnome Shell Mobile the same thing?

[–] smileyhead@discuss.tchncs.de 4 points 8 months ago* (last edited 8 months ago) (1 children)

Phosh was created from scratch, while Gnome Mobile is attempt to port existing Gnome to well... mobile and ultimately share same binaries.

[–] maryjane@social.coletivos.org 3 points 8 months ago (1 children)

@smileyhead

Both use the underlying stack:
gnome-session, g-c-c, network and modem manager, etc.
And both follow the gnome design patterns for mobile.
But the shell's themselves, gnome-shell and phosh are different, phosh is written in gtk and gnome-shell is not.
So sharing code between the two shells is hard.

@Cwilliams

[–] smileyhead@discuss.tchncs.de 2 points 8 months ago

Thanks, edited.

[–] linmob@lemmy.ml 3 points 8 months ago

Very much not. GNOME Shell Mobile was funded by the German Prototype Fund in 2022 IIRC, way later than Phosh was created (funded by Purism for their Librem 5). GNOME Shell Mobile will eventually be part of GNOME proper (meaning it's Mutter, and GNOME Shell, patched to work on small devices), currently it's a patch set on top of multiple GNOME components that's packaged in postmarketOS and the AUR (if you consider AUR stuff packaged).

Phosh was created on based on wlroots (which is also used in Sway and other wayland-native window managers) and GTK3, as a Mobile Shell. Ironically, this way was pursued because Purism developers where told by the GNOME Shell people that an adaptation of GNOME Shell for Mobile would not be feasible.

Both rely on designs created by (at least then) Purism-employed designer Tobias Bernard IIRC, and thus may seem quite similar despite being based on a different tech stack, and both are hosted on GNOME's Gitlab, using all the same apps.

[–] erebion@lemmy.sdf.org 2 points 8 months ago (1 children)

Nope. They look differently and have different functions. PostmarketOS wiki has screenshots: https://wiki.postmarketos.org/wiki/Category:Interface

[–] Cwilliams@beehaw.org 2 points 8 months ago* (last edited 8 months ago) (1 children)

Are you using Gnome Shell Mobile, or Phosh?

[–] erebion@lemmy.sdf.org 3 points 8 months ago

Phosh, Gnome Shell for Mobile is still in develoment and not packaged for Debian yet. As far as I know, it is only packaged in postmarketOS.

[–] Beaver@lemmy.ca 3 points 6 months ago (1 children)

Lit thank you for helping to expand access!

[–] erebion@lemmy.sdf.org 3 points 5 months ago (1 children)

And hopefully I can save a few devices from getting trashed. :)

Made huge amounts of progress since I posted this! Should really post a follow-up at some point. :D

[–] Beaver@lemmy.ca 1 points 5 months ago (1 children)

You’re awesome! I can’t wait to see what you have been cooking up!

[–] erebion@lemmy.sdf.org 2 points 4 months ago

Will have to post a proper update soon-ish, but for now I'll just say that the device completely* works and I just have to get the kernel package into Mobian (until patches are upstream), for that get some Kernel packaging stuff right (it already builds, but is not yet the quality Debian people expect) and then create a few smaller MRs at projects which Mobian is built upon.

*everything except some sensors and some patches which exist but aren't yet pushed to git...

[–] mvirts@lemmy.world 3 points 8 months ago (1 children)

:( now i really wish my pixel 3 wasnt bricked

[–] erebion@lemmy.sdf.org 10 points 8 months ago

Those are impossible to hard brick in my experience, you would need to break both bootloaders and recoveries. See if this helps:

https://flash.android.com/welcome

Also, Pixel 3 has different hardware, but is supported by pmOS and I've spotted some commits in Mobian, so there might be people working on it there.

[–] thejevans@lemmy.ml 1 points 8 months ago (1 children)

Excited for this! I already have a Pixel 3a on the way to try out Ubuntu Touch.

[–] michael_palmer@lemmy.sdf.org 5 points 8 months ago (1 children)

Ubuntu touch is pretty but useless. Unlike postmarketOS/Mobian it doesn't support native linux apps.

[–] erebion@lemmy.sdf.org 1 points 8 months ago (1 children)

Not exactly. But while UBPorts has a good looking user interface, they don't have many UBPorts apps yet. A regular distribution can often be more useful, but as always it depends on the use-case.

[–] michael_palmer@lemmy.sdf.org 2 points 8 months ago

What can we talk about when there isn't even an up-to-date version of the browser for Ubuntu touch?

[–] erebion@lemmy.sdf.org 1 points 4 months ago

I've posted a follow-up, it looks much better now: https://lemmy.sdf.org/post/19600671