Backup & Restore NVRAM/IMEI for MTK Based Android Smartphones

Having a smartphone running on the open-source Android operating system has its own advantages. You can install new ROMs, modify different components of the operating system and even compile the whole operating system yourself. If you have an MTK chipset based Android phone and you are experimenting with many different ROMs like CynagenMod, Paranoid, PlusOne etc., you may accidentally lose NVRAM – the data stored on your smart phone that stores IMEI and network connection codes. Without the correct NVRAM data, your phone will not be able to connect to the cellphone providers and other networks. This is why it becomes important to backup the NVRAM data before starting to try different ROMs. In this article, you will learn how you can backup and restore the NVRAM data for your MTK (Mediatek) chip based Android phone.

NVRAM Backup & Restore

Note: This has been tested only on MT65XX based phones running Android 4.4. There is not guarantee that it will work for other configurations.

Preparation:
  1. Install ADB Tools on PC : You can either install them through the Google Android SDK (more than 100 MB download) or you can use the 15 seconds ADB installer that installs only ADB and Fastboot (10 MB download). The 15 seconds ADB installer, installs everything you need for this to work including the ADB drivers. You can download it from here : https://www.dropbox.com/s/1immdt54mfpon5g/adb-setup-1.4.2.exe?dl=0.
  2. Root Your Android Device : Rooting is necessary to access the system files. You can root your Android device using Kingo Root.
  3. Install SuperSu on Android : You can find Chainfire SuperSu app from the Google Play Store. This app controls how the root access is provided to various apps.
  4. Enable Developer Options in Android : You have to enable Developer options in Android, so that you can access and modify files using the ADB tools from your Windows computer. You can learn it here : how to enable Developer options in Android.
  5. Enable USB Debugging : In the Developer Options (at the bottom of the Android Settings screen), you have to enable USB debugging to enable access via the ADB tools.
Backup NVRAM:
  1. Connect your Android phone with a USB cable to your Windows PC.
  2. Open a command prompt in Windows and give command adb devices. A prompt will appear on the smart phone screen to allow USB debugging – choose to allow the debugging.
  3. Give the command adb devices again until you see your device serial number in the list of the connected devices. If there are more than one devices in the list, remove all other Android based devices.
  4. Give the following command to backup NVRAM:
    md c:\nvbackup\
    taskkill /f /im adb.exe
    adb.exe shell su -c “dd if=/dev/nvram of=/data/local/tmp/nvram.img bs=5242880c count=1”
    adb shell su -c “chmod 0777 /data/local/tmp/nvram.img”
    adb.exe pull /data/local/tmp/nvram.img c:\nvbackup\nvram.img
  5. You will now have a new file c:\nvbackup\nvram.img in your Windows PC that holds the NVRAM data backup. Copy it to a safe place like a cloud storage account.
Restore NVRAM:
  1. Connect your Android phone with a USB cable to your Windows PC.
  2. Open a command prompt in Windows and give command adb devices. A prompt will appear on the smart phone screen to allow USB debugging – choose to allow the debugging.
  3. Give the command adb devices again until you see your device serial number in the list of the connected devices. If there are more than one devices in the list, remove all other Android based devices.
  4. Give the following command to restore NVRAM (assuming that a backup is stored at c:\nvbackup\nvram.img)
    taskkill /f /im adb.exe
    adb.exe push c:\nvbackup\nvram.img /data/local/tmp/nvram.img
    adb.exe shell su -c “dd if=/data/local/tmp/nvram.img of=/dev/nvram bs=5242880c count=1”
    adb reboot

    NVRAM Backup & Restore

  5. Your Android phone will reboot automatically. Remove the USB cable and now you would be able to see that the NVRAM/IMEI data has been restored.

Conclusion: Losing NVRAM data from MTK (Mediatek) chip based Android smartphones can make it pretty much useless as it won’t be able to connect to any mobile network. But you easily restore the NVRAM data from a backup using the instructions in this article.

One comment

Comments are closed.