Turning Mobile Phones into Linux System with postmarketOS

●3 ●6 ●10
calendar_today • schedule2 min read
— Originally published at journal.manoedinata.com

I have two unused Samsung phones lying around, those are Samsung Galaxy J4 (2018, codenamed j4lte) and Samsung Galaxy A51 (2019, codenamed a51). For some time, I’ve been planning to make use of these phones. I was like, “I spent money on these, there’s no way I’ll let these phones be neglected in my drawer.”

The Goal

My main goal is to turn them into small home servers, which I can access anywhere in my house. Simply put, I want these phones to act as my experiment systems, as well as small servers with 24x7 uptime, plus the ability to self-host productivity applications like Stirling-PDF and Vikunja.

Sounds overwhelming? Yes, it is. But bear with me, it will be a fun side project.

Android? Nope.

Though I could just install Android ROMs, root them with Magisk or KernelSU, and use e.g. Termux, it’s not fully efficient. Android is resource-heavy, and generally not ideal for this kind of stuff.

So… what is the most suitable OS for this?

Say Hi to postmarketOS!

After some sort of research, I found postmarketOS project, and since then, things have changed.

postmarketOS (abbreviated as pmOS) is an operating system primarily for smartphones, based on the Alpine Linux distribution. Unlike many other projects porting conventional Linux distributions to Android phones, postmarketOS does not use the Android build system or userspace. This way, Alpine runs 100% on the phone, without virtualization, emulation, or whatever that is people use to run Linux on Android.

Also, each phone has only one unique package, and flashable installation images are generated using its installation tool called pmbootstrap.

Ain’t that cool?

Porting

The birth of postmarketOS project is a gamechanger. PostmarketOS has a community where people, in a collaborative spirit, try to bring Linux to various devices. Thanks to this, I was able to port postmarketOS onto one of these devices. What I expected to be a full messy steps to do, was done only on 2 days, assuming that I have no prior knowledge about pmbootstrap.

Samsung Galaxy J4 (j4lte)

The first device I ported onto is Samsung Galaxy J4. It has Exynos 7570 SoC, brutally similar to Exynos 7870. It’s safe to say that Exynos 7570 is the lower spec of Exynos 7870. Though Samsung did modify some parts, but still, they were like siblings. With that, I could use Exynos 7870 configurations as references.

Also, there’s an existing port for Samsung Galaxy Xcover4 (2017, codenamed xcover4lte), which uses Exynos 7570. I could just copy over the xcover4lte device & kernel configurations, rename it to j4lte, adjust some values, and voila! Things couldn’t have been more easier :D

Samsung Galaxy A51

What about A51? Its SoC (Exynos 9611) should be similar to an existing port of Samsung Galaxy S9 (Exynos 9810), but it uses dynamic partitions, so I need some time to understand the ideal partition layout for pmOS. I could use a hand as well. Probably use someone’s device configuration for it.

What’s Next?

Now that I got postmarketOS ported on my J4, I can proceed to setup this as a home server. The next thing I would do is to run Docker. I will discuss it further in the next post.

Want more #linux & #postmarketos deep dives?

Join 6,156+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

3 Comments

0 votes
0 votes
0 votes

More Posts

Stop Turning Every REST Endpoint into an MCP Tool: A Better Approach to AI Tool Design

zeekwrites - Nov 30

The cleanup failed on the night there was nothing to clean

BashSnippets - Dec 2

Decoding Subclinical Signals: Turning "Lifestyle Noise" into Predictive Health Insights

Huifer - Jan 31

StarlingX 13.0 Turns Two Edge Upgrades Into One Reboot. Test the Targets Yourself.

Tom Smithverified - Nov 24

A deploy guard that passes with no token

BashSnippets - Nov 24
chevron_left
742 Points • 19 Badges
East Java, Indonesia • manoedinata.com
2Posts
3Comments
Just an ordinary "hooman"

Related Jobs

Commenters (This Week)

2 comments
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!