Librem 5 flashing process fail (LED turn green

Why does my command uuu -lsusb not work? Wrong version of uuu ?

florian@Laptop2022:~$ uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips – libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

Unknown option: -lsusb

florian@Laptop2022:~$ uuu
uuu (Universal Update Utility) for nxp imx chips – libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

uuu [-d -m -v -V] <bootloader|cmdlists|cmd>

bootloader  download bootloader to board by usb
cmdlist     run all commands in cmdlist file
            If it is path, search uuu.auto in dir
            If it is zip, search uuu.auto in zip
cmd         Run one command, use -H see detail
            example: SDPS: boot -f flash.bin
-d          Daemon mode, wait for forever.
-v -V       verbose mode, -V enable libusb error\warning info
-m          USBPATH Only monitor these paths.
                -m 1:2 -m 1:3

uuu -s Enter shell mode. uuu.inputlog record all input commands
you can use “uuu uuu.inputlog” next time to run all commands

uuu -udev linux: show udev rule to avoid sudo each time
uuu -h -H show help, -H means detail helps

uuu [-d -m -v] -b[run] <emmc|emmc_all|fat_write|qspi|sd|sd_all|spl> arg…
Run Built-in scripts
emmc burn boot loader to eMMC boot partition
arg0: _flash.bin bootloader
arg1: _image[Optional] image burn to emmc, default is the same as bootloader
emmc_all burn whole image to eMMC
arg0: _flash.bin
arg1: _rootfs.sdcard
fat_write update one file in fat partition, require uboot fastboot running in board
arg0: _image image, which cp to fat partition
arg1: _device storage device, mmc\sata
arg2: _partition
arg3: _filename[Optional] file name in target fat partition, only support rootdir now
qspi burn boot loader to qspi nor flash
arg0: _flexspi.bin bootloader
arg1: _image[Optional] image burn to flexspi, default is the same as bootloader
sd burn boot loader to sd card
arg0: _flash.bin
sd_all burn whole image to sd card
arg0: _flash.bin
arg1: _rootfs.sdcard
spl boot spl and uboot
arg0: _flash.bin

uuu -bshow <emmc|emmc_all|fat_write|qspi|sd|sd_all|spl>
Show built-in script

Enjoy auto [tab] command complete by put below script into /etc/bash_completion.d/uuu
_uuu_autocomplete()
{
COMPREPLY=($(/usr/local/bin/uuu $1 $2 $3))
}
complete -o nospace -F _uuu_autocomplete uuu

Yes, definitively (in my opinion).

Above shows that you installed uuu package from official PureOS repository, yet it is not in charge at all (on your system/computer).

Therefore, as I just guess that you build below version of uuu long time ago and forgetting it is still on your computer, please remove/purge this 1.2.91+0git6b465 uuu version, delete content of your current libpureos/ folder (make this folder disappear/gone, for this step being).

Start with this:
sudo apt purge uuu
sudo apt autoremove

Find and delate libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8 folder.

Please check again with apt list uuu and if hopefully not installed start from beginning:

sudo apt update
sudo apt install uuu
apt list uuu

If now output similar to this one, one of very same uuu package shown, actually installed, proceed with:

$ apt list uuu -a
Listing... Done
uuu/now 1.4.193-1 amd64 [installed,local]
uuu/stable 1.4.77-1 amd64

uuu -lsusb

From here (when above achieved), take a break and go back to any Librem 5 re-flash approach but please do not forget to execute this very important one:

By trying to be focused and short, hope that this post gives you some clarification, and helps.

P.S. Need to go out now but other members will take over if you are having other questions.

root@Laptop2022:~# sudo apt purge uuu
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden Pakete werden ENTFERNT:
uuu*
0 aktualisiert, 0 neu installiert, 1 zu entfernen und 19 nicht aktualisiert.
Nach dieser Operation werden 535 kB Plattenplatz freigegeben.
Möchten Sie fortfahren? [J/n] j
(Lese Datenbank … 179424 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von uuu (1.4.77-1) …
Trigger für man-db (2.9.4-2) werden verarbeitet …
root@Laptop2022:~# sudo apt autoremove
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 19 nicht aktualisiert.
root@Laptop2022:~# apt list uuu -a
Auflistung… Fertig
uuu/byzantium 1.4.77-1 amd64

root@Laptop2022:~# find libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8
find: ‘libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8’: Datei oder Verzeichnis nicht gefunden
root@Laptop2022:~# apt list uuu -a
Auflistung… Fertig
uuu/byzantium 1.4.77-1 amd64

root@Laptop2022:~# sudo apt update
Holen:1 https://repo.pureos.net/pureos byzantium InRelease [5,851 B]
Holen:2 https://repo.pureos.net/pureos byzantium-security InRelease [4,581 B]
Holen:3 https://repo.pureos.net/pureos byzantium-updates InRelease [4,580 B]
Es wurden 15.0 kB in 1 s geholt (18.1 kB/s).
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Aktualisierung für 19 Pakete verfügbar. Führen Sie »apt list --upgradable« aus, um sie anzuzeigen.
root@Laptop2022:~# sudo apt install uuu
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
Die folgenden NEUEN Pakete werden installiert:
uuu
0 aktualisiert, 1 neu installiert, 0 zu entfernen und 19 nicht aktualisiert.
Es müssen 164 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 535 kB Plattenplatz zusätzlich benutzt.
Holen:1 https://repo.pureos.net/pureos byzantium/main amd64 uuu amd64 1.4.77-1 [164 kB]
Es wurden 164 kB in 0 s geholt (555 kB/s).
Vormals nicht ausgewähltes Paket uuu wird gewählt.
(Lese Datenbank … 179419 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von …/uuu_1.4.77-1_amd64.deb …
Entpacken von uuu (1.4.77-1) …
uuu (1.4.77-1) wird eingerichtet …
Trigger für man-db (2.9.4-2) werden verarbeitet …
root@Laptop2022:~# apt list uuu
Auflistung… Fertig
uuu/byzantium,now 1.4.77-1 amd64 [installiert]
root@Laptop2022:~# uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips – libpureos/1.2.91+0git6b465-0pureos+librem5.2-1-g5e5fee8

Unknown option: -lsusb

root@Laptop2022:~#

Didnt work and i cant find this folder…:confused:

1 Like

I’ll stay today lazy to do this on my computer and build uuu again, but you should try this:
du -kh /etc/udev/rules.d/70-librem5-flash-image.rules
du -kh /etc/udev/rules.d/
sudo rm -rf /etc/udev/rules.d/
sudo rm -rf /etc/udev/ −− would be only optional, if above doesn’t help.
sudo systemctl reboot

As second step:
sudo ./scripts/librem5-flash-image --udev −− install the udev rules, latest version.

As my above thought here based (mainly) on: https://developer.puri.sm/Librem5/Development_Environment/Phone/Troubleshooting/Reflashing_the_Phone.html.

Aftewards uuu -lsusb should work on your computer anyway (otherwise I have no clue on why it is not working, just probably I didn’t look deep enough at this issue of yours).

When you get there (uuu -lsusb works as expected) and ready (you already know that I’m not focused all the way, and sometimes not helping much, but hope you’ll manage to remove what blocks you at this moment from successful re-flash of this Linux phone), as first please ensure that your Librem 5 phone is in flashing mode and execute (hold Volume-up key, etc.):

~$ lsusb | grep 8M
Bus 002 Device 014: ID 1fc9:012b NXP Semiconductors i.MX 8M Dual/8M QuadLite/8M Quad Serial Downloader
~$ uuu -lsusb

When and if Librem 5 physically not connected (or rather not recognized from host side, for either or reason, anyway we do need to ensure that the latest version of uuu working properly within host Linux system) over USB cable output (as next step after executing: sudo ./scripts/librem5-flash-image --udev, I’m quite sure) should look like this:

~$ uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips -- lib1.4.193

Connected Known USB Devices
	Path	 Chip	 Pro	 Vid	 Pid	 BcdVersion
	==================================================

@Flo127, within extracted /home/…/librem5-flash-image/debian folder you will find librem5-flash-image.librem5.udev file. Workaround might consist (just for the purpose of explaining you what is wrong there, at this moment, as normally related --udev script will do this) editing and putting content of this file to /etc/udev/rules.d/70-uuu.rules file, yet and therefore is better to take easier path (please just follow current official re-flashing procedure exactly, step after step) and executing:
sudo sh -c "uuu -udev >> /etc/udev/rules.d/70-uuu.rules"
sudo udevadm control --reload

EDIT: But this command counts:

~$ grep -r ‘1fc9’ /{{,local/}lib,run,etc}/udev/rules.d/

If this simple command doesn’t provide any output on your Linux system you are still not ready and should not proceed with re-flashing of your phone (first when this command works on your host Linux machine, bringing/putting Librem 5 into flashing mode will end up with successful install). I do hope that this note provides some additional background, and helps you to move forward.

Hello,

I, am currently helping @Flo127 with his Phone but i also have still similar problems like him but with some changes.
The phone gets correct detected with the command uuu -lsusb so that should be no problem i think.
The problem starts at the moment when the script finally downloaded the image and i plug the phone via usb-c to usb-c into the laptop then it show me the first bar at 100% and stops. (with the button pressed)

What i also see and maybe can be an indicator for the problem is, that when i plug the phone again into the laptop with the volume up button pressed i get a new bar what reached also 100% and stops and btw it is 1 to 1 the same bar like bevor only with the diverens that it is now in a new line.(but only when i press the button bevor i plug it in)

@Quarnero, you write that it can be the wrong version of uuu, but i was also not able to find the files/folders to delete it. Can you tell me where this folders normally should be on the system? Maybe i am able to find it then and can get the right version with the apt package manager if i understand it right what it is for and why i should delete it.

Thank you in advance for your response.

1 Like

Seems like some communication issue. Try another port, another cable, different USB-C orientations or use a USB-A port instead.

BTW. Once the green LED shines up and the phone vibrates, you can release the vol+ button.

Thank you for the fast response! :smiley:

I try your advice but still have the same problem.

To make the situation clear why we flashing the phone and maybe give you a possible indicator of the problem we have here the the story with the phone:
After receiving the brand new phone he charge the phone than turn it on, it works without any problems.
The next day the battery was empty but the phone was in standby mode the hole night.
After he recharged the battery the phone did not start anymore to be precise led lights but the screen stays black, and it was not only the backlight of the display that turnt not on it is the full screen because i try to see something on the screen because there were a similar problem what i found in the internet but it was not the case with this phone.

What i also realised is when i plug in the phone for flashing into the laptop the screen on the top side gets warm, only warm not hot. The battery on the other hand stays cold much longer.
Maybe the situation i describe and your experience with the phone can tell you something about the problem.

Thank you in advance and sorry for my not so perfekt english. :sweat_smile:

As I recall at this moment: There is NO NEED for this (disconnect => connect again action).

Therefore (explaining this up to my understanding, rewriting what already correctly written): “Remove battery” together with “Hold volume-up” means that after next step: plug into your Librem 5 USB-C connector of your USB-C to USB-A cable (that is already connected to your computer/laptop) blinking red LED light will turn instantly into steady red, right after you released volume-up button (will start to charge Librem 5 with around 0.45A in this flashing mode, which logically recommends having pre-charged Librem 5 battery to at least 70%, as this battery will start to actually discharge, at least slightly … during here related process).

As @dos kindly recommended please use preferably (shorter USB-C to USB-A cable):

What is here important is that after battery inserted (red LED light steady) please do not move here mentioned Librem 5 phone around any more (not even 1 mm left or right, up or down, as perhaps previous flashing process interrupted this way already, leave phone steadily connected few minutes even after 100% of … as shown on your host screen).

After above (no need to disconnect this Librem 5 any more, please, this will be confirmed/observed from your side as correct) you will be ready to proceed (if selected USB-C to USB-A cable of adequate quality):

$ apt list uuu
Listing... Done
uuu/stable,now 1.4.193-1+b1 amd64 [installed,automatic]

$ lsusb | grep 8M

It is your turn now (good luck to both of you, quality USB2.0 cable will serve this purpose as well).

@dos

Hi! I bought new 50cm USB 2.0 USB-A to USB-C cable and still same result.
Trying to get some info from purism support, had written them 3 e-mails since friday but still no anwer :confused:

I am now already tired of this phone and would like to send it somewhere to get it fixed

Please use OEM USB-C2USB-A cable and GNU OS to recovery the L5 otherwise u will stumble.

Status quo:

I had now some very expirienced help from @Quarnero who tried to flash my phone as well with the following result (Thank you very much again):

apt list librem5-flash-image
Listing… Done
librem5-flash-image/now 0.0.4-1 all [installed,local]
/Documents/Librem5_Florian/purism-librem5# uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips – lib1.4.193

Connected Known USB Devices
Path Chip Pro Vid Pid BcdVersion
==================================================
2:1 MX8MQ SDP: 0x1FC9 0x012B 0x0001
/Documents/Librem5_Florian/purism-librem5# librem5-flash-image --board librem5r4
2023-07-22 09:17:03 INFO Looking for librem5r4 plain byzantium image
2023-07-22 09:17:06 INFO Found disk image Build 14748 ‘plain librem5r4 byzantium image’ from Sat Jul 22 01:30:59 2023
2023-07-22 09:17:07 INFO Found uboot Build 85 from Thu Aug 25 15:22:41 2022
2023-07-22 09:17:07 INFO Downloading to ./tmp_librem5-flash-image_he_tyk5h
2023-07-22 09:17:07 INFO Downloading image from https://arm01.puri.sm/job/Images/job/Image%20Build/14748/artifact/librem5r4.img.xz
2023-07-22 09:20:44 INFO Calculating sha256sum of ./tmp_librem5-flash-image_he_tyk5h/librem5r4.img
2023-07-22 09:21:25 INFO Downloading uboot from https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/85/artifact/output/uboot-librem5/u-boot-librem5.imx
uuu (Universal Update Utility) for nxp imx chips – lib1.4.193

Success 0 Failure 0

2023-07-22 09:26:33 ERROR CTRL-C pressed.============] SDP: boot -f u-boot-librem5.imx
2023-07-22 09:26:33 INFO Cleaning up.
@Flo127, around 11h00 I’ve sent your Librem 5 back to you:
https://www.dhl.de/de/privatkunden/dhl-sendungsverfolgung.html?piececode=CR863053908DE

Now, this Jumpdrive outputs (especially third one below: ‘HID(W):LIBUSB_ERROR_TIMEOUT’, that works while used Jumpdrive own Linux Kernel) are important (I think) to be sent to Purism Support Team:

/Documents/Librem5_Florian/purism-librem5# ./boot-purism-librem5.sh
uuu (Universal Update Utility) for nxp imx chips – lib1.4.193

Success 0 Failure 0

2:1 1/ 1 [=================100%=================] SDP: boot -f u-boot-librem5.bin
/Documents/Librem5_Florian/purism-librem5# uuu -lsusb
uuu (Universal Update Utility) for nxp imx chips – lib1.4.193

Connected Known USB Devices
Path Chip Pro Vid Pid BcdVersion
==================================================
2:1 MX8MQ SDP: 0x1FC9 0x012B 0x0001
/Documents/Librem5_Florian/purism-librem5# ./boot-purism-librem5.sh
uuu (Universal Update Utility) for nxp imx chips – lib1.4.193

Success 0 Failure 1

2:1 1/ 1 [HID(W):LIBUSB_ERROR_TIMEOUT ] SDP: boot -f u-boot-librem5.bin
I still think it is about USB communication issue not communicating toward eMMC yet this still does not mean that eMMC is “dead”, I still believe it is about flash procedure (software that I’m not familiar with) approach that is missing this, sort of initial, communication toward this Librem 5 eMMC.

P.S. I gave up on my thought to boot this Librem 5 from microSD card as this would not help anyone (and might be interpreted as misuse of this phone).

If you are trying to reflash the Librem 5 with new images, use these instructions. Next time, do not press CTRL + C to cancel the flashing process.

@FranklyFlawless

Thanks for advise…it’s not working due to the phone…Already 3 different people tried.

It’s now the turn from purism support to solve this problem! It was a new phone and it should work out of the box. I have alreaedy spent too much time to get it working and have already 3 batteries for a not working phone because i always got told it’s problem with battery.

Well I regularly reflash my Librem 5 USA so I already know the procedure very well, but if you do not want my help, go ahead and contact Purism support then.

Hopefully you do not get a fourth battery this time.

I really appreciate your your intentions and would try it 6 months ago.

If you are sure to get it running I have a brand new Librem5 with 3 batteries for sale :stuck_out_tongue_winking_eye:!

I am already tired of it and have lot of other things to do where I get actually some results.

I am certain I can solve it, but I have no interest in purchasing a Librem 5 when I already have a Librem 5 USA. I simply do not need two.

I just like cleaning/wiping devices, because I always feel inspired with a clean slate.

It is not about getting “clan state”, it is about not getting LIBUSB_ERROR_TIMEOUT error.

Hi,

I believe I am having similar problems. I attempted to upgrade via the system upgrade, but it failed (froze and never unfroze).

I rebooted, but there was no response except green LED and blank screen.

I have tried with 3 different computers and about 6 different high-quality USB cables in all configurations, but all I ever get is the following:

./scripts/librem5-flash-image --dir .
2023-07-27 16:52:13 INFO Looking for librem5r4 luks byzantium image
2023-07-27 16:52:14 INFO Found disk image Build 14786 ‘luks librem5r4 byzantium image’ from Wed Jul 26 22:54:25 2023
2023-07-27 16:52:14 INFO Found uboot Build 85 from Thu Aug 25 09:22:41 2022
2023-07-27 16:52:14 INFO Downloading to .
2023-07-27 16:52:14 INFO Calculating sha256sum of ./librem5r4.img
2023-07-27 16:52:30 INFO Image already up to date - no download needed.
2023-07-27 16:52:30 INFO Downloading uboot from https://arm01.puri.sm/job/u-boot_builds/job/uboot_librem5_build/85/artifact/output/uboot-librem5/u-boot-librem5.imx

        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 – libuuu_1.5.21-0-g1f42172

Success 0 Failure 0

1:2 1/ 1 [=================100%=================] SDP: boot -f u-boot-librem5.imx

After this nothing happens and the light turns solid green. Then both red and green are on.

And that’s it. The script does not continue.

Have tried this with Debian, PureOS, Arch linux, and Debian on Arm64. Same outcome.

uuu -lsusb give:

uuu (Universal Update Utility) for nxp imx chips – libuuu_1.5.21-0-g1f42172

Connected Known USB Devices
Path Chip Pro Vid Pid BcdVersion
==================================================
1:2 MX8MQ SDP: 0x1FC9 0x012B 0x0001

Cannot load using jumpdrive.

Anyone have a suggestion on what to try next? I have about 15 years of experience with flashing ROMs and Linux, but this one has me stumped.

2 Likes