Librem 5 Flashing the Jail

I quote the Firmware Jail Gitlab documentaion because I really don’t have any experience in this - so I just don’t get it…

  1. How do you connect the phone to the pc
  2. It says these steps are performed on the PC whit the L5 connected - but I can’t see at what stage are the steps happening on the L5?

Thank you

Purism Firmware Jail

The FW jail is a squashfs written to the NOR flash of the Librem5. These scripts and services mount the jail when found in the flash.

Flashing the Jail

If youir device does not have the jail flashed follow the directions below. These steps are performed on a PC connected to the phone via a USB cable.

Checkout librem5-devkit-tools.

git clone
cd librem5-devkit-tools

Install uuu

sudo apt get install uuu

If your distro does not have uuu then it can be built and installed

./scripts/ -i

Download the jail FW

mkdir -p files
wget -O files/firmware.sqsh

Flash the firmware jail

./scripts/ files/firmware.sqsh 0x30000

Once you see Wait for Known USB Device Appear..., put your phone into flashing mode and connect it to your PC.

Install the helper scripts

On the phone run the command below and the rebot the system to activate the jail

sudo apt install librem5-fw-jail
1 Like

With a USB cable, as the second sentence after Flashing the Jail says.

By the way, the instructions seem to assume your PC is running a debian based linux.

The only command run on the phone is the last:
sudo apt install librem5-fw-jail

1 Like

well yes, but I was wondering - does the L5 needs to be on? I assume so, but does it need to be switched on in special way? like take the battery out connect the L5 to power supply press the volume button add the battery back in etc etc
or does it just needs to be on

that’s good to know

1 Like


From the quoted directions:

put your phone into flashing mode

The phone needs to be in serial download mode (aka flashing mode). That is the mode that allows uuu to be used.

If you succeed in getting your phone into serial download mode and connecting to your host computer via USB then lsusb on the host computer will show the phone as:

Bus 999 Device 999: ID 1fc9:012b NXP Semiconductors i.MX 8M Dual/8M QuadLite/8M Quad Serial Downloader

(where the bus number and device number won’t match the above and will be whatever is appropriate for where you connected the phone to on your host computer).

If you see Serial Downloader then you are good to go. If you don’t then you didn’t quite do it correctly.

I am copying in here the procedure for getting the phone into serial download mode from Reflashing the Phone

  1. Ensure that the phone is switched off.
  2. Turn all Hardware-Kill-Switches off
  3. Remove battery
  4. Hold volume-up
  5. Insert the USB-c cable: (red light blinks, no green light)
  6. Reinsert the battery: (red light is constantly on, the script will continue)
  7. Release volume-up

NB: Don’t follow the rest of the instructions from that web page since you don’t actually want to reflash your phone!


ok that’s very helpful except now I get this

Wait for Known USB Device Appear...
>Start Cmd:CFG: FB:  -vid 0x316d -pid 0x4c05
>Okay (0s)
>Start Cmd:CFG: SDP: -chip MX8MQ -compatible MX8MQ -vid 0x316d -pid 0x4c05
>Okay (0s)
New USB Device Attached at 1:1
1:1>Fail Failure open usb device,Try sudo uuu(0.807s)

any advice ?
I tried the command with sudo and something did seem to work
Having issued the command on the L5 it returned that the package was already on.

Yes, I think this is a standard annoyance. You either install the udev rule so that the USB device (the phone) is accessible on the host without sudo or you use sudo. I do the latter as I don’t need to use uuu very often.