FORUMS

[GUIDE][SN_Writer]Restore IMEI, WiFi/Bluetooth Mac, Serial No.[Lenovo_K8_Note]

849 posts
Thanks Meter: 1,246
 
Post Reply Email Thread

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.

Disclaimer:
Code:
/*
*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.
*/
Note:
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:
https://forum.xda-developers.com/k8-...-hard-t3791839
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.

Requirements:
  1. Lenovo K8 Note with Stock ROM.
  2. Original IMEI_1, IMEI_2, WiFi/Bluetooth Mac Address, Serial Number. (Find on Phone’s box)
  3. SN Write Tool (Download)
  4. Database Files
  5. ADB Tools (Inside SN_Write_Tool\Android)
  6. Basic ADB know-how.
  7. And a PC. (obviously)

USB Debugging:
Before we proceed, make sure “USB Debugging” is enabled on phone:
  1. Navigate to, Settings > System > About Phone > Build Number (Tap 7 times) to enable “Developer Options”.
  2. Now, Enable “USB Debugging” in Settings > System > Developer Options.

Flashing Procedure:
  1. Extract SN Write. (For Example, Location: “E:\ SN_Write_Tool_v1.1916.00”)
  2. Open SN Write Tool (SN_Writer.exe).
  3. Make sure all the Preliminary steps mentioned in below sections have been performed – Obtaining DB files, Configuring SN Write Tool, Understanding Barcode.
  4. Switch of the phone, while keeping the cable unplugged
  5. Click “Start”.
  6. Enter Original IMEI_1, IMEI_2, WiFi/Bluetooth Mac Address, Barcode and press “Ok”
  7. Connect your phone.
  8. Now your phone will automatically boot in Meta Mode.
  9. Wait for the Process to finish.
  10. Now you will see “Pass” message if everything completes successfully.
  11. Now it will again ask to enter the details. Click “Cancel
  12. The phone will now switch off. Then boot it manually.
  13. 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:
  1. Extract SN_Write Tool. (For Example, Location: “E:\ SN_Write_Tool_v1.1916.00”)
  2. Navigate to “Android” folder inside SN_Write_Tool folder.
  3. Keep Shift Key Pressed and Right Click inside the folder. Select “Open Command / PowerShell window here”.
  4. Type
    Code:
    adb devices
  5. You will receive a prompt on your phone. Select “Ok”. The device will appear in the list. (Something like “0123456 device”)
  6. Now, type these commands:
    Code:
    adb pull /vendor/etc/mddb Database
    adb pull /system/etc/apdb Database
  7. 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.
  8. Copy the above two files to some other destination (optional).
Note: If you are using PowerShell then, instead of “adb” type “./adb”

Configuring SN Writer Tool:
  1. Open “SN_Writer.exe” inside “E:\ SN_Write_Tool_v1.1916.00”.
  2. Now Click “System Config”.
  3. Check “Dual IMEI” (Do not check “Dual IMEI Same” under that).
  4. In Write options select Barcode, IMEI, BT Address, WiFi Address. (If you don’t have WiFi/BT Address then don’t check/select them).
  5. Check “Load AP DP from DUT” and “Load Modem DB from DUT”.
  6. Click “MD1_DB” and select the file that you pulled using ADB i.e.
    MDDB_InfoCustomAppSrcP_MT6797_S00_MANNING_O_Vxx_x_ ulwctg_n.EDB
  7. Click “AP_DB” and select the file that you pulled using ADB i.e.
    APDB_MT6797_S01_alps-trunk-o0.tk_W19.10
  8. Now click “Save”.

SN Writer Config Window

Understanding Barcode:
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)

For Example,
If my PN written on the box is “AB1D1112IN” and SN is “XYZ1223W”, my barcode will be (without quotes):
Code:
“AB1D1112IN               XYZ1223W”
or

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

Barcode No. 2 on the Box

For Example,
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)

Code:
“AB1D1112IN 0123456789012 XYZ1223W”
Note the space after each part, which makes up for two characters that we require.

As you can see in the Screenshot attached in this post, “Lenovo Help” app recognizes the device as it is meat to be recognized.

Lenovo Help App


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.

FAQs:
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?
Yes.

Attached Thumbnails
Click image for larger version

Name:	Barcode.jpg
Views:	310
Size:	50.4 KB
ID:	4781971   Click image for larger version

Name:	SN_Writer_Home.jpg
Views:	212
Size:	35.7 KB
ID:	4781973   Click image for larger version

Name:	SN_Fields.jpg
Views:	204
Size:	23.0 KB
ID:	4781998   Click image for larger version

Name:	SN_Writer_System_Config_Database_Loaded.jpg
Views:	300
Size:	100.5 KB
ID:	4782011   Click image for larger version

