Troubles Flashing L5 : LIBUSB_ERROR_NO_MEM

Edited post.

I’m trying to flash my L5 and I’m running into issues following this guide: Reflashing the Phone

Everything works until I get to this stage:

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

Success 0    Failure 1                                                                                                                                    
                                                                                                                                                           
                                                                                                                                                           
1:1      3/ 5 [Bulk(W):LIBUSB_ERROR_NO_MEM           ] FB: flash -raw2sparse all librem5r4.img  

I’ve tried searching for the error but couldn’t find any useful results. Any ideas on what to do next?

I found this documentation on the source of the error but my Internet searching isn’t turning up much else:

int libusb_open(libusb_device *dev, libusb_device_handle **devh) Open a device and obtain a device_handle. Returns 0 on success, LIBUSB_ERROR_NO_MEM on memory allocation problems, LIBUSB_ERROR_ACCESS on permissions problems, LIBUSB_ERROR_NO_DEVICE if the device has been disconnected and a LIBUSB_ERROR code on other errors.

From: libusb_open(3) manual page

1 Like

Did you read the thread “Time to Flash now - but how?

There are many tips and how to’s regarding the flashing procedure.

1 Like

I confess I haven’t. I’ll try there and see if I can find success. If so, I will close this thread. I don’t want to hijack it with my particular issue.

1 Like

I did and thanks for the gentle reminder to search before posting. I’ve edited the post for help on what appears to be an original error.

1 Like

Try using a PureOS image on a USB drive and performing the instructions from there.

1 Like

What distro and version do you have on your host computer?

What version of libusb* does it have?

1 Like

Was using Qubes OS. Used a PureOS live image, a USB-A to C adapter, and followed the guide linked in my first post for success. I believe the USB-A to C adapter is a critical requirement for flashing success. I would want others to validate with their experience. I was previously using C to C and getting a lot of errors.

2 Likes

That could certainly complicate things.

I’ve always used an adapter (or adapter cable) because I have no USB-C port on my computer.

Maybe @FranklyFlawless can comment on whether flashing while using Qubes OS is possible and if so what if anything special needs to be done.

1 Like

I have a few Librem Vaults I use for administrative tasks, and it does not matter if I use a USB-A or USB-C port:

The Librem 5 USB-C to C cable I use for the reflashing procedure also works just fine, although I never reflash using Qubes OS for various reasons.

Then it stands to evidence that it was an issue with my USB-C to C cable. My suggestion to future readers to consider the cable as a potential source of issue. I received Error: Unknown Command: FB: reboot errors until I swapped out the cable. And then I received the LIBUSB error with Qubes. And then once I used a PureOS image with the right cable did I get a successful flash.

Good stuff.

1 Like

Cable, yes, but also cable orientation. If you use USB-C then there are 4 orientations. That’s another reason I am happy to use a USB-A to USB-C cable (only 2 orientations). But to be honest I’ve never had a problem with getting into Serial Download mode (for Jumpdrive, reflash, and other things).

1 Like

When I flashed, I used the cable that came with my Sony. USB-A to USB-C.

1 Like

This is why I marked the L5’s cable with a small piece of tape at both ends, once I knew I had the working orientation.

2 Likes

I did not know that. I saw some posts about trying different cable orientations but felt like it was better to try A to C instead. So I appreciate the knowledge. One of the highlights of being in this community is the knowledge transfer. Thanks for that.

1 Like