Hi bro I have this problem with LG K4 2017 M160 with android 6.0.1
How to solve
Thanks in advance
[IMEI Repair started]
Safe IMEI re-write check
Safe IMEI re-write not possible. Need normal IMEI re-write method.
Creating EFS backup...
Waiting for serial port to appear...
Trying to boot the phone into download mode...
Waiting for download mode serial port to appear...
If the device is stuck in dowload mode, remove the battery to reset the device.
 EFS Backup failed. Proceed at your own risk. Press 'OK' to continue, and 'Cancel' to abort process!
Checking ports
For IMEI repair, a DIAG mode serial and a Modem port must be present.
Searching for ports
Waiting for diag serial port to appear...
 Please make sure 'Port Check Test' is enabled on the phone!
How to enable 'Port Check Test' or 'DIAG port' on your LG phone:
There are many different ways to enable this option, but not all of them will work on all phones. Try them out one-by-one

Dial in the following codes on your phone (without pressing call). If the code works a hidden menu will appear. Find the option 'Port Check Test', and set it to 'Enabled'. It is usually in the top menu or in the 'SVC Menu' submenu.
277634#*#
3845#*160#
*#546368#*160#
In case you cannot get to the hidden menu, or the hidden menu does not contain the option 'Port Check Test', try Factory Reset on the phone.
DIAG mode serial found.
Modem port found
Waiting for ADB connection.Be patient! Do NOT disconnect the phone!
IMEI Repair
Protocol error.
Finished at local time: [07.10.18 16:15:11]
WorkID: 40563085
How to solve
Thanks in advance
[IMEI Repair started]
Safe IMEI re-write check
Safe IMEI re-write not possible. Need normal IMEI re-write method.
Creating EFS backup...
Waiting for serial port to appear...
Trying to boot the phone into download mode...
Waiting for download mode serial port to appear...
If the device is stuck in dowload mode, remove the battery to reset the device.
 EFS Backup failed. Proceed at your own risk. Press 'OK' to continue, and 'Cancel' to abort process!
Checking ports
For IMEI repair, a DIAG mode serial and a Modem port must be present.
Searching for ports
Waiting for diag serial port to appear...
 Please make sure 'Port Check Test' is enabled on the phone!
How to enable 'Port Check Test' or 'DIAG port' on your LG phone:
There are many different ways to enable this option, but not all of them will work on all phones. Try them out one-by-one

Dial in the following codes on your phone (without pressing call). If the code works a hidden menu will appear. Find the option 'Port Check Test', and set it to 'Enabled'. It is usually in the top menu or in the 'SVC Menu' submenu.
277634#*#
3845#*160#
*#546368#*160#
In case you cannot get to the hidden menu, or the hidden menu does not contain the option 'Port Check Test', try Factory Reset on the phone.
DIAG mode serial found.
Modem port found
Waiting for ADB connection.Be patient! Do NOT disconnect the phone!
IMEI Repair
Protocol error.
Finished at local time: [07.10.18 16:15:11]
WorkID: 40563085