UUU Error during reflashing

I’m following these instructions to reflash my librem 5 (Evergreen batch, still on the version before byzantium). I’m running this script:

# using already downloaded images
./scripts/librem5-flash-image --dir ~/data/librem-images --skip-download

and I am getting this output/error as I plug in the usb-c cable (while holding volume-up button):

2024-01-28 10:37:27 INFO Looking for librem5r4 luks byzantium image
2024-01-28 10:37:28 INFO Found disk image Build 16154 'luks librem5r4 byzantium image' from Sat Jan 27 21:47:30 2024
2024-01-28 10:37:29 INFO Found uboot Build 85 from Thu Aug 25 07:22:41 2022
2024-01-28 10:37:29 INFO Downloading to /home/user/data/librem-images
2024-01-28 10:37:29 INFO Skipping download and using local image '/home/user/data/librem-images/librem5r4.img'

            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 -- libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

Wait for Known USB Device Appear...
Error: Unknown Command:FB: reboot


Traceback (most recent call last):
  File "/home/user/src/librem5-flash-image/./scripts/librem5-flash-image", line 538, in <module>
    sys.exit(main())
  File "/home/user/src/librem5-flash-image/./scripts/librem5-flash-image", line 521, in main
    flash_image(uuu_target, args.debug)
  File "/home/user/src/librem5-flash-image/./scripts/librem5-flash-image", line 351, in flash_image
    subprocess.check_call(['uuu', uuu_target])
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['uuu', '/home/user/data/librem-images/flash_librem5r4.lst']' returned non-zero exit status 255.

I’m running Pop_OS! 22.04 and installed uuu via: sudo apt install uuu.

Any advice on a fix for the unknown reboot command?

2 Likes

Hmmm, my guess the problem is that you are using Pop_OS. Maybe try a PurismOS live image?
I think you might be missing programs that the script needs in order to run. Whilst sure, you can install all needed programs manually, is much easier to just boot a PureOS live image.

1 Like

See if these instructions work better. It might catch any missing python dependencies.

2 Likes

I tried this first, but I’m having a separate issue with the PureOS iso booting to GRUB. The iso boots normally if I use a VM, but any usb flashed iso isn’t working. I tried etcher, Gnome Disks, plain dd, and I also tried a few different USB drives in case those were broken, same result in cases.

1 Like

I don’t have experience with PureOS live USB specifically, but most LiveUSBs I worked with are plug an play. You use dd to burn the data on the flash, you press F11 or whatever is in your UEFI to select the where to boot from.

1 Like

Thanks @amarok , when running sudo apt build-dep . I didn’t get any errors so I think all the python dependencies are met. The error doesn’t say anything about any missing python dependencies, it looks like a uuu fastboot error.

2 Likes

Do you have a local copy of uuu that is overriding the distro copy or an out of date version?
which uuu
uuu --version

Also, unless you have done the udev stuff, you will need to run as root i.e. sudo ./scripts/...

I used Ubuntu 22.04 to reflash my phone. While I haven’t ever used PopOS, I assume the version numbering aligns with Ubuntu. Also, you may be better off with an Ubuntu Live Boot if you are having difficulty with a PureOS Live Boot.

Also, always use lsusb to see whether the Librem 5 correctly appears in serial download mode i.e. to make sure that you did the procedure correctly on the Librem 5 end of things.

1 Like

@irvinewade , here is the path/version on uuu, I think this is the only version installed:

which uuu

outputs:

/usr/local/bin/uuu

and,

uuu --version

a --version option is unavailable (is that expected?), however it still outputs:

uuu (Universal Update Utility) for nxp imx chips -- libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

Unknown option: --version

I set the the udev rules, but ran that command again just to be sure:

sudo ./scripts/librem5-flash-image --udev
2024-01-29 08:20:44 INFO Udev rules '/etc/udev/rules.d/70-librem5-flash-image.rules' already present

Can you elaborate on this:

Also, always use lsusb to see whether the Librem 5 correctly appears in serial download mode i.e. to make sure that you did the procedure correctly on the Librem 5 end of things.

