Restore stock firmware and lost IMEI/Baseband by SPFlash tool


Thanks for the OP. It took my Hongmi again alive. The only difference was, that during flashing with SP I did not have to put in the battery into the phone.
 
when i first open my phone it was displaying invalid IMEI.I tried this method 3 times and display again invalid IMEI.I am desperate.What can i do?please help me.
Same question to you:

Did you finally solve the issue with your lost IMEI on Red Rice?

I had the same problem, tried a lot of things and finally succeeded with MobileUncle and restoring an IMEI backup file which I luckily had done some months back.

But still after a factory reset the IMEI is gone and I need to start again (root, install MobileUncle, ...).

Your help would be very appreciated.
 
Same question to you:

Did you finally solve the issue with your lost IMEI on Red Rice?

I had the same problem, tried a lot of things and finally succeeded with MobileUncle and restoring an IMEI backup file which I luckily had done some months back.

But still after a factory reset the IMEI is gone and I need to start again (root, install MobileUncle, ...).

Your help would be very appreciated.

Take also a look here
 
I followed all the steps but nothing happened

If you follow all these steps carefully from installing the drivers through connecting the phone to pc to the green circle you will be ok. The only thing, what is not ok in the description (at least for me): after connecting the phone to pc, you do not have to put back the battery.
My advice: do not panic, read again, do all the steps again and you will be ok. For the first try nothing happened to me, but for the 2nd it worked

Tapatalked from a Red rice
 
If I plug in my Hongmi without battery it gets properly identified on the Mediatek USB VCOM port and SP Flash tool progresses until 100% red line.
But when I insert the battery then I get an unknown device in Device Manager and cannot update automatically the Driver Software.
Somehow I must have removed the proper driver. Can somebody please sent me a link to the proper driver or let me know as which device his Hongmi get identified by Windows 7 when it is turned off and the battery is inserted?

Thanks a lot!
 
If I plug in my Hongmi without battery it gets properly identified on the Mediatek USB VCOM port and SP Flash tool progresses until 100% red line.
But when I insert the battery then I get an unknown device in Device Manager and cannot update automatically the Driver Software.
Somehow I must have removed the proper driver. Can somebody please sent me a link to the proper driver or let me know as which device his Hongmi get identified by Windows 7 when it is turned off and the battery is inserted?

Thanks a lot!

Do not put the battery in. I flashed my Hongmi this way. Only after finishing I removed the usb cable and put my battery in. Everything was ok then.

Tapatalked from a Red rice
 
mega website downloads to 100% then doesnt do anything?

driving me crazy as i cant get the file onto my HDD
 
Then tell it to save on the hard drive.
Perhaps firefox browser is better
 
If I plug in my Hongmi without battery it gets properly identified on the Mediatek USB VCOM port and SP Flash tool progresses until 100% red line.
But when I insert the battery then I get an unknown device in Device Manager and cannot update automatically the Driver Software.
Somehow I must have removed the proper driver. Can somebody please sent me a link to the proper driver or let me know as which device his Hongmi get identified by Windows 7 when it is turned off and the battery is inserted?

Thanks a lot!

I have the same problem. I done all steps as in manual but I can get only screen with red line and 100% complete, but nothing happens. My phone is bricked now. Then I try to format it by SP Flash tool, and formating was ok, but I still can't download RAM to it ((. I tried 2 different PCamd differenet cabels, reboot the system, also tried

Please help.
I can't upload the file, so this is the screenshoot link
http://i058.radikal.ru/1404/4e/83ae741a0e39.jpg

This is SP tools log file
https://drive.google.com/file/d/0BxXBPXY17_GHRTktLTJXUEhTeTA/edit?usp=sharing

When I try to check memory in device I had error too.
http://s020.radikal.ru/i717/1404/82/1d15ab9294b3.jpg
Log file:
https://drive.google.com/file/d/0BxXBPXY17_GHeDVfOFBKWFNYak0/edit?usp=sharing
Please, Help !!
 
Last edited:
is possible to restore to singapore stock rom?
becasue my redmi is singapore set and now on wcdma rom..
just asking btw, because im enjoy on my wcdma rom :D
 
  • Like
Reactions: Cursor
@ingbrzy

[TL;DR]

In the first page, I believe that there should be an advice to use the "Readback (F10)" option to create backups of all the device partitions BEFORE using the "Firmware Upgrade (F8)" or "Download (F9)" option in SP Flash Tool.

[/TL;DR]

I received a China Unicom branded WCDMA device, having a China Unicom boot animation, and many persisting China Unicom applications, even after updating to the latest multilanguage version and clearing the cache and data. I decided to use this guide to get rid of the annoying China Unicom branding.

The "Firmware Upgrade (F8)" option also flashes the preloader, while the "Download (F9)" option gives you the option to deselect the preloader.

