If you flashed the Stock ROM using “Download All + Format” option in SP Flash Tool or you wiped NVRAM partition accidently then you probably lost IMEIs, WiFi/Bluetooth Mac Address and Serial No.
/* *Your Warranty is now void. *Neither me nor the developers of tools are responsible. *You are doing this at your own risk and will *solely be responsible if something happens to the device. *Make sure you only use the original “IMEI_1, IMEI_2, *WiFi/Bluetooth Address, Serial Number” that came with your phone. */
Although, I have tried to keep this guide as simple as possible, I am assuming that you have already flashed Stock ROM using this thread/guide:
Which also means the required drivers i.e. “MTK (USB DA COM, Preloader USB VCOM, USB Port, USB VCOM) Driver” and “Lenovo USB Driver” in the thread mentioned above are also installed.
- Lenovo K8 Note with Stock ROM.
- Original IMEI_1, IMEI_2, WiFi/Bluetooth Mac Address, Serial Number. (Find on Phone’s box)
- SN Write Tool (Download)
- Database Files
- ADB Tools (Inside SN_Write_Tool\Android)
- Basic ADB know-how.
- And a PC. (obviously)
Before we proceed, make sure “USB Debugging” is enabled on phone:
- Navigate to, Settings > System > About Phone > Build Number (Tap 7 times) to enable “Developer Options”.
- Now, Enable “USB Debugging” in Settings > System > Developer Options.
- Extract SN Write. (For Example, Location: “E:\ SN_Write_Tool_v1.1916.00”)
- Open SN Write Tool (SN_Writer.exe).
- Make sure all the Preliminary steps mentioned in below sections have been performed – Obtaining DB files, Configuring SN Write Tool, Understanding Barcode.
- Switch of the phone, while keeping the cable unplugged
- Click “Start”.
- Enter Original IMEI_1, IMEI_2, WiFi/Bluetooth Mac Address, Barcode and press “Ok”
- Connect your phone.
- Now your phone will automatically boot in Meta Mode.
- Wait for the Process to finish.
- Now you will see “Pass” message if everything completes successfully.
- Now it will again ask to enter the details. Click “Cancel”
- The phone will now switch off. Then boot it manually.
- That’s it. Your phone is now back to normal.
Obtaining Database(DB) files:
In order to restore everything we need 2 Database files, which can be obtained by following the procedure below:
- Extract SN_Write Tool. (For Example, Location: “E:\ SN_Write_Tool_v1.1916.00”)
- Navigate to “Android” folder inside SN_Write_Tool folder.
- Keep Shift Key Pressed and Right Click inside the folder. Select “Open Command / PowerShell window here”.
- Type Code:
- You will receive a prompt on your phone. Select “Ok”. The device will appear in the list. (Something like “0123456 device”)
- Now, type these commands:
adb pull /vendor/etc/mddb Database adb pull /system/etc/apdb Database
- Now, navigate to “E:\ SN_Write_Tool_v1.1916.00\Android\Database”. There will be around 23 Files. We only Need 2 files from that.
- APDB_MT6797_S01_alps-trunk-o0.tk_W19.10 (Approx. size 145kb)
- MDDB_InfoCustomAppSrcP_MT6797_S00_MANNING_O_Vxx_x_ ulwctg_n.EDB (Approx. size 59mb)
Note: Name and size may slightly vary depending upon your firmware.
- Copy the above two files to some other destination (optional).
Configuring SN Writer Tool:
- Open “SN_Writer.exe” inside “E:\ SN_Write_Tool_v1.1916.00”.
- Now Click “System Config”.
- Check “Dual IMEI” (Do not check “Dual IMEI Same” under that).
- In Write options select Barcode, IMEI, BT Address, WiFi Address. (If you don’t have WiFi/BT Address then don’t check/select them).
- Check “Load AP DP from DUT” and “Load Modem DB from DUT”.
- Click “MD1_DB” and select the file that you pulled using ADB i.e.
- Click “AP_DB” and select the file that you pulled using ADB i.e.
- Now click “Save”.
It took me lots n lots of trial & error and googling before finding the correct (probably) Barcode format that we need to use in SN Writer. Trust me, it was not an easy task.
The Barcode field in SN Write Tool is a combination of three parts. Lets call it First (PN), Second and Third Part (SN). You can find PN & SN on the box of phone. I am not sure about the second part with 15 characters. You can leave the second part, just give 15 Spaces.
Total Length(33 Characters) = PN(10) + (15 Spaces) + SN(8)
If my PN written on the box is “AB1D1112IN” and SN is “XYZ1223W”, my barcode will be (without quotes):
There can also be a second iteration for barcode, though I am not sure about this and is completely based on my assumption. In the second part, as mentioned above we are leaving 15 spaces, but in this, we will use the product barcode of 13 characters (Refer Barcode No. 2 in the attached image below) instead of 15 spaces
If my barcode (no. 2 in image above) of 13 charcters is “0123456789012”, then in SN Writer we will write (without quotes):
Total Length(33 Characters) = PN(10) + (Space) + (13) + (Space)+ SN(8)
“AB1D1112IN 0123456789012 XYZ1223W”
As you can see in the Screenshot attached in this post, “Lenovo Help” app recognizes the device as it is meat to be recognized.
WiFi/Bluetooth Mac Address:
Though, it is not a big deal if you lost WiFi/Bluetooth Mac Addresses. They will still work fine even without it.
If you didn’t backup nvram before or didn’t note down WiFi/Bluetooth Mac address then you can’t get it back. But, if you did TWRP backup of nvram then you can restore it and get back both the original Mac addresses.
SN Writer not booting phone into Meta Mode automatically.
Make sure drivers are installed or Boot Manually in Meta Mode using Power Button + Volume Down.
Do I need to be on Stock ROM?