[Lenovo Vibe K4 Note Guides, News, & Discussion] PraneethMv:
Hey Guys,

Yep, I know there are a whole lot of threads for imei problem fix, but I've seen a lot of threads with solutions only working either for stock rom, or there is some random imei showing up on your device. This is a thread on fixing imei problem working for custom ROMs. Yes! :D . I have tried this AOSP Extended and Resurrection Remix OS 5.8.3 both by mohancm and I'm pretty sure it will work on any custom ROM. This fix is based on partitions backup from your stock rom, so there will be no issues.

This solution was given by Senior Member [MENTION=6450691]KaMyKaSii[/MENTION], so all thanks to him! :) Lets get started!

Requirements:

1) Your device ( Obviously :p )

2) Stock ROM Marshmallow.

3) Rooted Device

4) Maui Meta 3G/ SN Write Tool (Optional)

Procedure:

1) If you are on Custom Rom, flash marshmallow stock ROM (Search the forums, there a lot of threads), using SP Flash Tools.

2) After going to stock rom, next step is unlocking bootloader, there are many threads on doing this, but I'll sum it up here if you

want:

i) Go to Developer Settings>OEM Unlocking. Enable the option. Also enable USB Debugging Mode.

ii) Connect to a computer and open adb on it. Check if the device is connected using the command

adb devices

iii) now use the command

adb reboot-bootloader

In fastboot use this command to unlock bootloader

fastboot oem unlock

Do as it says and reboot.

iv) Now again after rebooting go to bootloader and flash TWRP.

3) Root your device by flashing MagiskSU or SuperSU.

4) Now, download and install FX File Explorer from play store, Open it and enable Root Access from Settings>Add-Ons And

Themes in file explorer.

5) Now go back and open System (Root) folder in file explorer.

Note: If you haven't already restored, restore your imei, bluetooth address and serial number using Maui Meta or SN Write Tool.

6) In system root, grant Root permissions, and go to dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name folder.

7) In that folder, copy the files mentioned below:

expdb
nvdata
nvram
proinfo
protect1
protect2
secro

8) Copy these files in some place where it is safe ( I have copied it to Internal Storage in a folder named PartitionsBackup)..

9) Next, go back to root folder again, and open data/nvram/md/NVRAM/NVD_IMEI and copy the MP0B_001 file to internal storage. Do Not copy this file in the same place as the previous files, but remember where you have copied this file.

These are all the partitions that store the device's IMEI .

10) After copying everything mentioned, Reboot to recovery and flash the desired Custom Rom.

11) Make sure the rom is rooted, and again install FX File Explorer from play store, enable root access as above.

Do Not Forget To Backup Everything Before Doing Anything!

12) Now select the files that you have copied in internal storage (Assuming PartitionsBackup). And copy those files. ( Note: Do Not Copy the MP0B_001 file!)

13) Now open root folder, go to dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name folder and paste all the files you have copied, and if asked select Merge/Overwrite files.

14) Reboot.

15) Now go back to internal storage, copy the MP0B_001 file where you have saved it. Go back to root folder and open data/nvram/md/NVRAM/NVD_IMEI and copy the file, select Merge/Overwrite. Now long press the file and select Security, update permissions as Read, Write for both root and radio. Dis-select everything else.

16) Reboot aand Done! Voila ! You should get back the IMEI for your device :victory:

I know its a long post, but it works for Custom ROMs.! :)

Hope it helps!

Hit Thanks If you feel it works! :highfive: