How to backup EFS and IMEI

If you’re a custom ROM user, or experimented with them before, you probably know that IMEI and some other important stuff of the device gets overwritten and deletes itself.