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.
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).
In order to complete the tutorial below, you're going to need some things set up ahead of time. Please follow the how to install ADB and Fastboot tools guide if you haven't done so already. Then you will need to follow this guide: How to Enable Developer Mode, as well as this one which shows you How to Enable USB Debugging Mode.
You will then need to open a command prompt within the same folder as your ADB and Fastboot tools and execute the "adb devices" command (without quotes) to start the ADB service. From here, you can connect the device to the PC with a USB cable. If everything has been done properly then you'll be asked if you want to grant USB Debugging Mode access from the PC the phone is connected to.
Once granted, you can then test this by running the command "adb devices" again (without quotes) in a Command Prompt, Terminal, or Windows PowerShell to make sure the computer recognizes the device.
Time needed: 15 minutes.
Fixing the OnePlus TWRP “ERROR: 7” for LineageOS OTA Updates
- Download the latest version of OxygenOS for your OnePlus device
- Extract the contents of that file to the PC
- Copy/Move the NON-HLOS.bin file to your ADB/Fastboot folder
You’ll find this file in the firmware-update folder.
- Boot the smartphone into Fastboot Mode
- Connect it to the PC with a USB cable
- Open a Command Prompt, Windows PowerShell, or Terminal in the same folder as your ADB and Fastboot tools
- Type out the following command. . .
fastboot flash modem NON-HLOS.bin
- . . .then press Enter on the keyboard
- Wait for the OKAY message from Fastboot
- 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 tutorial helped you, please consider supporting the website in any number of ways. Even if you are unable to donate, sharing my websites (AndroidExplained.com & PlayStoreSales.com) on social networks helps a lot, sharing or liking content on Facebook, subscribing on YouTube and liking videos, etc. It all helps in more ways than one.
If you run into any issues with this guide though, please leave a comment to let me know. This will help me to keep content as up to date as possible.