Error while trying to reflash librem5

Hi I am trying to reflash librem5 (Dogwood) with PureOS using instructions on https://developer.puri.sm/Librem5/Development_Environment/Phone/Troubleshooting/Reflashing_the_Phone.html but when running ./scripts/flash-image --board librem5r3 --dir files but I get error “Failure open usb device,Try sudo uuu”

Output:

    2021-01-12 17:09:57,009 INFO loading from files
uuu (Universal Update Utility) for nxp imx chips -- libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

Success 0    Failure 1                                                                                                                                                                       
                                                                                                                                                                                              
1:1    1/ 0   [Failure open usb device,Try sudo uuu  ]                                                                                                                                        
2021-01-12 17:09:58,516 INFO Cleaning up.
Traceback (most recent call last):
  File "./scripts/flash-image", line 123, in <module>
    sys.exit(main())
  File "./scripts/flash-image", line 110, in main
    flash_image(uuu_target, args.debug)
  File "./scripts/flash-image", line 55, in flash_image
    subprocess.check_call(['uuu', uuu_target])
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['uuu', './flash_imp2f9pc/flash_librem5r3.lst']' returned non-zero exit status 255.

I think you need to add “sudo” before that command, like this:

sudo ./scripts/flash-image --board librem5r3 --dir files

At least that has worked for me (on Birch, so librem5r2 in my case).

4 Likes

Thanks, now it works :smiley:

1 Like

im trying to get my phone back from the latest update and all i keep getting is this error.
nick@nick-librem13:~/librem5-devkit-tools$ sudo ./scripts/librem5-flash-image
2021-05-26 20:37:01 INFO Looking for librem5r4 plain amber-phone image
2021-05-26 20:38:14 INFO Found disk image Build 7766 ‘plain librem5r4 amber-phone image’ from Sun May 23 01:40:39 2021
2021-05-26 20:38:17 INFO Found uboot Build 23 from Fri May 7 19:24:47 2021
2021-05-26 20:38:17 INFO Downloading to ./devkit_image_a9swh52u
2021-05-26 20:38:18 INFO Cleaning up.
Traceback (most recent call last):
File “/home/nick/librem5-devkit-tools/./scripts/librem5-flash-image”, line 468, in
sys.exit(main())
File “/home/nick/librem5-devkit-tools/./scripts/librem5-flash-image”, line 441, in main
download_image(urljoin(image_ref[‘url’], ‘artifact/{}.xz’).format(IMAGE.format(board)),
File “/home/nick/librem5-devkit-tools/./scripts/librem5-flash-image”, line 178, in download_image
resp.raise_for_status()
File “/usr/lib/python3/dist-packages/requests/models.py”, line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://arm01.puri.sm/job/Images/job/Image%20Build/7766/artifact/files/meta.yml

1 Like

Quoting someone more knowledgeable than me:

It’s fixed in staging and should migrate in a few hours: https://master.pureos.net/migrations/excuse/4b1c100d-6fbd-415a-b06c-4eddc7eeeac5

After that, a new flashable image will have to be built, so I’d estimate it will not take longer than a day before you can retry and succeed.

2 Likes

The new image is online now.

4 Likes

thank you so much. i have a working phone again. :+1:

1 Like

I followed these instructions but there is no librem5-flash-image file. I followed these instructions and now the phone is reflashed with Byzanthium, but there is no encrypted filesystem. Any idea why?

I think it’s because the git repo for this has changed recently, it used to be https://source.puri.sm/Librem5/librem5-devkit-tools but now it is https://source.puri.sm/Librem5/librem5-flash-image

The blog post with the instructions that did not work for you, that uses the old git repo that I think is nowadays supposed to be for the devkit as the name says.

So the change is good because it was confusing to use a repo called something with “devkit”. But it is unfortunate that the instructions in that blog post no longer work. Perhaps @david.hamner could update it, or just add some kind of disclaimer about this?

3 Likes

Did you do: Librem 5 Encryption Confusion ?

I think this is it - the flashing script is set to ‘plain’. I’ll set it to ‘luks’ and rerun. Thank you! I’ll have a chance to confirm in about 24 hours.

** Edit **
It worked! Thank you irvinewade

1 Like