Home » Tips » LineageOS » Fixing the TWRP LineageOS OTA Update Modem Version Error
image showing the fastboot command

Fixing the TWRP LineageOS OTA Update Modem Version Error

The other day I tried updating my OnePlus 5T to the latest version of LineageOS 16 but it resulted in an error. The built-in updater downloaded the latest LOS16 OTA update but was unable to install it. I was getting an error about an incompatible modem version and this was the easiest way I found to fix it.

I’ve seen this error pop up in TWRP multiple times over the last few years. I even went as far as to write about it earlier this year when I was trying to update the aging OnePlus 3. TWRP simply threw up the infamous “Updater Process Ended with ERROR: 7” message which tells you it can’t complete the installation process.

TWRP giving the ERROR: 7 messages can mean a lot of things, but you should pay attention to the actual error it prints above that line.

I was happy with the OnePlus 3/3T tutorial for the time but it wasn’t very helpful this past week with the OnePlus 5T I was trying to update. In the previous tutorial, I gave some ZIP files that you should flash in TWRP to update the modem. It worked well but I can’t just flash those ZIP files on the OnePlus 5T.

So I felt it would be good to make a more universal tutorial that will work on the OnePlus One, OnePlus 2, OnePlus 3, OnePlus 3T, OnePlus 5, OnePlus 5T, OnePlus 6, OnePlus 6T, OnePlus 7, OnePlus 7T and all of the company’s Pro variants as well. I just had to dissect the error a bit more and look at it from a broad point of view.

Dozens of premium Android apps go on sale every single day. Check out the latest over at PlayStoreSales.com.

The end result will be the same though as you’ll be able to install the latest LineageOS 16 (and soon to be LineageOS 17) OTA update, this will update your modem to the latest version, and it won’t cause you to lose any of the data (which is something I see a lot of recommendations do).

Before you can complete the tutorial below, you first need to install and enable a few things ahead of time.
– You need ADB & Fastboot tools installed on your PC. I recommend Minimal ADB & Fastboot, but you could just use Android’s SDK Platform Tools which are provided by Google.
 – Next, you will need to enable Android’s Developer Mode on your smartphone.
 – Then, you’ll want to go ahead and enable USB Debugging Mode on the device as well.
 – Don’t forget to make sure your PC can detect the smartphone using the ADB devices command.

Time needed: 15 minutes.

Fixing the OnePlus TWRP “ERROR: 7” for LineageOS OTA Updates

  1. Download the latest version of OxygenOS for your OnePlus device

  2. Extract the contents of that file to the PC

  3. Copy/Move the NON-HLOS.bin file to your ADB/Fastboot folder

    You’ll find this file in the firmware-update folder.

  4. Boot the smartphone into Fastboot Mode

    OnePlus OneOnePlus 2OnePlus 3/3TOnePlus 5/5TOnePlus 6/6TOnePlus 7/7T

  5. Connect it to the PC with a USB cable

  6. Open a Command Prompt, Windows PowerShell, or Terminal in the same folder as your ADB and Fastboot tools

  7. Type out the following command. . .

  8. fastboot flash modem NON-HLOS.bin

  9. . . .then press Enter on the keyboard

  10. Wait for the OKAY message from Fastboot

  11. Now try to install the latest LineageOS OTA update again

    With the latest modem installed, you shouldn’t get the ERROR:7 message anymore.


So what I have described above is actually the same thing that is happening if you follow an ‘unbrick’ or ‘return to stock’ OnePlus tutorial when trying to fix this specific TWRP error. The only reason we get that error is because of the code that’s sitting in the /modem partition so flashing the latest version in Fastboot Mode fixes it.

That removes a lot of set up time when compared to that recommendation (which is suggested a lot) since that is basically like taking the long route just to get to the destination.

Alternatively, if I had just uploaded ZIP files that include this version of the modem (like I did before), then it doesn’t help you 6 months from now when there’s an even newer version of the modem out there. I would love to sit here and remake tutorials/videos over and over again but I have other articles that I could be covering here.

Fixing the OnePlus 5 & OnePlus 5T Modem Firmware TWRP ERROR: 7

So again, TWRP giving you an ERROR: 7 message doesn’t mean it’s about the modem firmware. TWRP gives that error number almost anytime it fails to install a ZIP file. And that is all the LOS 16 (and soon to be LOS 17) build-in updater is trying to do when it goes through the OTA update process.

It’s simply automating the process of downloading the ZIP file, rebooting the smartphone into Recovery Mode (which is likely to be TWRP), and telling TWRP to flash this specific ZIP file. It will also utilize the scripting feature of TWRP and install all of the mods (such as Magisk or Gapps) that support addon.d.

It really is a seamless update process if you’re able to get all the pieces in place.

The actual error that TWRP displays above the ERROR: 7 messages may vary slightly from device to device. It will depend on which version of TWRP you’re using, which version of LineageOS you are currently trying to install or update, and how it was coded to tell you about said error.

Checking Modem Time-Stamp or Modem Firmware Version

I see some people posting screenshots that have TWRP telling them the script went in and checked for the modem build timestamp. As you saw in the last OnePlus 3 tutorial I did about this, it told me that the firmware version of my modem wasn’t new enough. So sometimes it’s checking for a date while other times it’s looking for a version of OxygenOS.

Either way, the step by step tutorial above will get your OnePlus smartphone updated to the latest version of the modem.

If this was helpful, please consider supporting the website in any number of ways.

Donations help a lot, but simply sharing & liking things that have helped or are of interest to you (on places like Reddit, Facebook, YouTube) while following & subscribing to Android Explained accounts on sites like Facebook, YouTube can help too.

If you run into any issues with this guide though, please leave a comment to let me know. This will enable me to keep all Android tutorials as up to date as possible.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top