Can't mount nvram. How to make and restore NVRAM backup - Lenovo smartphones - general questions - Lenovo Forums RU

NVRAM is a special area of \u200b\u200bmemory on modern smartphones with an operating android system... When the phone is turned on for the first time, information regarding the IMEI of the phone, connected SIM cards, etc. is recorded in this department. If the firmware is unsuccessful on the smartphone, the file from NVRAM may be erased, then some of the important information will be lost. In some cases, this leads to the loss of functionality of the smartphone.

How to determine if the problem is in NVRAM

Loss of NVRAM is often the result of an incorrect rollback of settings through third party programs, partial or full firmware, also done incorrectly. Signs by which you can judge the loss of a file:

  • If you turn on Wi-Fi on your smartphone, a network appears with the name “ NVRAM warning err \u003d 0x10 ";
  • After entering the USSD command *#06# the response message does not receive IMEI codes, because they are stored in NVRAM.

In some cases, the phone cannot detect the SIM card network.

Recovery methods

Before starting the recovery process, it is recommended to charge the smartphone at least 50%, preferably completely. It does not matter in what way the lost file will be returned, this procedure takes some time and it is impossible for the phone to run out of power.

Restoring from a backup

This requires Root rights on the phone. Recovery is possible only if the owner made a full backup before flashing. It is recommended to save the file backup on a PC so as not to lose it when recording a new OS on a smartphone. Restoring NVRAM from a backup made:

  1. Launch the recovery application on your phone;
  2. Connect smartphone to PC via USB;
  3. Enable Root access on your smartphone;
  4. Click the Restore button;
  5. Follow the instructions of the system on the device.

The appearance of the menu and user actions may vary slightly by different devices and operating systems.

Through TWRP Recovery

The TWRP Recovery app can be downloaded. It is free and installed directly on your smartphone. TWRP Recovery allows you to restore the entire system or individual parts, including NVRAM.

  1. Launch the application;
  2. Enter the "Restore" menu;
  3. Find the required backup option;
  4. Select the partitions that the user wants to restore;
  5. Confirm selection.

Via SP Flash Tool

The program is designed to work with device firmware. You can download the SP Flash Tool on the developer's official website. You need to connect your smartphone to a PC with the utility installed via USB:

  1. Launch SP Flash Tool;
  2. Find the phone with the program;
  3. Go to the "Write Memory" tab;
  4. In the File Path section, specify the path to the file with NVRAM;
  5. Press the memory button;
  6. Reflash the smartphone with the factory version of the OS.

Via terminal

The algorithm for working with the ADB utility is similar to the previous versions. You need to connect your smartphone to your PC, specify the path to the NVRAM file and press the Root button.

To work with the utility, Root rights must be installed on the phone.

If there is no backup

Not every user is smart enough to make a backup before installing the firmware. If there is no copy of an important file, there are ways to recover without it.

Using a patch

A special patch was created to restore NVRAM. You can download the patch. The following is the algorithm:

  1. Install the archive into the phone's memory using one of the programs listed above, for example, TWRP;
  2. In the recovery mode on the smartphone, find a file called "Patch IMEI Fixing", run it;
  3. Wait for the installation to complete.

SN Write Station Tool

The program is free, you can download the SN Write Station Tool. Installed on a PC, works with a smartphone USB connection... SN Write Station Tool is designed to repair IMEI.

Best compatible with Windows 7, may be unstable on other operating systems.

IMEI & SN Writer

You need to download and install the utility on your computer. Further:

  1. Connect smartphone to PC;
  2. Install a connection in IMEI & SN Writer (put a daw on USB);
  3. Select partitions to restore in the Write Litem tab;
  4. Press the large START button to start recovery.

Overwriting IMEI after flashing, a common problem most often encountered by owners of smartphones based on MKT chips. A “nameless” device simply cannot catch the net and turn into a beautiful toy. Reconstruction of the apparatus is a complex and expensive procedure. However, you can do this at home as well. Now we will tell you how.

Process mechanics

The destruction of IMEI occurs due to the overwriting of the information file nvram. It also stores serial number devices, calibration of wireless equipment. To restore this file, all information will have to be rewritten manually. It is not easy to understand this process, so we are considering replacing your damaged nvram file with a donor one, which can be downloaded on the Internet.

After replacement, the serial number, addresses and IMEI of the device will match the donor. The smartphone will start ringing, but then it is better to seek professional help. You can also "disguise" IMEI as "native" yourself. But after the next reset, the donor information will return.

