I have used Linux for several years now and I am somewhat used to using the Terminal and also flashing Android devices. I also managed to flash the official Librem5 firmware using the flashing script.
Yet I would like to try other OSes (Mobian, Plasma mobile etc.). I did not manage to flash those using the (somewhat difficult to follow) official instructions.
So my question is: Is there a general way how to flash a firmware to the device and are there any good instructions how to do that? What other OSes would you recommend and I would very much appreciate it, if you could tell me in a way, that the casual Linux user can grasp
I was flashing Mobian today. Just download their image and run these commands:
sudo apt install git uuu if you haven’t done already.
git clone https://source.puri.sm/Librem5/librem5-flash-image.git (delete the previous folder if you have an error)
cd librem5-flash-image and sudo apt build-dep . It installs all python packages. I don’t know if they’re all included in the old tutorial you linked, but better trying to install them then missing without knowing.
sudo ./scripts/librem5-flash-image --udev if you haven’t done yet.
This is Mobian specific: ./scripts/librem5-flash-image --embedded-boot --image [path plus Mobian image file]. [Edit: It seems it is also required for manual downloaded images of PureOS, especially the --empedded-boot argument. Otherwise I get errors or it does not boot at all after flashing.]
Follow the instructions on terminal. You should know it anyway, but maybe someone else reads this, too. Done.
Keep in mind that Mobian weekly can break from time to time.
The Crimson builds (plain and LUKS) stay in loop-boot (phone tries to boot and restart after some seconds before seeing anything on screen). Mobian had:
ick@Debian:~/Git/librem5-flash-image$ ./scripts/librem5-flash-image --image ~/Downloads/mobian-librem5-phosh-20251019.img
2025-10-21 19:21:09 INFO Looking for librem5 u-boot
2025-10-21 19:21:10 INFO Found uboot Build "stable" from Wed Jun 21 13:54:04 2023
2025-10-21 19:21:10 INFO Downloading to /home/ick/Git/librem5-flash-image/tmp_librem5-flash-image_5xk7yi4n
2025-10-21 19:21:10 INFO Downloading uboot from https://storage.puri.sm/librem5/u-boot/latest/artifact/output/uboot-librem5/u-boot-librem5.imx
Enter the flashing mode by holding volume-up button while turning the phone on.
If it's not detected, follow these steps:
- Ensure that the phone is powered off
- Turn all Hardware-Kill-Switches off
- Unplug the USB cable if connected
- Remove battery
- Hold volume-up button
- Insert the USB-C cable (red light blinks, no green light)
- Reinsert the battery (red and green lights constantly on, the script will continue)
- Release volume-up button
Searching...
uuu (Universal Update Utility) for nxp imx chips -- lib1.5.201
Success 0 Failure 1
5:43- 2/ 3 [HID(W): LIBUSB_ERROR_IO (-1) ] SDPV: write -f u-boot-librem5.imx -skipspl
5:43-NXP 1/ 1 [=================100%=================] SDP: boot -f u-boot-librem5.imx
2025-10-21 19:21:49 INFO Cleaning up.
Traceback (most recent call last):
File "/home/ick/Git/librem5-flash-image/./scripts/librem5-flash-image", line 630, in <module>
sys.exit(main())
~~~~^^
File "/home/ick/Git/librem5-flash-image/./scripts/librem5-flash-image", line 613, in main
flash_image(uuu_target, args.debug)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ick/Git/librem5-flash-image/./scripts/librem5-flash-image", line 403, in flash_image
subprocess.check_call(['uuu', uuu_target])
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['uuu', '/home/ick/Git/librem5-flash-image/tmp_librem5-flash-image_gkxbcdrh/flash_librem5r4.lst']' returned non-zero exit status 255.
Which was gone when using --embedded-boot, which is described here.
Note: the --embedded-boot flag instructs librem5-flash-image to install the bootloader to the eMMC boot partition and make it bootable; while not strictly required at this point, it will become mandatory in the near future.
That’s plain wrong. They got it the other way around - --embedded-boot is what will stop working with Mobian in the future (and what restores the old behavior), the current default is what they want.
I use Jumpdrive and nxpmicro-mfgtools on my laptop to mount the Librem 5 eMMC over USB-C, and work from there.
mkdir ~/librem5
curl -sL https://github.com/dreemurrs-embedded/Jumpdrive/releases/download/0.8/purism-librem5.tar.xz | tar Jxv -C ~/librem5
# set all killswitches, remove battery, hold volume-up, plug in librem5, place battery, release volume-up
uuu ~/librem5/purism-librem5.lst
You’ll find the Librem 5 at /dev/sdX
I’ve NixOS installed with Purism kernel but would not necessary recommend as it is a tight fit for the small eMMC and you would have to figure out how to enable phone calls.