In this guide it is suggested to use the "Firmware Upgrade (F8)" option, while the "Download (F9)" option is not even mentioned. Flashing the preloader is always risky, because a corrupted preloader will permanently brick the device. In other guides it is suggested to use the "Download (F9)" option and uncheck the preloader for security reasons, especially if the already installed preloader is the latest version available. My device happened to have an older preloader, but since the partition layout was the same, I opted to use the "Download (F9)" option and uncheck the preloader in the first flashing trial. This resulted in a corrupted device, as other users also reported in this thread. I can verify that ending up with a corrupted device is a valid possibility. I then used the "Firmware Upgrade (F8)" option to recover the lost IMEI, as suggested in this guide, but to no avail. By trying to upgrade a properly working device, the IMEI was lost, not the other way around. What an irony. Maybe the "Firmware Upgrade (F8)" option does not corrupt the device as the "Download (F9)" option does, but you can never be sure about that. Ending up with a corrupted device may not be a fault of the users, but some weird combination of specific hardware and software.

Luckily enough, since I have been using computers for many decades, I am accustomed to thorough backups before performing somewhat risky operations. In this particular case I had already backed up the whole device using the "Readback (F10)" option, so finally I was able to completely restore my device, and upgrade it to the latest version. The thorough backup is the only safe solution, and highly advised anyway.

The "Invalid IMEI" and "NVRAM WARNING: Err = 0x10" Network available problem appears if the NVRAM partition is corrupted. Before Using SP Flash Tool "Firmware Upgrade (F8)" or "Download (F9)" option, you have to make a backup of the NVRAM partition starting at 0xE00000 and having a length of 0x500000, using the "Readback (F10)" option. It would be wise to make backups of all partitions, to be able to restore the phone to its original condition, for whatever reason. There is no actual need to backup any partitions that can be flashed using already provided images, especially the cache (CACHE) and data (USRDATA) partitions, since you can anyway format them through recovery, nor the sdcard (FAT) partition. You may also probably not need to backup the original system (ANDROID) partition, since there are already JHBCNAH4.0 and JHBCNAL5.0 system images available, and the system partition will be probably updated anyway to the latest available version through the recovery. Keep all produced backups in a safe place. If you ever encounter the above mentioned problem, just flash back your NVRAM partition backup. You may need to use SP Flash Tool V5 to successfully flash back the NVRAM partition, since SP Flash Tool V3 seems to have some problems with that. If you have a proper NVRAM partition backup, you do not have to use any 3rd party tools as Mobileuncle MTK Tools, nor install a custom recovery. You can also just use SP Flash Tool to make safety backups of your phone, if you want to keep your device as close as possible to the original condition, not flashing a custom recovery partition.

In the unfortunate case you do not have any NVRAM partition backup, and encounter the above mentioned problem, you must use some already mentioned available tools to create proper NVRAM partition contents, then make a backup of the NVRAM partition, for future reference.

You can append the following section to the "Flash_tool.INI" file found in the SP Flash Tool folder, having all the partition names and their corresponding start addresses and lengths calculated from the included "MT6589_Android_scatter_emmc.txt" file, to facilitate partition dumping by using the "Readback (F10)" option. You may edit the code and change the folder where the partition images will be created, e.g. you can change "file0=PRELOADER.IMG" to "file0=C:\IMAGE\PRELOADER.IMG". You can later use these partition images to restore the phone to its original condition, or use some of these images along with any available updated ones, to correctly and successfully upgrade your phone to a newer version.

[READBACK]
readback_count=17
file0=PRELOADER.IMG
file0_enable=1
file0_read_flag=0
startaddr0=0x0
length0=0x600000
file1=MBR.IMG
file1_enable=1
file1_read_flag=0
startaddr1=0x600000
length1=0x80000
file2=EBR1.IMG
file2_enable=1
file2_read_flag=0
startaddr2=0x680000
length2=0x80000
file3=__NODL_PMT.IMG
file3_enable=1
file3_read_flag=0
startaddr3=0x700000
length3=0x400000
file4=__NODL_PRO_INFO.IMG
file4_enable=1
file4_read_flag=0
startaddr4=0xB00000
length4=0x300000
file5=__NODL_NVRAM.IMG
file5_enable=1
file5_read_flag=0
startaddr5=0xE00000
length5=0x500000
file6=__NODL_PROTECT_F.IMG
file6_enable=1
file6_read_flag=0
startaddr6=0x1300000
length6=0xA00000
file7=__NODL_PROTECT_S.IMG
file7_enable=1
file7_read_flag=0
startaddr7=0x1D00000
length7=0xA00000
file8=__NODL_SECCFG.IMG
file8_enable=1
file8_read_flag=0
startaddr8=0x2700000
length8=0x20000
file9=UBOOT.IMG
file9_enable=1
file9_read_flag=0
startaddr9=0x2720000
length9=0x60000
file10=BOOTIMG.IMG
file10_enable=1
file10_read_flag=0
startaddr10=0x2780000
length10=0x600000
file11=RECOVERY.IMG
file11_enable=1
file11_read_flag=0
startaddr11=0x2D80000
length11=0x600000
file12=SEC_RO.IMG
file12_enable=1
file12_read_flag=0
startaddr12=0x3380000
length12=0x600000
file13=__NODL_MISC.IMG
file13_enable=1
file13_read_flag=0
startaddr13=0x3980000
length13=0x80000
file14=LOGO.IMG
file14_enable=1
file14_read_flag=0
startaddr14=0x3A00000
length14=0x300000
file15=EBR2.IMG
file15_enable=1
file15_read_flag=0
startaddr15=0x3D00000
length15=0x80000
file16=__NODL_EXPDB.IMG
file16_enable=1
file16_read_flag=0
startaddr16=0x3D80000
length16=0xA00000


