In this guide, we will show you the steps to fix the invalid IMEI on your MediaTek device using ADB Commands. When you step into custom development, there’s a plethora of tweaks and modifications available for you to try out. From flashing custom ROMs to installing a custom recovery like TWRP, the possibilities stand endless. Along the same lines, you could also gain administrative privileges by rooting your device via Magisk. However, each of these customizations does bring in a few risks as well.
If you don’t flash the mods correctly or flash them to the incorrect partitions, then you are inviting trouble. In this regard, you could easily repair most of these partitions by flashing its stick counterpart via Fastboot Commands. However, it is the repairing of NVRAM or EFS Partition that could prove to be a challenging task. For the unaware, this partition holds your device IMEI number. So if there are any issues with NVRAM/EFS, then there is a high possibility of losing the IMEI number,
Well, this is the last thing that you would want to happen. In this regard, there do exist a few third-party tools such as Modem Meta, Maui Meta, and the likes. However, most of the users prefer to maintain a safe distance from such tools, and so do I. Therefore, I looked out for some alternatives and then stumbled upon a pretty nifty method to fix the invalid IMEI on your MediaTek device using just the ADB Commands. And in this guide, we will be sharing this method with you all. So without any further ado, let’s get started.
Table of Contents
How to Fix Invalid IMEI on any MediaTek via ADB Commands
The below instructions are listed under separate sections for ease of understanding. Make sure to follow in the exact same sequence as mentioned. Droidwin and its members wouldn’t be held responsible in case of a thermonuclear war, your alarm doesn’t wake you up, or if anything happens to your device and data by performing the below steps.
STEP 1: Install Android SDK
First and foremost, you will have to install the Android SDK Platform Tools on your PC. This is the official ADB and Fastboot binary provided by Google and is the only recommended one. So download it and then extract it to any convenient location on your PC. Doing so will give you the platform-tools folder, which will be used throughout this guide.
STEP 2: Enable USB Debugging and OEM Unlocking
Next up, you will also have to enable USB Debugging and OEM Unlocking on your device. The former will make your device recognizable by the PC in ADB mode. This will then allow you to boot your device to Fastboot Mode. On the other hand, OEM Unlocking is required to carry out the bootloader unlocking process.
So head over to Settings > About Phone > Tap on Build Number 7 times > Go back to Settings > System > Advanced > Developer Options > Enable USB Debugging and OEM Unlocking.
STEP 3: Unlock the Bootloader
The process also requires an unlocked bootloader. Do keep in mind that doing so will wipe off all the data and could also nullify the device’s warranty. So if that is all well and good, then please refer to our comprehensive guide to How to Unlock Bootloader of Any Android Device.
STEP 4: Root MediaTek Device
Next up, you will have to root your MediaTek device in order to gain admin-level privileges as well as access to the system partition. So please refer to our detailed tutorials:
STEP 5: Fix Invalid IMEI on MediaTek via ADB Commands
- Connect your device to the PC via USB cable. Make sure USB Debugging is enabled.
- Then head over to the platform-tools folder, type in CMD in the address bar, and hit Enter. This will launch the Command Prompt.
- Type in the following command in the CMD window to open the shell window:
adb shell
- Then execute the below command in the CMD window to get the SuperUser access on your device
su
- You will now get a prompt on your device, make sure to Allow/Grant it.
- Now type in the below command to write the IMEI on SIM 1 (make sure to replace 123456789012345 with your IMEI number)
echo 'AT +EGMR=1,7,"123456789012345"'>/dev/radio/pttycmd1
- Then type in the following command to write the IMEI on SIM 2 (again, make sure to replace 123456789012345 with your IMEI number)
echo 'AT +EGMR=1,10,"123456789012345"'>/dev/radio/pttycmd1
- That’s it, you may now restart your phone for the IMEIs to be saved.
So with this, we round off the guide on how you could fix the invalid IMEI on your MediaTek device using ADB Commands. If you have any queries concerning the aforementioned steps, do let us know in the comments. We will get back to you with a solution at the earliest.