Name:	Lenovo_App.png
Views:	282
Size:	54.9 KB
ID:	4782584  
Attached Files
File Type: zip SN_Write_Tool_v1.1916.00.zip - [Click for QR Code] (8.24 MB, 546 views)
The Following User Says Thank You to kk9999gada For This Useful Post: [ View ] Gift kk9999gada Ad-Free
24th June 2019, 01:06 PM |#2  
kk9999gada's Avatar
OP Senior Member
Flag Mumbai
Thanks Meter: 1,246
 
More
Changelog:
24th June 2019, 08:07 PM |#3  
Junior Member
Thanks Meter: 2
 
More
thanks alot man
I managed to get apdb files but when i try your command to get mddb i get that error
adb: error: failed to copy '/etc/mddb' to 'Database\mddb': read failed: Is a directory
any help?
and how to know if my bluetooth or wifi mac address is missing and where to find them because nothing of that is written on the phone box
25th June 2019, 05:20 AM |#4  
kk9999gada's Avatar
OP Senior Member
Flag Mumbai
Thanks Meter: 1,246
 
More
Quote:
Originally Posted by softmaster3

thanks alot man
I managed to get apdb files but when i try your command to get mddb i get that error
adb: error: failed to copy '/etc/mddb' to 'Database\mddb': read failed: Is a directory
any help?
and how to know if my bluetooth or wifi mac address is missing and where to find them because nothing of that is written on the phone box

Edit: Solved

Android will automatically generate Wi-Fi / Bluetooth address if not found. No need to worry about that. Thats why I I have mentioned in the post that it will still work fine even without it.
25th June 2019, 08:33 AM |#5  
Senior Member
Flag Vijayawada
Thanks Meter: 93
 
More
You mentioned wrong paths, /etc/apdb is fine but /etc/mddb doesn't exist(empty folder was created in latest update but still no contents in it). mddb is under /vendor/etc/mddb. Just to avoid confusion and even to make this guide suitable for users who pull the file from TWRP make the /etc/apdb to /system/etc/apdb

---------- Post added at 01:03 PM ---------- Previous post was at 01:00 PM ----------

Quote:
Originally Posted by softmaster3

thanks alot man
I managed to get apdb files but when i try your command to get mddb i get that error
adb: error: failed to copy '/etc/mddb' to 'Database\mddb': read failed: Is a directory
any help?
and how to know if my bluetooth or wifi mac address is missing and where to find them because nothing of that is written on the phone box

instead of "adb pull /etc/mddb" use "adb pull /vendor/etc/mddb"
The Following 2 Users Say Thank You to M.A.P For This Useful Post: [ View ] Gift M.A.P Ad-Free
25th June 2019, 08:50 AM |#6  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by M.A.P

You mentioned wrong paths, /etc/apdb is fine but /etc/mddb doesn't exist(empty folder was created in latest update but still no contents in it). mddb is under /vendor/etc/mddb. Just to avoid confusion and even to make this guide suitable for users who pull the file from TWRP make the /etc/apdb to /system/etc/apdb

---------- Post added at 01:03 PM ---------- Previous post was at 01:00 PM ----------


instead of "adb pull /etc/mddb" use "adb pull /vendor/etc/mddb"

thanks a lot guys
u two just made my day
and M.A.P u r a life saver i cant thank you enough for ur work on treble for k8 note and ur help here
25th June 2019, 09:07 AM |#7  
kk9999gada's Avatar
OP Senior Member
Flag Mumbai
Thanks Meter: 1,246
 
More
Quote:
Originally Posted by M.A.P

You mentioned wrong paths, /etc/apdb is fine but /etc/mddb doesn't exist(empty folder was created in latest update but still no contents in it). mddb is under /vendor/etc/mddb. Just to avoid confusion and even to make this guide suitable for users who pull the file from TWRP make the /etc/apdb to /system/etc/apdb

Done. Thanks for suggestion.
The Following User Says Thank You to kk9999gada For This Useful Post: [ View ] Gift kk9999gada Ad-Free
25th June 2019, 10:52 AM |#8  
Junior Member
Thanks Meter: 2
 
More
i did write the serial, check warranty and its good
but noticed that the serial written on phone box is 12 Character long not just 8 and sn writer did write 8 only not the whole 12
is that correct??
25th June 2019, 11:00 AM |#9  
kk9999gada's Avatar
OP Senior Member
Flag Mumbai
Thanks Meter: 1,246
 
More
Quote:
Originally Posted by softmaster3

i did write the serial, check warranty and its good
but noticed that the serial written on phone box is 12 Character long not just 8 and sn writer did write 8 only not the whole 12
is that correct??

May I see the image of your box. PM me the image.
25th June 2019, 12:13 PM |#10  
Junior Member
Thanks Meter: 2
 
More
done
25th June 2019, 01:02 PM |#11  
Senior Member
Flag Vijayawada
Thanks Meter: 93
 
More
Quote:
Originally Posted by softmaster3

thanks a lot guys
u two just made my day
and M.A.P u r a life saver i cant thank you enough for ur work on treble for k8 note and ur help here

Your welcome, I'm always ready to help
Post Reply Subscribe to Thread

Tags
imei, lenovo k8 note, manning, serial no., sn writer

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes