Maining a Linux phone (Day 1)

Recently (like, two days ago) I obtained a Xiaomi Mi A2 Lite. I've had my sights on this phone for a while due to its relatively high postmarketOS compatibility and decent specs, and thanks to @cityplanist on Twitter I was able to get one for cheap in (mostly) working condition. He also sent me a couple other "small" things like:

all of which you'll definitely be seeing more of soon, either here or on Twitter. aanyway, back to the A2 Lite. Because it's not a MIUI device (rather, it runs Android One), unlocking the bootloader was fairly easy. Instead of the Mi Account shenanigans you have to perform (making one, verifying it with a phone number, waiting 14 DAYS until you can actually get the key to unlock the damn loader, and not to mention needing some stupid Windows app to do it all), you just unlock it like a Pixel. Go to Developer Options, switch the.. switch, reboot to fastboot, fastboot oem unlock and you're done!

Flashing postmarketOS is even easier to do with pmOS's pmbootstrap tool. All you need to do is install the tool on your computer (either from Git or your package manager), pmbootstrap init, pmbootstrap install, pmbootstrap flasher flash-lk2nd, pmbootstrap flasher flash-rootfs --partition=userdata and you're done, right? ...right?

Well no, not really. Here come the

Complications, hiccups, mistakes, etc.

As with any pmOS install, things are just bound to go wrong. Here's what went wrong:

This was caused by systemd for some reason (artix gang rise up, just kidding), switching to OpenRC by saying never fixed that issue. Unfortunately, the only native OpenRC system images use desktops like SXMO, and while I do really like SXMO, it just isn't very well optimized on notched screens, so I decided to go with Phosh. As Phosh is designed to work with systemd, here comes the other big issue.

This ties into the systemd/OpenRC issue. Pretty much anything that you'd think needs to modify system settings in some way (mounting an external drive, changing brightness, volume, calling, sending SMS, turning on mobile data, connecting, etc.) just threw an Access Denied error. This was annoying and I frankly had NO idea what was causing it until I did a little brainstorming and realized it was probably due to Polkit and the init mismatch. I looked and Polkit was running, it was just unable to authenticate stuff in GUI even though it worked just fine in the terminal. I fixed this by writing a Polkit rule (in JAVASCRIPT mind you) to automatically allow every elevation as long as the user was in the wheel group, even if they don't provide a password. Horribly insecure for a shared computer, but it's just a phone, who cares.

// /etc/polkit-1/rules.d/49-nopass.rules

polkit.addRule(function(action, subject) {
    if (subject.isInGroup("wheel")) {
        return polkit.Result.YES;
    }
});

Now other than that, everything was working! Except:

I have literally NO idea how to fix this, it just doesn't work. I just don't hear anything, the other party hears me, I don't hear them.

I expected this. If you're gonna be running Linux on a phone, expect the camera to not work.

Same as with the camera. Just say bye bye to any proximity sensors or whatever.

Conclusion

My first day was pretty much full of just troubleshooting. Aside from the occasional chugs and sometimes a Phosh crash (so far has happened only once), it's running pretty well! I am gonna try to write a blog post every day with what I did with the phone, but I might not always have the time or content to do so, in which case you'll get a Twitter post.

As for the apps I'm using for keeping in touch with people:

That's about it for today, see you tomorrow! maybe...

ADDENDUM 14/08/25: I managed to fix the call audio, turns out Phosh improperly switches the source so you have to switch it to the earpiece manually before picking up or placing a call

← Back to index