Warning: This tutorial is working on the OnePlus5 which lost the model ID file but the Recovery mode and Fastboot mode is still working.

What we need:

  1. Oxygen OS ROM package
  2. OnePlus 5
  3. Notepad++(https://notepad-plus-plus.org/download/v7.5.1.html)
  4. WinRAR

Some time, we may have already flashed a WRONG ROM package or you may have already done something WRONG. So the Recovery mode showed us Failed: E3004: This package is for "OnePlus 5" devices; this is a "[NAME]" . At this time, the devices name what the Recovery mode showed me is empty.

 

I think that the model ID file may have already lost. But the Recovery mode showed me the device name is empty. Then I switch model validation file which in the ROM package to empty. It may be still working. Right?

Start:

  1. Download the ROM package
  2. Enter the folder \META-INF\com\google\android

  1. Find this file update-script and unzip it.Then, open the file by Notepad++.

  1. Find this string getprop("ro.display.series") == "OnePlus 5" at the first line.And change the name to which Recovery mode showed.(At this time, I change to empty.)

  1. Finally, put this file into the zip package and select the compression mode to storage.

At this time, the ROM package has already made.Then, flash the TWRP Recovery and touch [Mount]-[Enable MTP]

  1. Flash the ROM package what we edited.

Hope to be a free geek forever.