If I check lsusb now (librem5 plugged in and battery in), I have:

Bus 004 Device 005: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget

Is that correct? What else should I be doing on the librem5 end of things other than holding volume-up and putting the battery in?

1 Like

Looks wrong to me.

Yes, sorry, it is expected. It’s just a hack way of getting it to output the version.

Your version may be somewhat out of date. I’m seeing 1.4.193 (from Ubuntu 22.04).

So let’s go slightly differently. I would check

apt list uuu

to confirm that you have it installed and what version you have installed.

No. However this is tricky because you must look using lsusb immediately after putting the phone in serial download mode and before doing the flash. At that point in time you are expecting:

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

That shows that it is in serial download mode and waiting for the host to start downloading commands and content to it (via uuu).

1 Like

@irvinewade , looks like I did have another uuu in my path. I cleaned that up and here is the my new uuu info:

which uuu
/usr/bin/uuu

and

uuu -version
uuu (Universal Update Utility) for nxp imx chips -- lib1.4.193

However, now I am getting No matching image found errors when running:

./scripts/librem5-flash-image --debug --dir ~/data/librem-images/ --skip-download
2024-02-05 21:02:02 INFO Looking for librem5r4 luks byzantium image
2024-02-05 21:02:02 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:02 DEBUG https://arm01.puri.sm:443 "GET /crumbIssuer/api/json HTTP/1.1" 200 155
2024-02-05 21:02:02 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/api/json?depth=0 HTTP/1.1" 200 1077
2024-02-05 21:02:02 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:02 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16227//api/json HTTP/1.1" 200 852
2024-02-05 21:02:02 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:03 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16226//api/json HTTP/1.1" 200 862
2024-02-05 21:02:03 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:03 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16225//api/json HTTP/1.1" 200 862
2024-02-05 21:02:03 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:04 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16224//api/json HTTP/1.1" 200 860
2024-02-05 21:02:04 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:04 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16223//api/json HTTP/1.1" 200 858
2024-02-05 21:02:04 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:04 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16222//api/json HTTP/1.1" 200 864
2024-02-05 21:02:04 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:05 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16221//api/json HTTP/1.1" 200 861
2024-02-05 21:02:05 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:05 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16220//api/json HTTP/1.1" 200 863
2024-02-05 21:02:05 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:05 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16219//api/json HTTP/1.1" 200 865
2024-02-05 21:02:05 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:06 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16218//api/json HTTP/1.1" 200 861
2024-02-05 21:02:06 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:06 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16217//api/json HTTP/1.1" 200 862
2024-02-05 21:02:06 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:06 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16216//api/json HTTP/1.1" 200 862
2024-02-05 21:02:06 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:07 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16215//api/json HTTP/1.1" 200 861
2024-02-05 21:02:07 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:07 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16214//api/json HTTP/1.1" 200 868
2024-02-05 21:02:07 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:07 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16213//api/json HTTP/1.1" 200 863
2024-02-05 21:02:07 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:08 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16212//api/json HTTP/1.1" 200 861
2024-02-05 21:02:08 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:08 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16211//api/json HTTP/1.1" 200 862
2024-02-05 21:02:08 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:08 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16210//api/json HTTP/1.1" 200 863
2024-02-05 21:02:09 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:09 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16209//api/json HTTP/1.1" 200 862
2024-02-05 21:02:09 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:09 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16208//api/json HTTP/1.1" 200 865
2024-02-05 21:02:09 DEBUG Starting new HTTPS connection (1): arm01.puri.sm:443
2024-02-05 21:02:10 DEBUG https://arm01.puri.sm:443 "GET /job/Images/job/Image%20Build/16199//api/json HTTP/1.1" 200 942
2024-02-05 21:02:10 ERROR No matching image found

I tried without the dir/skip-download options and get the same thing.

1 Like

Looks like someone is in the process of messing around with things.

I suggest: Don’t --skip-download but add --stable

2 Likes

That did it! I now have a newly flashed phone :tada:

thanks for the help!

3 Likes