Using drmfix for XZ3 – but only works if you backed up TA partition before unlocking bootloader.
In many jurisdictions, altering an IMEI for the purpose of bypassing blacklists or masking a stolen device is illegal. These steps should only be used to restore the original, legitimate IMEI that belongs to your specific device. 1. Initial Troubleshooting
Repair NV/EFS using Qualcomm tools (if EFS backup not available)
Here is a deep dive into the fascinating, complex world of Xperia IMEI restoration.