PostmarketOS on Nexus 5

Since I haven't been able to focus on my own blog entries on my personal site. I may as well leave a small note for myself here. I'll probably remember to come back, right?

PostmarketOSwebsite Once in a while I dust off an old device, or aquire one randomly. I check the PMOS wiki for supported devices, or just browse whatever and see what's available for testing/fun. Today's entry is focused on Google's Nexus 5 (hammerhead.) – Originally released in 2013 and launched with Android 4.4 KitKat. At the time of writing we are in 2025, and current android is on 15, with no fun codename.

Previous Notes: I already had this device unlocked and running DivestOS (now defunct.) which at its core was LineageOS 13/14? Very impressive as the performance was incredible to even see such an old device running modern android without too many hiccups. Granted it wasn't the fastest, but it also wasn't as slow as you might think. I mention this as the device was already unlocked and re-paritioned according to modern guides for LineageOS, TWRP, and of course DivestOS. This context is important to know before continuing reading.

Installation via PMOS Wiki:Source Naturally most installation instructions are always on a dedicated wiki or thread of some kind. I used the official wiki which only has two steps (minus the unlocking step.)

while in Fastboot mode:

Flashing For installation you need to flash lk2nd and flash the rootfs. Do not flash the boot partition since lk2nd uses fs-boot functionality to boot the kernel from the /boot partition of the rootfs.

  1. $ pmbootstrap flasher flash_lk2nd
  2. $ pmbootstrap flasher flash_rootfs If flashing fails with an error like “Unknown chunk type”, you may need to update your bootloader. bootloader-hammerhead-hhZ20h.img comes with the latest firmware from the android image page and can be flashed with fastboot flash bootloader path/to/bootloader-hammerhead-hhZ20h.img.

This might seem straightforward but it's missing a crucial step. What isn't directly mentioned is that you need ADB tools (this typically is already installed if you're used to flashing Android.) and pmbootstrap. See now pmbootstrap is the key to getting everything up and running as once you have it installed and setup, you run the script (as the wiki suggests) and it walks you through whatever device is supported and gets you all setup. So in this case it would be hammerhead I get to select the device, the PMOS version (edge/stable) and a very important step, the desktop! Thankfully the script only shows you what is supported by the device so you don't accidentally install something that doesn't work by default. Although be aware just because it's supported doesn't mean it runs smooth. The wiki shows a photo of the Nexus 5 running with Plama Mobile, but I have already had a different device running this and know what to expect and I wanted to try something else. I ended up choosing FBKeyboard at first as I had an idea to use this device as a small testing server. Hey others use PMOS devices to run whole Minecraft servers, I figured I wanted a goofy project for the hell of it too, why not? spoilers: because one of the steps in pmbootstrap didn't take, I was missing the rootfs so obviously it didn't boot into anything. I was able to see the splash screen, and sometimes it dropped me into a special mode with a almost functional keyboard where I can dump logs, or continue booting, or reboot. It wasn't Fastboot but I am unsure what this mode is called.

Successful Instalation + Boot: Either way, I tried looking up similar errors, and it all brought me to the same thing. Something about a missing step. I went back to the wiki and sure enough under common errors, it said it was safe to reflash rootfs using pmbootstrap so I went ahead and did that. Sure enough it took just fine. I was not able to boot immediately after, and had to reboot a few times before I got past the splash screen. After that I was greeted with sxmo and I was able to connect to wifi, run updates (no updates at this time. Already ran them via pmbootstrap.) Eveything except Firefox was pretty much working. Enabling the terminal is hit or miss. Sometimes it crashes but this is expected. Wiki says it's not meant for daily use yet, and it's natural to expect some bugs.

Now what? I don't have any current plans, as I am happy this device is running something and if I come up with an idea I'll likely report back. I just wanted to document my journey both for myself or anyone else looking to try PMOS on thier Nexus 5. According to the wiki there is quite a handful of others who own this device and also run PMOS. How active is it? That's unknown. Still very nice to see regardless.

#postmarketos #mobile #foss