New Post: Reflashing the Librem 5

How-to reset the Librem 5:
https://puri.sm/posts/reflashing-the-librem-5/

13 Likes

thank you for posting !

by creating a boot-able usb-thumb-drive from one of the images here > https://downloads.pureos.net/amber/phone/gnome/librem5/ we should be able to re-flash the L5 to a newer PureOS release when the situation calls for it. is that correct ?

will this command work from a CLI in Linux ?

sudo dd bs=4M if=/path/to/dir/bootable-os.iso of=/dev/sd(insert-your-drive-letter-here) status=progress oflag=sync

3 Likes

I too am wondering if just a strait dd can flash the L5. As Iā€™d like to just take an image of EXACTLY what the phone came with. Thus when I break it I can put it back to a known working state. Iā€™ve occasionally had issues with trying the a newer install disk that doesnā€™t work on my system for whatever reason, so I like having a ā€œknown workingā€ copy around just in case.

Also Fedora doesnā€™t have uuu, but everything has dd, so I was hoping that might work :smiley:

Will it?

1 Like

Iā€™ve made a quickā€™nā€™dirty port of Jumpdrive some time ago: https://source.puri.sm/sebastian.krzyszkowiak/jumpdrive

When you boot Jumpdrive on your phone it will expose eMMC and SD card over USB as mass storage devices, which allows you to dd them from host computer. FWIW this in mentioned as an alternative flashing method on the Mobian wiki: https://wiki.mobian-project.org/doku.php?id=librem5#using-jumpdrive

6 Likes

I remember seeing this in the Librem 5 Community Wiki: https://source.puri.sm/Librem5/community-wiki/-/wikis/Operating-Systems/Install-PureOS

Donā€™t think its been updated for Evergreen yet.

Is it planned that images with luks encrypted partitions are ready when byzantium will be released?

Then we could get both with a single flash.

Yes, thatā€™s the plan. We decided not to try retrofitting encryption into amber-phone because a switch to byzantium is imminent anyway.

3 Likes

And to add to this, itā€™s one of the reasons we wanted to do a video documenting the flashing process now, because we assume many customers who have their phone will want to reflash when Byzantium is released, both to get encryption, as well as because itā€™s probably the easiest and cleanest way to upgrade from amber.

6 Likes

Just for anyone who doesnā€™t know what Byzanium is, itā€™s the next release of PureOS (PureOS 10).

(I had to look it up)

2 Likes

Hello,
I am following the instructions on the video to reflash the Librem 5 Evergreen using the Live-CD with PureOS Amber. Everything worked fine till the command ā€œsudo ./scripts/librem5-flash-imageā€
The following error message occurred:

pureos@pureos:~/librem5-devkit-tools$ sudo ./scripts/librem5-flash-image
Traceback (most recent call last):
File ā€œ./scripts/librem5-flash-imageā€, line 18, in
import yaml
ModuleNotFoundError: No module named ā€˜yamlā€™
pureos@pureos:~/librem5-devkit-tools$

After that a reflashing is not possible. Any ideas? Where is my mistake?

Thanks

You downloaded the flashing scripts separately but you didnā€™t install all the dependencies that it needs to run. You can do it this way:

sudo apt-get install librem5-host

Then it will run. In addition, you will get another copy of the flashing script.

2 Likes

Hello dcz,
thanks for your prompt answer. Unfortunately now I get this error message:

pureos@pureos:~/librem5-devkit-tools$ sudo apt-get install librem5-host
Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
E: Unable to locate package librem5-host
pureos@pureos:~/librem5-devkit-tools$

I use the amber live-cd and the instructions from the video, normally it should workā€¦

Perhaps I has to use a recently created amber live-cd instead of using ā€œsudo apt-get update && sudo apt-get upgradeā€ before reflashing?

Sorry, that was a guess-advice. Hereā€™s a solid one: go through the guide, starting here: https://developer.puri.sm/Librem5/Development_Environment/Phone/Troubleshooting/Reflashing_the_Phone.html#install-uuu

2 Likes

Looks like you are missing the yaml python package (I bet also the Jenkins package):

sudo apt install python3-yaml python3-jenkins

Then sudo ./scripts/librem5-flash-image should work.

1 Like

that is the solution! Reflashing without errors, thank you!

Oopsy, I didnā€™t expect that. I suppose I better start organizing ā€¦
Do you know where ā€œcontactsā€ data are stored? Itā€™s one of the things I canā€™t manually restore.

.local/share/evolution/addressbook/system/contacts.db

3 Likes

Shameless plug: https://source.puri.sm/Librem5/community-wiki/-/wikis/Tips%20&%20Tricks#contacts

Hello !

I tried to reflash my L5 with the current Byzantium release, but the phone wonā€™t start in ā€œFlash modeā€.

Removed the battery, hold volume-up and connect the USB-C cable ā€¦ but nothing happens :sob:

The phone start and work like expected, but it doesnā€™t start in ā€œflash modeā€. I tried different cables and computers but it wont start and yes i tried to flip the cableā€¦

I hope someone have a solution for me

@execrable Does the volume-up button work while the phone is on? (it should display a volume slider in phosh)

1 Like