We also recommend that you first read the article "Flash Lenovo, Fly, Huawei, etc. based on MTK while keeping IMEI." It will help you not to be left without IMEI, if the phone is still working normally.

Warning:

This instruction is not a guide to action. The resource administration is not responsible for what you do with your smartphone or tablet.

Preparation

The first thing to do is to flash the smartphone with a clean firmware, as indicated in the article above. Also enable the installation of programs from unknown sources.

Next, get root and install modified recovery one of the methods of the article "Simple ways to get Root on devices with MTK65XX processor"

Find the donor file on the Internet nvram and download to the memory card of the device. The file should look like this.

You will also need to download the Terminal Emulator for Android application and download the Mobileuncle MTK Tools program if you want to "register" your IMEI after the restoration is completed.

Anticipating questions: yes, this is the easiest method to repair IMEI.

Installing the donor nvram file into the system

So the file nvram.img on the memory card, root received, Terminal Emulator for Android is installed. Now go into Terminal Emulator for Android, confirm superuser rights and enter the command SU, the selection is confirmed with the "enter" key. You will see a shell (#) prompt.

In the terminal, write the command dd if \u003d / sdcard / nvram.img of \u003d / dev / nvram

When the process finishes, Terminal Emulator for Android will display the following text.

Now we read the article "Resetting Android Device Settings from Recovery Mode" and resetting the settings to factory defaults. The smartphone will start up and start to catch the network. In principle, you can stop at this. But walking with someone else's IMEI is illegal. Let's enter yours.

Replacing IMEI with "native"

Rewrite the IMEI from the box or back cover of the device on a separate sheet If the root rights are not lost, reinstall Mobileuncle MTK Tools and run the program.

Now find the menu Engineer mode - MTK engineer mode

Scroll to the tab Telephony and find CDS Information

Now go to Radio Information - Phone 1 and enter the command AT + EGMR \u003d 1.7, "IMEI" ... Here "IMEI" is your IMEI overwritten from the box.

Click Send AT command, reboot your smartphone and enjoy your IMEI.

But if the device is for two SIM cards, you will need to enter the second IMEI. Making our way again CDS Information - Radio Information - Phone 2, but now we use the command like AT + EGMR \u003d 1.10, "IMEI"... We enter again, reboot, check the correctness of the IMEI in the settings and calmly use the device.

What is NVRAM

NVRAM in the application for smartphones on the MTK platform is a service area in non-volatile memory, which stores IMEI, MAC addresses for WiFi, BT, and many other information unique to your smartphone. When you reset to factory settings, a copy is made from this section to the user data / data section, and this data is already used by Android.

What is the risk of damage to the NVRAM partition

Malfunctioning or not working WiFi, BT, mobile communications

How can you mess up the NVRAM partition

The version of the SP Flash Tool that worked incorrectly during the firmware version (which is why it is recommended to use the version that comes with the firmware), full formatting of the memory in the SP Flash Tool (in rare cases, you have to do this operation), the wrong script for recovery.

These problems can be avoided if to follow simple rule : having received a smartphone in your hands, the first thing to do is to make a backup (including the NVRAM partition, or at least just it) and save it on your computer!

Perhaps there will be some problems with it and you will have to return it under warranty, it happens that the firmware with which it came can simply not be found on the network, perhaps you are re-experimenting with the firmware .... I recommend making a full backup, and then experiment.

To create a backup, you must have root rights on your phone or installed recovery TWRP.

A backup of the NVRAM partition can be obtained in the following ways:

Spoiler

With the help of custom TWRP recovery.

If your phone already has an advanced TWRP recovery, you can make a backup in it to restore (in it) all the main system partitions - just press the button in the main menu

Backup, check all boxes Select partitions to back Up , check the box to enable compression Enable compression , set a name by pressing Set Backup Name and swipe to the right to start creating a backup

Spoiler

After that, reboot and, having connected the smart to the PC, copy the folder TWRP \\ BACKUPS \\ the name of your backup to a safe place. You can always restore any necessary partition from such a full backup, including NVRAM

Spoiler

Using MTK Droid Tools from a PC.

Most of the owners of phones on the MTK platform know this powerful tool.

Download latest version from here (author's link, will be the simplest form of gratitude to download the program using it)

  • On the phone in the settings in the "Developer options" section is enabled USB debugging... If you do not have the "Developer options" section in the settings, then go to the "About phone" item in the settings and turn on the display of the "Developer options" section by 7-fold tap on the build number.

After that, run MTKdroidTools.exe as administrator and connect the cable to the telephone port on motherboard PC (back)

After the program detects your phone, a colored rectangle will appear in the lower left corner, signaling the possibility of working with the phone.

If this rectangle green as in the screenshot - everything is in order, there is a root shell

Spoiler

If this rectangle yellow , then you need to click on the bottom right button ROOT and follow directions

Spoiler

Most often the program manages to get a temporary root shell.

After that, press the IMEI / NVRAM button, check the checkboxes on the items / dev / nvram and / data / nvram and press the button Backup... At the end of the work, two files with the bin and tar extensions and information in the name about the phone name, IMEI and the date / time of the NVRAM backup will appear in the BackupNVRAM program subfolder.

Spoiler

Spoiler

Download archive and unzip to folder with full access for you (preferably, without spaces and Russian letters in the path), in which you will store your NVRAM backup.

Check before starting that:

  • Antivirus is temporarily disabled on the computer
  • ADB drivers installed on the computer
  • On the phone, in the settings in the "Developer options" section, USB debugging is enabled. If you do not have the "Developer options" section in the settings, then go to the "About phone" item in the settings and turn on the display of the "Developer options" section by 7-fold tap on the build number.

Connect your phone with a cable to the port on the PC motherboard (back) and run NVRAM_backup.bat, at the end of the work, the file will appear in the folder nvram.img.

Mashing IMEI and the correct way to solve the problem, or what is NVRAM .

IMEI on our devices crashes when formatting, and sometimes when flashing FlashTool.
To understand the nature of this phenomenon, you need to plunge into the depths of the EMMC. There is a section / dev / nvram... It contains IMEI, SN, MAC addresses of network interfaces, etc.
If you open the scatter, you can find it in the 16th line __NODL_NVRAM 0xe00000. Start of line __NODL_ forces flashtool to ignore this item. Why, in spite of this, he sometimes overwrites it - I do not know. This is precisely the reason for the disappearance of IMEI after the firmware, and as it is clear from the previous one, not only IMEI. That is, we delete the section without giving anything in return!
So / dev / nvram is stitched at the factory and all further official updates and firmware do not even dare to touch it. No matter how the software part changes, it remains unchanged. In rare cases, the manufacturer makes changes to it, and releases firmware for service centers, including this section in it.

On the working system, IMEIs are along the path / data / nvram... More precisely / data / nvram / md / NVRAM / NVD_IMEI /. The / data / nvram directory is created when the device is first started, by copying the contents into it / dev / nvram... There is a widespread recommendation to save the / data / nvram folder for future recovery. This, of course, is true, as well as calls for backup in principle. You will restore the calibrations with the names, but this directory is useless when restoring partition / dev / nvram.

What needs to be done to avoid future problems?
First, you need to create a complete memory dump of the device. I recommend that you do this immediately after purchasing the device, before starting your search for the world's best firmware. Depending on the dump method, among other files there should be a file nvram.img... It is img with a size of 5242880. This is the image of the required partition. Any nvram.tar and other ext4 are copies of / data / nvram and are not of interest.
To create only an image of the / dev / nvram partition, you can use the command:
dd if \u003d / dev / nvram of \u003d / sdcard / nvram.img bs \u003d 5242880 count \u003d 1
5242880 is the partition size for devices on platforms 6577-6589. As a result, a file will be created along the sdcard path nvram.img... We save it in a safe place.

How do I recover an overwritten / dev / nvram partition?
The easiest way is to copy the previously saved file into the device memory, type the command:
dd if \u003d / sdcard / nvram.img of \u003d / dev / nvram
The result of a successful team development will be the lines
10240 + 0 records in
10240 + 0 records out
5242880 bytes transfered in… ..
To flash this section with FlashTool, we find the line in the scanner __NODL_NVRAM.... and delete in it __NODL_, after which, in the program window, select our nvram.img... We choose exactly. Although it will become available in the program window, FlashTool will not pick it up by itself.
Sometimes the flash tool does not want to sew this section separately. In this case, you need to download the firmware for the flash drive, open the edited scanner and mark, among other things, nvram.img

In order to flash FlashTool using the Upgrate method, which requires the inclusion of all items, only the sections necessary at the time, we do the following:

Open scatter in any text editor. We add __NODL_ to the beginning of the line of the section that we want to exclude. For example __NODL_PRELOADER 0x0. Save, open the Scatter with FlashTool and sew only those sections that have not been commented out, because FlashTool will not see them.

This trick allows you to both hide and open the closed points of the scatter. Thus, you can selectively sew the necessary sections through Upgrate, for example nvram.