Source code for Easy Installer recovery tool

I’ve been looking at re-uploading Tezi (Easy Installer) to a Verdin imx8mp module. The instructions for loading it through USB otg reference the recovery-linux.sh script inside the Tezi tarball.

Inside this script, I find it calls a recovery/uuu command, which is a compiled elf binary.

Question: Is the source code for this binary available anywhere?

Background: I’m not so inclined to run arbitrary closed blobs on my machine (especially since it runs under sudo, which I suspect is not even really needed if proper USB device permissions are configured in udev), so it would be helpful if this tool had source available to give me more insight in what the tool does and allow running it without worries. This becomes especially relevant once we start shipping our product, I’m even more hesitant to require our customers to run an unknown binary from a third party as root…

For now, I’ll go ahead with the SD-card recovery method, so this is not blocking me.

Seems I just solved my own question. A bit more googling shows that this uuu tool is the Universal Update Utility, not from Toradex but NXP. Source code seems to be available here: GitHub - nxp-imx/mfgtools: Freescale/NXP I.MX Chip image deploy tools.

Even better, this tool seems to be available in Debian already as well: Debian -- Details of package uuu in bookworm

I should have searched a bit better before asking, though now this might make this info a bit more readily available for others too.

Hi @matthijs !

Thanks for the question and the answer! :stuck_out_tongue:

Also, we have this Partial Updates | Toradex Developer Center article with some information. In addition, Home · nxp-imx/mfgtools Wiki · GitHub has some good information about uuu usage :wink:

I marked your answer as the solution.

Have a nice day!

Running uuu from Debian

I’ve tried running the uuu version from Debian, which works just fine. Tested with a Verdin IMX8MP on a dev board.

To check whether it recognizes your board (after forcing it into recovery mode), you can use:

uuu -lsusb

Then to actually run through the recovery process, run the following (from inside the unpacked recovery zipfile). This replaces the recover-linux.sh script from the instructions.

uuu recovery

In this command, recovery points to the directory by that name, and instructs uuu to run commands from the recovery/uuu.auto file and run them.

Running without root

As I expected, the recovery can run without root with some udev rules. The uuu tool contains the needed rules and instructions on how to install them, you can get these instructions by running:

uuu -udev

Note that recent versions of the uuu Debian package (since 1.5.21-2) already contain the udev rules generated by the above command, so you can skip this step (but read on for more).

However, the rules generated by this command are not complete, at least not for the Verdin board. During the recovery, it seems the uuu.auto config instructs uuu to upload a fastboot-compatible bootloader and run it, which uses different USB ids than what uuu normally uses. Based on the IDs listed in the uuu.auto file, combined with uuu -udev output, I am now using the below udev file which allows running uuu without root.

cat /etc/udev/rules.d/70-local-toradex-recovery.rules 
# These were generated by uuu -udev
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="012f", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0129", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0147", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="004f", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="013e", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0146", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="014a", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="014b", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0076", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0054", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0061", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0063", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0071", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="007d", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="15a2", ATTRS{idProduct}=="0080", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0128", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0126", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0135", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0134", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="012b", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="b4a4", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="b4a4", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0151", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="b4a4", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="3016", ATTRS{idProduct}=="1001", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="3016", ATTRS{idProduct}=="1001", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="066f", ATTRS{idProduct}=="9afe", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="066f", ATTRS{idProduct}=="9bff", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0153", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="a4a5", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="0d02", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="3016", ATTRS{idProduct}=="0001", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0152", TAG+="uaccess"

# These were manually created based on the Tezi (Toradex easy installer)
# `recovery/uuu.auto` config file, which lists a number of ids that are used by
# a second stage fastboot bootloader.
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="0152", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="4000", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="403a", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="403d", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="403f", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="4040", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="4041", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="4042", TAG+="uaccess"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="4046", TAG+="uaccess"

Hi @matthijs !

Thanks a lot for your investigation about Loating Toradex Easy Installer without using sudo on Verdin iMX modules :slight_smile:

It is a very nice contribution to our Community! :smiley:

Have a nice day!