So, there are a couple of reasons why you get an Error 7 while installing the Lineage OS ROM. Here are few of the reasons:
- Firstly, the Lineage OS ROM you’re trying to flash is not meant for your device. So, double check if you have the right ROM. If you’re sure the ROM is correct, then there is a simple trick to disable assert checking in the ROM.
- Sometimes, you’ll see a Trustzone error in the TWRP/CWM before Error 7. This means you need to upgrade your bootloader before installing the ROM to fix Error 7.
- You’ll get the Error 7 when you’re not properly flashing the ROM while migrating from a different ROM.
How to Fix Error 7 While Installing Lineage OS
Follow the below methods to fix Error 7 while installing Lineage OS ROM on your device.
Method 1: Updater Script Hack to fix Error 7
Note: Use this method only when you’re 100% sure that the ROM you’ve downloaded is for your device. What this does is to bypass assert checks in recovery so that you can install the ROM without any checks.
- Open the Lineage OS ROM zip using any archiving software like 7zip, WinRAR, etc… You can also open it on your device.
- Now, you need to navigate to this path: META-INF » com » google » android » updater-script.
- Open the file updater-script in a text editor. You’ll see a bunch of lines with the command assert and the model name of the device next to it.
- If there’s a mismatch with the codename of the device in the script, you’ll get Error 7 while flashing.
- So, just either edit the code to match your device’s codename or delete all the lines having the code “assert & getprop”
- Save the file.
- Try to install the ROM now.
Method 2: Trustzone Error
If you see a trust zone error in the recovery while flashing Lineage OS, follow the below fix Error 7 in such situations.
- This error is due to an outdated bootloader. You need to upgrade your bootloader before you flash Lineage OS. For instance, if you’re running Lollipop and trying to install Lineage OS 14.1, it might not work. The bootloader should support Nougat based ROMs.
- You need to do a little research on your device’s bootloader level before installing Lineage OS ROM. You can check the Lineage OS Wiki pages for more details.
Method 3: Migration Issue
You might receive Error 7 if you’re not properly migrating from other ROMs. So, if you’re on CM ROM and you want to migrate to Lineage OS, you should do it in a proper way. Dirty flashing might not be the solution always.
- If you retain data from previous ROM, you can follow our tutorial to retain data without dirty flash.
- In case you want to dirty flash an official ROM, download the experimental build and dirty flash it first. Then you can download the latest nightly as OTA.
- Try to install a different TWRP/CWM version. Then try to install Lineage OS ROM, it might fix the issue.
So, that’s it. Let us know if you have any other solutions available to fix error 7. It’ll help a lot of folks who are trying to get an awesome ROM running on their device.