[ZTE Axon 7 Questions & Answers] brunojborges:
Fist: This can potentially screw up your phone rendering it the equivalent of a paper weight IF not done correctly. So pay attention to each step. I am not responsible for lost baseband's, lost IMEI's, bricked phones and nuclear war. Proceed with caution and via your own will.

the phone must be rooted and with twrp.

in my case, i had the imei numbers on phone settings, but was invalid numers and they was the same on sim1 and sim2. Im saying that because we will make a backup of the partitions where are the wrong imeis, then find this numbers in binary inside the backup file (we will use other program to open and edit this file, and there is a tip to find this numbers in binady, so i dont know how to find where line is the imeis stored if they are erased or 0), then change this numbers in the file to the right ones using another program to change the right imeis to binary (so you must have the box of the phone with the original imeis or know them from somewhere as in any photo, text backup, etc), then erase this partitions on phone (after that my phone got crazy, hot, and with a lot of strange lines on system>about phone>imei information), then flash full stock with miflash (so then the imeis will show as 0 as the partitions will back but erased), then reflash any other rom with root and magisk and twrp, and then flash back the backup partitions file with right numbers changed. Then voalaa

most of the files to do this are here https://xdaforums.com/general/general/guide-repairing-imei-qpst-qualcomm-t3856968

steps:

WRITE DOWN YOUR IMEI SOMEWHERE SAFE! IF you don't have it don't worry as your IMEI most likely is false / null. Whole reason we're here right? Ok. Now you want to connect your phone to your PC, enable diag mode on your phone, Install QPST Tools then open QPST Configuration. Allow debbug on developer options in phone, and when conect to pc, open adb prompt, and type:

adb devices (to check if the phone is identified correctly)

adb shell

su

setprop sys.usb.config diag,serial_tty,serial_smd

if this did not work, your phone has no root, or are not in debbug mode.

if was all right, you can proceed. remember if QPST.2.7.437 (version i used) did not recongnize your phone, maybe you must go into devices in windows and change driver to the one "qualcom" and with "901D" in the end.

Next open QPST Software Download and navigate to the Backup tab.

Make sure your com port is still showing and you are connected. Next click to the right of where it says xQCN file the "Browse" button and set a location and name your backup file something like coolpad_original_qcn.qcn . Save it as .qcn format not xQCN.

Now you are ready to open up MiTeC Hex Editor(program name) and load up your QCN file. So do this. Once loaded you will want to search for 088a to find your IMEI within the file. Why? Thats how it is stored in hex format. The 08 will be what stays but the 3rd letter "8" is what your IMEI starts with so make sure you replace it.. e.g. IMEI 762429035623741 would be 087a.. and if it started with 6 086a etc.

You should have located the string now that shows 087a then following will be the rest of your IMEI just reversed. Should look like this which is from our example IMEI in step 3, "087A 2624 0953 2673 1400". This translates out to 7 skip the first 08 and the A then 62429035623741 so 762429035623741.

Open the last tool called IMEI Converter. Input your phones new (factory original) IMEI in the first box and take the output and replace "087A 2624 0953 2673 1400" with this string you just created. Save your .qcn file and MAKE SURE you do not overwrite your original QCN backup.

now i had to erase the partitions on phone. what was in this tutorial i found, did not work. but this did: fist i had to go into twrp, so i go into console and typed this 3 lines, pressing enter after each line separately:

dd if=/dev/zero bs=16384 count=1 of=erase_modemst.bin

fastboot flash modemst1 erase_modemst.bin (not shure if this lines did anything, but i did it anyway)

fastboot flash modemst2 erase_modemst.bin (not shure if this lines did anything, but i did it anyway)

after that, reboot your phone. mine got very hot, a little crazy, and with strange infos in imei options. so i thought if i restore to stock, the software would make partitions back again but erased. and this is what happend. i flashed full stock nougat with miflash (no need links here, is easy to find stock nougat for your device as miflash software), and boot phone. all ok and imeis "unknow".

so then, i used edl tools to flash a eld package oreo with twrp after (my goad was only install twrp, but i only know do this with this method, any other doesnt work for me). https://xdaforums.com/axon-7/development/axon-7-edl-tool-flash-backup-restore-t3750759 (dont forget to read and get required files)

so with twrp, i did flashed a newer twrp and a rom slim aroma that has inbuid options to root and install magisk https://xdaforums.com/axon-7/development/rom-slm7-dfnr-t3896486 (dont forget to read and get required files)

now, i enabled again debbug mode, and all this lines again in adb through pc:

adb devices (to check if the phone is identified correctly)

adb shell

su

setprop sys.usb.config diag,serial_tty,serial_smd

now for last, Open up QPST Software Downloader and goto Restore tab. Select your file we saved in the last step (.qcn file with imeis changed) and write it. Now reboot your phone. Check to see that your new imei is showing. Mine was back and i coudnt belive, only thing is that as the imeis was doubled, i didnt know how to change first so the imei 1 in my box is the imei2 on phone and imei 2 on box are imei 1 on phone. Not a big deal. I will not do all this again, no way.

tips: if your phone has stuck in DFU mode, just plug on pc and open edl tools, it will reboot to edl mode for you.

if your phone has stuck in edl mode, you will have to disassembly and disconect/connect battery flat. Is a bit easy, as you dont have to do nothing with the screen. or wait any days to drain the battery.

this is what i did after 1 week trying thousand tutorials. there was a lot of threads that i take some parts from one, ones from another, so i cant give the credits coz the truth is that i dont remember all them. I created nothing here, and 90% of what is here are not my words. all i did is put the pieces together. Really sorry for my bad english.