How to fix “Invalid IMEI” error on some MediaTek devices

After flashing a different firmware with FlashTool you might discover that you’ve ended up erasing a custom partition that was holding factory preset configuration, including the IMEI value(s).

In this case the device will end up not being able to register to the mobile networks.