Let me now tell you my findings and solution for my case.

By using "SP Flash Tool V3.1316.0.sn150" included in "Xiaomi Hongmi WCDMA - unbrick 5.0.zip", I successfully backed up all the partitions by using the "Readback (F10)" option, since I always tend to be very careful performing somewhat risky operations.

Then, I flashed the "HM2013023_images_JHBCNAL5.0_4.2.zip" images using the "Download (F9)" option, but the NVRAM partition was corrupted somehow, so after booting to the system, I encountered the "NVRAM WARNING: Err = 0x10" Network available and the "Invalid IMEI" message appearing.

By reading back all "__NODL_" flagged partitions (including the NVRAM one), and comparing them with the backed up ones using a hex editor, I realized that all of them were corrupted, being somehow partially formatted by the included SP Flash Tool.

By using either the "Firmware Upgrade (F8)" or the "Download (F9)" option, I tried to flash back the wisely created NVRAM partition backup, along with the rest of the "JHBCNAL5.0" partition images, by changing "__NODL_NVRAM 0xe00000" to "NVRAM 0xe00000" inside the provided "MT6589_Android_scatter_emmc.txt" file, and selecting the corresponding NVRAM backed up partition image under the Download section, but to no avail. The procedure seemed to finish normally, but all other checked partitions were flashed except the NVRAM one.

Then, I came across Download Smart Phone Flash Tool (Latest Version) and downloaded several different versions of "SP Flash Tool", and tried to flash back the NVRAM partition. I checked other V3 versions which exhibited similar behaviour, where the NVRAM partition could not be flashed successfully. At last, by using the "MediaTek SP Flash Tool V5.13.52.200" version, I successfully flashed back the NVRAM partition, along with the other partitions, and the "Invalid IMEI" and "NVRAM WARNING: Err = 0x10" Network available errors were fixed.

To be on the safe side, since all other "__NODL_" flagged partitions were also corrupted, I created a complete set of all partition images, mixing the available "HM2013023_images_JHBCNAL5.0_4.2.zip" images along with the rest of the backed up "__NODL_" flagged partition images. I also created a modified "MT6589_Android_scatter_emmc.txt" file, removing all "__NODL_" references, and used "MediaTek SP Flash Tool V5.13.52.200" to download all the partition images together at once. It worked like a charm. The "Format All + Download" option did not work, displaying some error about formatting the device, so I used the "Download Only" option, and selected every possible partition.

Then, I successfully updated through original recovery to the official JHBCNBA13.0 and later JHBCNBD15.0 images. I also successfully updated to the corresponding multilanguage images.

Since I originally used the included "SP Flash Tool V3.1316.0.sn150" to download the update, which created the "__NODL_" flagged partitions corruption in the first place, I cannot know whether "MediaTek SP Flash Tool V5.13.52.200" can also corrupt the "__NODL_" flagged partitions, or if this problem is fixed in V5. In any case, to be on the safe side, make a complete backup before trying anything else. The V5 has no "Flash_tool.INI" file, so I could not find a proper place to manually insert the readback partition memory locations, so I am using V3 to easily readback the backups, and V5 to download the images.

Maybe in V5 no corruption occurs during downloading, so you do not actually have to reflash all partitions, but I am done with testing, since I have found a working solution for myself. In any case, to be on the safe side, make a complete backup before trying anything else.

Also, this corruption happened to a WCDMA China Unicom November 2013 produced device, having a wt98007_20131023-185444 preloader. Maybe the corruption happens to specific hardware versions of the phone. The thorough backup is the only solution.

Also, "Xiaomi Hongmi WCDMA - unbrick 4.0.zip" includes a JHBCNAH4.0 wt98007_20131212-160444 preloader, while "Xiaomi Hongmi WCDMA - unbrick 5.0.zip" includes a JHBCNAL5.0 wt98007_20131230-175541 preloader.

I also updated an unbranded January 2014 produced device, which seems to be a different hardware revision of the phone, but cannot say if this corruption issue could also happen to this different device, since, to be on the safe side, I backed up all partitions using V3 and then downloaded the updated set of all partition images together using V5, which worked like a charm, as in the other device.

By concluding my findings, I have to repeat my suggestion.

In the first page, I believe that there should be an advice to use the "Readback (F10)" option to create backups of all the device partitions BEFORE using the "Firmware Upgrade (F8)" or "Download (F9)" option in SP Flash Tool.