@alainw94 The only way (probably) is install Flyme Global(International) version, the one with possibility to unlock the bootloader, then start the phone normally, grant usb debugging under developer options, cope the very same Flyme version update.zip to phone, reboot to recovery and select to update and wipe as well. This method is proven to work on Android (Flyme ) I have once ( or more times) lost IMEI while playing around with UT and Flyme and RR, anyway, this is how I restored it.
Then just flash back the ubuntu touch recovery and flash the desired version of UT with Ubports installer or ubuntu-device-flash . Probably backup your files before you do this and DO NOT flash Flyme a (chinese) version, otherwise might expect trouble with changed ID of the phone to Chinese and would require the whole process of changing it again to Global/International and unlocking the bootloader... Anyway, has your Pro5 come as an Ubuntu Touch version, or just you converted the Android version? Mine was Android and can confirm successfully restoring the IMEI that way.

@alainw94 I think you misunderstood...when I installed Anbox then my phone lost the IMEI number for some reason. I was just wondering if you made the same but from your answer it is clear you didn't so the reason why you lost the IMEI should be something else. However, try to follow Stefano's suggestion above and flash again Flyme in order to recover your IMEI.

@stefano hi! Many thanks for your answer, I will try your solution, the phone was initially running Android, I convert it to Ubuntu 2 days after buying it. I should have the international version somewhere on my computer. I'll keep you informed.

@stefano hi ! I tried it. I revert back to flyme os daily. once started, I did it again. I still don't have IMEI. one interresting things is that on one of the update.zip from Flyme OS, I found two files, one is a binary nammed machine_match, it is working like that: machine_match filetoread. The second file is imei.dat so I tryed :

./machine_match imei.dat

and the result was my two IMEI numbers.

I:IMEI[0]: [8686.........]
I:IMEI[1]: [8686.........]

So they are readed from the ROM but now, how can I copy them back to the nvram ?

@simox In my case I wasn't able to recover, I changed the main board for 50$ on AliExpress. It was a Chinese version installed, I changed the proinfo to intl_official and then install ubuntu. The phone is running fine now. By the way, I decompil the libril library and I found 2 interesting entry , one of them is : NvProtectedFile::Unprotect(unsigned char *), I will deeply look at it when I will have time to do that.